* [PATCH] Fix a compiler warning triggered by the SCSI logging code
@ 2019-12-09 17:42 Bart Van Assche
2019-12-19 23:36 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Bart Van Assche @ 2019-12-09 17:42 UTC (permalink / raw)
To: Martin K . Petersen, James E . J . Bottomley; +Cc: linux-scsi, Bart Van Assche
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,
| ^~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
drivers/scsi/scsi_logging.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/scsi_logging.h b/drivers/scsi/scsi_logging.h
index 836185de28c4..3df877886119 100644
--- a/drivers/scsi/scsi_logging.h
+++ b/drivers/scsi/scsi_logging.h
@@ -53,7 +53,7 @@ do { \
} while (0)
#else
#define SCSI_LOG_LEVEL(SHIFT, BITS) 0
-#define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD)
+#define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD) do { } while (0)
#endif /* CONFIG_SCSI_LOGGING */
/*
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix a compiler warning triggered by the SCSI logging code
2019-12-09 17:42 [PATCH] Fix a compiler warning triggered by the SCSI logging code Bart Van Assche
@ 2019-12-19 23:36 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2019-12-19 23:36 UTC (permalink / raw)
To: Bart Van Assche; +Cc: Martin K . Petersen, James E . J . Bottomley, linux-scsi
Bart,
> 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);
> | ^
Applied to 5.6/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-19 23:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-09 17:42 [PATCH] Fix a compiler warning triggered by the SCSI logging code Bart Van Assche
2019-12-19 23:36 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).