linux/drivers/staging/rts5208
Joe Perches 8ee775f92c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros
Macros with hidden flow control are bad form as the code path
taken can be unexpected for the reader.

Expand these in-place and remove the macros.

Done with coccinelle script:

@@
expression chip;
expression arg1;
expression arg2;
expression arg3;
@@

-	RTSX_WRITE_REG(chip, arg1, arg2, arg3);
+	retval = rtsx_write_register(chip, arg1, arg2, arg3);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

@@
expression chip;
expression arg1;
expression arg2;
@@

-	RTSX_READ_REG(chip, arg1, arg2);
+	retval = rtsx_read_register(chip, arg1, arg2);
+	if (retval) {
+		rtsx_trace(chip);
+		return retval;
+	}

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:17:05 +01:00
..
general.c
general.h
Kconfig
Makefile staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 2015-03-26 13:16:19 +01:00
ms.c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
ms.h staging: rts5208: Convert variable from int to bool and propagate the change to function parameters 2015-03-06 17:25:01 -08:00
rtsx_card.c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
rtsx_card.h staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
rtsx_chip.c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
rtsx_chip.h staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
rtsx_scsi.c staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 2015-03-26 13:16:19 +01:00
rtsx_scsi.h
rtsx_sys.h
rtsx_transport.c staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 2015-03-26 13:16:19 +01:00
rtsx_transport.h
rtsx.c staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 2015-03-26 13:16:19 +01:00
rtsx.h staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 2015-03-26 13:16:19 +01:00
sd.c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
sd.h staging: rts5208: Convert variable from int to bool and propagate the change to function parameters 2015-03-06 17:25:01 -08:00
spi.c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
spi.h
TODO
trace.c staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 2015-03-26 13:16:19 +01:00
trace.h staging: rts5208: Remove TRACE_RET and TRACE_GOTO macros 2015-03-26 13:16:19 +01:00
xd.c staging: rts5208: Remove RTSX_READ_REG and RTSX_WRITE_REG macros 2015-03-26 13:17:05 +01:00
xd.h