Skip to content

Commit

Permalink
scsi: target: pscsi: Fix warning in pscsi_complete_cmd()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ChaitanayaKulkarni authored and martinkpetersen committed Mar 10, 2021
1 parent c151edd commit fd48c05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/target/target_core_pscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit fd48c05

Please sign in to comment.