Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1388742yba; Sat, 6 Apr 2019 10:55:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqxyWWwb+iu91iI0/ZS83jhdoLJc25ctmhwPbFU7vUWlK05OHEU0HovUJJog7kLo9C6Z0SyZ X-Received: by 2002:a17:902:8643:: with SMTP id y3mr19838898plt.187.1554573304988; Sat, 06 Apr 2019 10:55:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554573304; cv=none; d=google.com; s=arc-20160816; b=pxPZCy1wCpK6/r+0s005MAXWwyc8r9xl87WJhC1IhKk7tTTV3oyoemcrIGle1eTp+Q 4jgkp0vxRfgejfb3s0mKW0IrHkdnDqkuEM/972Ar/PBzjSi8T7wKO69L8qZmdw9e4fhB pMJpFBx9aepD1M8sLvPGFK4ho3uJaEYeprMm8E9TfN8w7cvOuhAGbS1zjaRzq6PQmTdq KP2GHM+0B399YR7CF+LWP2/nH42gfHbDX/nj+9NtvEl5fe14Za4zVsY+Ya4XnyKwbVQQ 4CIR0so+SgSOHdCtJCXOTL8h1FJZw7F43lfzR2XRCktria4oPhUmGFLQh+GYxX2rnutr eebg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:to:from:date:dkim-signature; bh=aD2HjI9W9IwT9IWFkRrNIUc8XeEIECdZY1AjG2eNveM=; b=lHChhD0agydicMZdHMNQ6p1TtB0p3AvTDohjiJ7SMo0xOwCvhQwtz0eVOyA+v9dsH4 eoZUcPmrWiy1DrUUjCz0RYdpi69ZNG9zfGy36/Kk03X6CnBTNOHkJmO5uiHRspBRllDi tPE6h8jZHwbMKwNSqsgePJuLhGOMQK3Qomr+4Vk1FH8j3A25GPrvSZuZ2KlAXfrMoab3 U/DcEFo88Y+rldG4L/iIIHJS6XkAA4SR/AbvDyHIvlLXo7UDadtCQmblv7ICH3aYmQLr U8IDwfVaIZMj/AreT7v6X7K8jsVrgMl1ClPpT9JXHIvGU1aDq/QRCeKoyFvfiBad41J4 kkSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rafsCdSI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q1si18509391pgh.396.2019.04.06.10.54.36; Sat, 06 Apr 2019 10:55:04 -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=@gmail.com header.s=20161025 header.b=rafsCdSI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726580AbfDFRxh (ORCPT + 99 others); Sat, 6 Apr 2019 13:53:37 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:45485 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726458AbfDFRxh (ORCPT ); Sat, 6 Apr 2019 13:53:37 -0400 Received: by mail-pg1-f194.google.com with SMTP id y3so4796103pgk.12; Sat, 06 Apr 2019 10:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mime-version:content-disposition :user-agent; bh=aD2HjI9W9IwT9IWFkRrNIUc8XeEIECdZY1AjG2eNveM=; b=rafsCdSIVAbCXLDRanlnwv5F7m1VT8xTIjE+zOsADENewYrpxKbd/6xQf2oWsDTEWE /37bsy9CP2zZqLHLBDFyATi5EPze4NxtpUlQXXc9UcLYFh7ktnUxVji3eTmCW+GzV842 9fUmWDFlp8vJ726ockRtVlUcTk9FBlI69Duh4zhWGqlIbuYK7IO87mcWotv5dSl0ynPg vkY3uqiaHETrsEtzoXzo1ovCwaeFMr5ZLM0J/LUpBKrhf8uiWFn0ttHjRY9S7zUxto1H /p/tTP8LN/fmwDktqPyGnCBkzaxYiZTAF5Ymlb+ruRLrKikm6caCE21ienDCpIg0XDIy Aw4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=aD2HjI9W9IwT9IWFkRrNIUc8XeEIECdZY1AjG2eNveM=; b=tAIMOPCXdmNJ8/+BRHhI1wFTk6i5djhNEdQvYyfr4t8ne8ylE6YeSGD3tbxp9GxhjX QlGHmOz3cN/LKzamb9gn5KOHyBvOARyu89gPf/m6wv/zT4ztJwT1OpB7pbfUq/Y7v03M rG6k/Jqvuz0kyt/8kfMW83FWXZc4dgB8Gflt52g7QU27RvNX1+UU1WvMYy9MDDoQIORT K0sTSpVCePQzRSCl/QiTW8Bf3KmziiWd/aKdUFYENFKwO2+zrRveIuwY2WQvJvDV6r6Y dqqkf8mhb0VwMm6LYXq40g5vx9e/Q3jmqpfIMmyBGJ4TUyNs0YV7V/5RROIOLMhUhm4F DYYg== X-Gm-Message-State: APjAAAUwB3+k2+8LyjRqOsIsTYn7YUSrrOgM5MiY7W64x6tLicAkUzLe HnGoxybIFqMMQ412SOTcTdk= X-Received: by 2002:a62:2fc7:: with SMTP id v190mr18271670pfv.10.1554573216314; Sat, 06 Apr 2019 10:53:36 -0700 (PDT) Received: from hari-Inspiron-1545 ([183.83.91.90]) by smtp.gmail.com with ESMTPSA id n21sm30033458pfb.42.2019.04.06.10.53.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 06 Apr 2019 10:53:35 -0700 (PDT) Date: Sat, 6 Apr 2019 23:23:31 +0530 From: Hariprasad Kelam To: "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: mvumi: fix warning Using plain integer as NULL pointer Message-ID: <20190406175331.GA22504@hari-Inspiron-1545> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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)) -- 2.7.4