Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: core: Fix a compiler warning triggered by the SCSI logging code

This patch fixes the following compiler warning:

In file included from drivers/scsi/scsi_error.c:46:
drivers/scsi/scsi_error.c: In function 'scsi_eh_target_reset':
drivers/scsi/scsi_logging.h:65:81: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
65 | LOGGING(SCSI_LOG_ERROR_SHIFT, SCSI_LOG_ERROR_BITS, LEVEL,CMD);
| ^

drivers/scsi/scsi_error.c:1562:4: note: in expansion of macro 'SCSI_LOG_ERROR_RECOVERY'
1562 | SCSI_LOG_ERROR_RECOVERY(3,
| ^~~~~~~~~~~~~~~~~~~~~~~

Link: https://lore.kernel.org/r/20191209174205.190025-1-bvanassche@acm.org
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Bart Van Assche and committed by
Martin K. Petersen
43d23b94 0786669c

+1 -1
+1 -1
drivers/scsi/scsi_logging.h
··· 53 53 } while (0) 54 54 #else 55 55 #define SCSI_LOG_LEVEL(SHIFT, BITS) 0 56 - #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) 56 + #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) do { } while (0) 57 57 #endif /* CONFIG_SCSI_LOGGING */ 58 58 59 59 /*