Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp521174ybg; Wed, 3 Jun 2020 06:56:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHU6RFYbqRva588aJ93W5fIZeHwIsn46J4JkXQHLNns9G28I+hyyZJRZd24x4jSwHbCy+D X-Received: by 2002:a05:6402:158b:: with SMTP id c11mr31232609edv.29.1591192570823; Wed, 03 Jun 2020 06:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591192570; cv=none; d=google.com; s=arc-20160816; b=Lu1PYavMA54zxSwzARhsGC1Yaa4VQTBaC3oPzYhMYMZqT8XTSk8C8rzron1GAZXSBK vPdp0YmZpz+3yFtX+kf58lUSdJ+pL2nYcV80xoQn3raiFTuO5Lq0E1crCECPt9JOagUR cmO3KvSLnIDHV7onpE0l96MlYJhG6y1xJKvqP+TdhV9HSrMx96EXELx9gAhOK3TqMwoG qoAcih75PPM+lCBVmfbdjfbkVNuNlh4FoxBw/y694KMhrCBx8J6aTd65BFsoBiWkEE3X UYWaKZOuQ8lJG/xJ1kYCVcQSAX4+k50W/94KLe2dfdiEbCgzIsgFZ3mIfELuNUbMOyG/ QpKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=NPP4fqmUkfSEzleWNXnldW7lKlN54MZJ+9e5/8nTk3I=; b=QXhd74gKp/nsx3BMCD8dtcE49vqNBxby1CXlGMu/3z2AGTDn7+jMZpVmDjsiq2h2l+ iY/x0PRsOGf7A+TM1xQMgpfEPYJkTlE/0yssBt3DOc1sDKnVfo0eBn923fpehZTDl1/c 7Mam5+SKOpQYDiEHv+1VHKLTNLkGJpzbdVN6VHSZ391wK0izqp4bAlEgwfs3Kh4u/bwJ b9/klzOjyrYbYQLfn3wH0PdODXdVZNsnhMRUjJ27gyjvnZK0h2ght6X3H4pMzyPC/c4P y80UmJbD2j1C59z6KRSLfq5znhW8Xf3nmIL1RNDSI3mDWdBXkGrduwIHlAopciorv9yW Gyiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n26si1123474ejs.688.2020.06.03.06.55.47; Wed, 03 Jun 2020 06:56:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726103AbgFCNvk (ORCPT + 99 others); Wed, 3 Jun 2020 09:51:40 -0400 Received: from mga11.intel.com ([192.55.52.93]:33487 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725882AbgFCNvk (ORCPT ); Wed, 3 Jun 2020 09:51:40 -0400 IronPort-SDR: DsN0y61Xs6ZH4srtPzbK4n/gjheE0Ois0c8Y25do0ilmfccxcUSSBp9K4WzRxaQlgfp1SF/0bf LqMV9B10mM/Q== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jun 2020 06:51:39 -0700 IronPort-SDR: catGTPvQvQK+7mQSyl66XozjADBtn4hRlUTcrYgCvxFUFmManVSiAbf9+u2MvVXhHuig3+r5Sn lIIA0JZnKQag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,467,1583222400"; d="scan'208";a="269082010" Received: from marshy.an.intel.com ([10.122.105.159]) by orsmga003.jf.intel.com with ESMTP; 03 Jun 2020 06:51:38 -0700 From: richard.gong@linux.intel.com To: gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, richard.gong@linux.intel.com, Richard Gong Subject: [PATCHv1] firmware: stratix10-rsu: fix warnings Date: Wed, 3 Jun 2020 09:06:52 -0500 Message-Id: <1591193212-15082-1-git-send-email-richard.gong@linux.intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Richard Gong Patch fixes sparse warnings: using plain integer as NULL pointer. Replaces equal to with logical not operator. Reported-by: kbuild test robot Signed-off-by: Richard Gong --- drivers/firmware/stratix10-rsu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/stratix10-rsu.c b/drivers/firmware/stratix10-rsu.c index 4379475..469b8f7 100644 --- a/drivers/firmware/stratix10-rsu.c +++ b/drivers/firmware/stratix10-rsu.c @@ -290,7 +290,7 @@ static ssize_t reboot_image_store(struct device *dev, unsigned long address; int ret; - if (priv == 0) + if (!priv) return -ENODEV; ret = kstrtoul(buf, 0, &address); @@ -315,7 +315,7 @@ static ssize_t notify_store(struct device *dev, unsigned long status; int ret; - if (priv == 0) + if (!priv) return -ENODEV; ret = kstrtoul(buf, 0, &status); -- 2.7.4