linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mukesh Ojha <mojha@codeaurora.org>
To: Hariprasad Kelam <hariprasad.kelam@gmail.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: mvumi: fix warning Using plain integer as NULL pointer
Date: Sun, 7 Apr 2019 11:44:06 +0530	[thread overview]
Message-ID: <c84ef8f8-5a3d-4027-5f92-edb3544fecde@codeaurora.org> (raw)
In-Reply-To: <20190406175331.GA22504@hari-Inspiron-1545>


On 4/6/2019 11:23 PM, Hariprasad Kelam wrote:
> Changed "0 to NULL" to avoid below sparse warnings
>
> drivers/scsi/mvumi.c:755:58: warning: Using plain integer as NULL
> pointer
> drivers/scsi/mvumi.c:1797:48: warning: Using plain integer as NULL
> pointer
> drivers/scsi/mvumi.c:2142:50: warning: Using plain integer as NULL
> pointer
>
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>

Cheers,
-Mukesh

> ---
>   drivers/scsi/mvumi.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/mvumi.c b/drivers/scsi/mvumi.c
> index 3df0269..a541061 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,
>   		spin_lock_irqsave(mhba->shost->host_lock, flags);
>   		atomic_dec(&cmd->sync_cmd);
>   		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",
>   							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)
>   		cmd = mhba->tag_cmd[ob_frame->tag];
>   
>   		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);
>   		if (cmd->scmd)
>   			mvumi_complete_cmd(mhba, cmd, ob_frame);
> @@ -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);
>   
>   	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);
>   	}
>   	if (!list_empty(&cmd->queue_pointer))

  reply	other threads:[~2019-04-07  6:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-06 17:53 [PATCH] scsi: mvumi: fix warning Using plain integer as NULL pointer Hariprasad Kelam
2019-04-07  6:14 ` Mukesh Ojha [this message]
2019-04-09  1:34 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c84ef8f8-5a3d-4027-5f92-edb3544fecde@codeaurora.org \
    --to=mojha@codeaurora.org \
    --cc=hariprasad.kelam@gmail.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).