Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1766009yba; Sat, 6 Apr 2019 23:16:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqyFgyqa9cl45VMdT93NBwm5RLWadtjvvW7E6B6VS/xYkTyk3Lo3Iz1cbER2aglt4RPuXhRE X-Received: by 2002:aa7:9088:: with SMTP id i8mr22734934pfa.118.1554617790184; Sat, 06 Apr 2019 23:16:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554617790; cv=none; d=google.com; s=arc-20160816; b=BuKBo+hnMjJrLFZjp8hQ5o7UjRb1MEkwsn1LiIu35oKvf2+lQkncvuDfjgzebYNG8m WlWJXteGaOkExG87cWZGxf72UjgkaaOCB4L6OZyBl561LBSOvyuuVOzholfLRsxFcowD gk+r8fcjagq+QSSI+o2flmK4BY5SyonNoXyV2Mz4TPlnxCuteDol2QT6oYcyxRk33XNB gPUKINmJ9CYhMqauV+PjNMzrucnSm8bvn07vtrPtnijC7AgQWAjvZVypcDRD4AJ5X2OE SnHhJSLksgeyFsVd1UCyYgt68TDivTmxIxKcfoiQCHOLi7sSwu5Ldj2tkvYWbVQ6SmAp j3jQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dmarc-filter:dkim-signature :dkim-signature; bh=5MzDn3ga2zSzm+kLWM3pZZLHpEFI+Gz3RwgquA6/iTE=; b=uLsrxdTSFoolOcql/kSghZ2SaN3bw83T5pqmrKnisXqrW3gx8Ia/KFUB8eIQ/qKEo/ gzy2fxAPSQNQnUMObCwtJ/46YYL8deFRsKiSBXK/grjiKMyEvgYNV5I6O07iHqitbyLz 59MUQd75ECKb4gWORqKVVMJkelXKyr6Rk8Ln3ZsegVdPwHDo7rTyw3ivBLuwZkh8RgNy W0cC4Gkt3/eIpkGjK+zsq/Dk9J7k7dvfIeaOAdIo4ybplj2eYm8c23UdqYijMddyHcAo GIYXfbIkcnTl94HEGEwXEIk4+tigUgscVep9yIN2nOOj7KpDYIEg3VBsVqmZHvKUA5NF LBTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PvdsuIic; dkim=pass header.i=@codeaurora.org header.s=default header.b=EoiwYruP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z4si23264332plo.166.2019.04.06.23.16.14; Sat, 06 Apr 2019 23:16:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PvdsuIic; dkim=pass header.i=@codeaurora.org header.s=default header.b=EoiwYruP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726239AbfDGGOT (ORCPT + 99 others); Sun, 7 Apr 2019 02:14:19 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:58816 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725902AbfDGGOT (ORCPT ); Sun, 7 Apr 2019 02:14:19 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 5868260A4E; Sun, 7 Apr 2019 06:14:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554617658; bh=+5XYTpOTJVruRV++m8AeJBSwFkQFMD2B4o3UfQMoAGw=; h=Subject:To:References:From:Date:In-Reply-To:From; b=PvdsuIic6YhblHWDy3J4Rdz8Pb5YXSuclQISoQdEzQIQ5B7NpNSWiIkwr5bFtfl2c cpVBOUjXHxsP4IN4SNcqk2MkyVT/ftwsGgfC6DWuOgcDUs72Qi2bW4x1iy6/GD0qQF yl45s+/RVwHn1U1ANLEv2Zl+RqBZkPNrKSCVWe2w= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from [10.79.171.6] (blr-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.18.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mojha@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0C6CE6044E; Sun, 7 Apr 2019 06:14:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1554617657; bh=+5XYTpOTJVruRV++m8AeJBSwFkQFMD2B4o3UfQMoAGw=; h=Subject:To:References:From:Date:In-Reply-To:From; b=EoiwYruPg+7JdizjT0Af9maeN9lZPEvxr5sGv4A4F9jDN10hqihGB+VikTwXoeQEx Y7B/YXaTYPs7/FI7/5hc9GIxE7VVYlUiVJP3s7HMoCF+ld7cYUGm6AIA/ltPmSThYC d7VgrerHaXmvLXMmIgOlz1skWs8r8J+d5VbvC+ZM= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0C6CE6044E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mojha@codeaurora.org Subject: Re: [PATCH] scsi: mvumi: fix warning Using plain integer as NULL pointer To: Hariprasad Kelam , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190406175331.GA22504@hari-Inspiron-1545> From: Mukesh Ojha Message-ID: Date: Sun, 7 Apr 2019 11:44:06 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190406175331.GA22504@hari-Inspiron-1545> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Mukesh Ojha 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))