Commit 7512ddef authored by YueHaibing's avatar YueHaibing Committed by Martin K. Petersen

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: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3f0b2d74
...@@ -752,7 +752,7 @@ static int mvumi_issue_blocked_cmd(struct mvumi_hba *mhba, ...@@ -752,7 +752,7 @@ static int mvumi_issue_blocked_cmd(struct mvumi_hba *mhba,
spin_lock_irqsave(mhba->shost->host_lock, flags); spin_lock_irqsave(mhba->shost->host_lock, flags);
atomic_dec(&cmd->sync_cmd); atomic_dec(&cmd->sync_cmd);
if (mhba->tag_cmd[cmd->frame->tag]) { if (mhba->tag_cmd[cmd->frame->tag]) {
mhba->tag_cmd[cmd->frame->tag] = 0; mhba->tag_cmd[cmd->frame->tag] = NULL;
dev_warn(&mhba->pdev->dev, "TIMEOUT:release tag [%d]\n", dev_warn(&mhba->pdev->dev, "TIMEOUT:release tag [%d]\n",
cmd->frame->tag); cmd->frame->tag);
tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag); tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag);
...@@ -1794,7 +1794,7 @@ static void mvumi_handle_clob(struct mvumi_hba *mhba) ...@@ -1794,7 +1794,7 @@ static void mvumi_handle_clob(struct mvumi_hba *mhba)
cmd = mhba->tag_cmd[ob_frame->tag]; cmd = mhba->tag_cmd[ob_frame->tag];
atomic_dec(&mhba->fw_outstanding); atomic_dec(&mhba->fw_outstanding);
mhba->tag_cmd[ob_frame->tag] = 0; mhba->tag_cmd[ob_frame->tag] = NULL;
tag_release_one(mhba, &mhba->tag_pool, ob_frame->tag); tag_release_one(mhba, &mhba->tag_pool, ob_frame->tag);
if (cmd->scmd) if (cmd->scmd)
mvumi_complete_cmd(mhba, cmd, ob_frame); 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,7 +2139,7 @@ static enum blk_eh_timer_return mvumi_timed_out(struct scsi_cmnd *scmd)
spin_lock_irqsave(mhba->shost->host_lock, flags); spin_lock_irqsave(mhba->shost->host_lock, flags);
if (mhba->tag_cmd[cmd->frame->tag]) { if (mhba->tag_cmd[cmd->frame->tag]) {
mhba->tag_cmd[cmd->frame->tag] = 0; mhba->tag_cmd[cmd->frame->tag] = NULL;
tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag); tag_release_one(mhba, &mhba->tag_pool, cmd->frame->tag);
} }
if (!list_empty(&cmd->queue_pointer)) if (!list_empty(&cmd->queue_pointer))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment