From: Arnd Bergmann <a...@arndb.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 <a...@arndb.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

Reply via email to