summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2021-02-27 21:56:26 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2021-03-09 23:47:17 -0500
commitfd48c056a32ed6e7754c7c475490f3bed54ed378 (patch)
treeb702294fa1ca2c6e7c43ff5ac4abfc6b0334fd5a
parentc151eddbef7eb67322e8187d763953e9c70d4bac (diff)
downloadlwn-fd48c056a32ed6e7754c7c475490f3bed54ed378.tar.gz
lwn-fd48c056a32ed6e7754c7c475490f3bed54ed378.zip
scsi: target: pscsi: Fix warning in pscsi_complete_cmd()
This fixes a compilation warning in pscsi_complete_cmd(): drivers/target/target_core_pscsi.c: In function ‘pscsi_complete_cmd’: drivers/target/target_core_pscsi.c:624:5: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */ Link: https://lore.kernel.org/r/20210228055645.22253-5-chaitanya.kulkarni@wdc.com Reviewed-by: Mike Christie <michael.christie@oracle.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/target/target_core_pscsi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index 3cbc074992bc..689e503e3301 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)
+ if (!buf) {
; /* XXX: TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE */
+ }
if (cdb[0] == MODE_SENSE_10) {
if (!(buf[3] & 0x80))