diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-02-16 05:01:30 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-03-19 17:46:16 -0400 |
commit | 7512ddef63075605ecc25fee86940a1452fcbe49 (patch) | |
tree | 1259c79e75e1a7ecec3c113e94382919403bc973 | |
parent | 3f0b2d74210053ce1e773c0376cd9509ea95b780 (diff) |
scsi: mvumi: Stop using plain integer as NULL pointer
Fix following sparse warning:
drivers/scsi/mvumi.c:1797:48: warning: Using plain integer as NULL pointer
drivers/scsi/mvumi.c:2143:50: warning: Using plain integer as NULL pointer
drivers/scsi/mvumi.c:755:58: warning: Using plain integer as NULL pointer
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/mvumi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c index 3df02691a092..a5410615edac 100644 --- a/drivers/scsi/mvumi.c +++ b/drivers/scsi/mvumi.c | |||
@@ -752,7 +752,7 @@ static int mvumi_issue_blocked_cmd(struct mvumi_hba *mhba, | |||
752 | spin_lock_irqsave(mhba->shost->host_lock, flags); | 752 | spin_lock_irqsave(mhba->shost->host_lock, flags); |
753 | atomic_dec(&cmd->sync_cmd); | 753 | atomic_dec(&cmd->sync_cmd); |
754 | if (mhba->tag_cmd[cmd->frame->tag]) { | 754 | if (mhba->tag_cmd[cmd->frame->tag]) { |
755 | mhba->tag_cmd[cmd->frame->tag] = 0; | 755 | mhba->tag_cmd[cmd->frame->tag] = NULL; |
756 | dev_warn(&mhba->pdev->dev, "TIMEOUT:release tag [%d]\n", | 756 | dev_warn(&mhba->pdev->dev, "TIMEOUT:release tag [%d]\n", |
757 | cmd->frame->tag); | 757 | cmd->frame->tag); |
758 | tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag); | 758 | tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag); |
@@ -1794,7 +1794,7 @@ static void mvumi_handle_clob(struct mvumi_hba *mhba) | |||
1794 | cmd = mhba->tag_cmd[ob_frame->tag]; | 1794 | cmd = mhba->tag_cmd[ob_frame->tag]; |
1795 | 1795 | ||
1796 | atomic_dec(&mhba->fw_outstanding); | 1796 | atomic_dec(&mhba->fw_outstanding); |
1797 | mhba->tag_cmd[ob_frame->tag] = 0; | 1797 | mhba->tag_cmd[ob_frame->tag] = NULL; |
1798 | tag_release_one(mhba, &mhba->tag_pool, ob_frame->tag); | 1798 | tag_release_one(mhba, &mhba->tag_pool, ob_frame->tag); |
1799 | if (cmd->scmd) | 1799 | if (cmd->scmd) |
1800 | mvumi_complete_cmd(mhba, cmd, ob_frame); | 1800 | mvumi_complete_cmd(mhba, cmd, ob_frame); |
@@ -2139,7 +2139,7 @@ static enum blk_eh_timer_return mvumi_timed_out(struct scsi_cmnd *scmd) | |||
2139 | spin_lock_irqsave(mhba->shost->host_lock, flags); | 2139 | spin_lock_irqsave(mhba->shost->host_lock, flags); |
2140 | 2140 | ||
2141 | if (mhba->tag_cmd[cmd->frame->tag]) { | 2141 | if (mhba->tag_cmd[cmd->frame->tag]) { |
2142 | mhba->tag_cmd[cmd->frame->tag] = 0; | 2142 | mhba->tag_cmd[cmd->frame->tag] = NULL; |
2143 | tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag); | 2143 | tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag); |
2144 | } | 2144 | } |
2145 | if (!list_empty(&cmd->queue_pointer)) | 2145 | if (!list_empty(&cmd->queue_pointer)) |