[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210322114441.3479365-1-arnd@kernel.org>
Date: Mon, 22 Mar 2021 12:44:34 +0100
From: Arnd Bergmann <arnd@...nel.org>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Arnd Bergmann <arnd@...db.de>, Jens Axboe <axboe@...nel.dk>,
Chaitanya Kulkarni <chaitanya.kulkarni@....com>,
Hannes Reinecke <hare@...e.de>,
Bodo Stroesser <bstroesser@...fujitsu.com>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
Guoqing Jiang <guoqing.jiang@...ud.ionos.com>,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] target: pscsi: avoid Wempty-body warning
From: Arnd Bergmann <arnd@...db.de>
Building with 'make W=1' shows a harmless warning for pscsi:
drivers/target/target_core_pscsi.c: In function 'pscsi_complete_cmd':
drivers/target/target_core_pscsi.c:624:33: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
624 | ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */
| ^
Rework the coding style as suggested by gcc to avoid the warning.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/target/target_core_pscsi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 3cbc074992bc..913b092955f6 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -620,8 +620,9 @@ static void pscsi_complete_cmd(struct se_cmd *cmd, u8 scsi_status,
unsigned char *buf;
buf = transport_kmap_data_sg(cmd);
- if (!buf)
- ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */
+ if (!buf) {
+ /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */
+ }
if (cdb[0] == MODE_SENSE_10) {
if (!(buf[3] & 0x80))
--
2.29.2
Powered by blists - more mailing lists