Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3555052ybl; Tue, 21 Jan 2020 03:00:49 -0800 (PST) X-Google-Smtp-Source: APXvYqwY4jzySpXQAXY8I7rfnaIwX8PVV+liqVvj/IbiZbnvftNyzX2jg+6WdypLVe+bXfVHAFfa X-Received: by 2002:a9d:62c2:: with SMTP id z2mr3197431otk.309.1579604449432; Tue, 21 Jan 2020 03:00:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579604449; cv=none; d=google.com; s=arc-20160816; b=ICMcTL64iD4vSFgGsbBDzgADglxrgjttMFx2jTyH/doMl79MQlYAf/Lv8kZ7ceKnkA RLPkihSMRGH5sS3vh0pIgst9EtaRF981qjQLoH3/sdhg+e4HP2tE57tf13FWOqKD/qJR PzuKGUmV3BlTz/NR6nz6z1umh0XqPKCEgjF3dsZ7M/OUsqPcCa9RVKDuhLxjr1wa3w9p s5fmn9pjlX/bW2ra9WB57pTnVoc00HvUgv15KgQYs3WS0KNFYdljXxnxObQQlmhcr6/2 FoaWDmNz99UTMq1VN47iyoGcjLNghxQy8GAqlgvmzQiwWtLJGoCPpstgmeJmXVJ2DNMi cmRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:cc:to:subject:dkim-signature :dkim-filter; bh=CCXtL4ZaJCU0uf6vOaRECcOyWgMUoLBYKe30olA7sHg=; b=ojIFfzNce+wJeAt/9B/3Me+mLP8LaqfjCd2S8fHa4pjdDVQ7IA/QIrfSVwaVOe1ufM 7Fi0NulU0OFblsH7t3tUDRl6UH7zexDJbjw+pvwYjS/fW7za732HA6kBV+9NI4ylRD3d 8pr3Plt898cbMwqzmkZe9YtxNvXaR4TCX2jz9tK9wRAcxf0GFXjzpAzKgUmKZLON15aQ xGkSCbOUT3IiTQDk1ZTYLGzumf2klZFg5EU5cDSSG4QqVjYO9vTVGnU8RliJ5I2uhpfm YAvadH2Gt3NDFG7IppJU0T+sqf8ngxWgk/ZoY9dFIculyx7z+LzILK8nUiY23/et5ptz kz/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=RmbavHFS; 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=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q15si11558900otk.44.2020.01.21.03.00.38; Tue, 21 Jan 2020 03:00:49 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=RmbavHFS; 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=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728898AbgAUK6h (ORCPT + 99 others); Tue, 21 Jan 2020 05:58:37 -0500 Received: from mailout1.w1.samsung.com ([210.118.77.11]:54566 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728682AbgAUK6g (ORCPT ); Tue, 21 Jan 2020 05:58:36 -0500 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20200121105835euoutp01285605858f5213026dcbca630dc55d8a~r4cF4XF4r1978419784euoutp01P for ; Tue, 21 Jan 2020 10:58:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20200121105835euoutp01285605858f5213026dcbca630dc55d8a~r4cF4XF4r1978419784euoutp01P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1579604315; bh=CCXtL4ZaJCU0uf6vOaRECcOyWgMUoLBYKe30olA7sHg=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=RmbavHFSzSsSsEPiqqYhSzMP8Y1GKNdjuwyTS6THAnvxMm5Pvz752F2SO6NdTSSWJ u+tdvrgMaSAQkbNQayoedEsA6e/xYNDzJTzOFQfeWxJAkE/rPGoIBFpEH9/YiCuodN TdSl+80pcBRxOzKdRaFyullM6GGuomxgti4ogFe0= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20200121105835eucas1p276d1c29c86d045d9e369e324ee511bb7~r4cFrWQiH2701927019eucas1p2s; Tue, 21 Jan 2020 10:58:35 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 95.9C.60679.B59D62E5; Tue, 21 Jan 2020 10:58:35 +0000 (GMT) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200121105834eucas1p262277e5d831ef8a054d9069aa7c5213e~r4cFY8qp_0767507675eucas1p2p; Tue, 21 Jan 2020 10:58:34 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200121105834eusmtrp219550d81668a6801927bb2b71958b528~r4cFYWWpn2884128841eusmtrp2P; Tue, 21 Jan 2020 10:58:34 +0000 (GMT) X-AuditID: cbfec7f4-0e5ff7000001ed07-0f-5e26d95bbbbe Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id C3.97.08375.A59D62E5; Tue, 21 Jan 2020 10:58:34 +0000 (GMT) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200121105834eusmtip2b87fdc273175b7e00c510474fb766d42~r4cFHN7Jw2149421494eusmtip2I; Tue, 21 Jan 2020 10:58:34 +0000 (GMT) Subject: Re: [PATCH -next] ata: pata_macio: fix comparing pointer to 0 To: Chen Zhou Cc: axboe@kernel.dk, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org From: Bartlomiej Zolnierkiewicz Message-ID: Date: Tue, 21 Jan 2020 11:58:32 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20200121012827.1036-1-chenzhou10@huawei.com> Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAKsWRmVeSWpSXmKPExsWy7djP87rRN9XiDPoeMVusvtvPZnGh/SWr xbEdj5gsLu+aw+bA4tFy5C2rx+WzpR6fN8kFMEdx2aSk5mSWpRbp2yVwZcxb3cNW8IO9omfN S/YGxi1sXYycHBICJhIr/m5j7mLk4hASWMEosXLSOxYI5wujxLOuG+wQzmdGie51newwLVMm L4NKLGeU2P/+KpTzllGi4ecMJpAqYQE3iR13GplBbBEBVYklfxaCdTML+EicmN/NCGKzCVhJ TGxfBWbzCthJrHjQAlTDwcECVL96Bh9IWFQgQuLTg8OsECWCEidnPmEBKeEEan293wdiorjE rSfzmSBseYntb+eAvSMh0M4usXxFDzPE0S4SvXPaoR4Qlnh1fAuULSPxfydIM0jDOkaJvx0v oLq3M0osn/wPGkrWEnfO/WID2cwsoCmxfpc+RNhR4nBjB9hBEgJ8EjfeCkIcwScxadt0Zogw r0RHmxBEtZrEhmUb2GDWdu1cyTyBUWkWks9mIXlnFpJ3ZiHsXcDIsopRPLW0ODc9tdgoL7Vc rzgxt7g0L10vOT93EyMwnZz+d/zLDsZdf5IOMQpwMCrx8L6YrBonxJpYVlyZe4hRgoNZSYR3 QRNQiDclsbIqtSg/vq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qtSb5VYijMSDbWYi4oTAcq9++i0AgAA X-CMS-MailID: 20200121105834eucas1p262277e5d831ef8a054d9069aa7c5213e X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200121013332eucas1p223fe0dd6da9ac002f3d5dd152d4ea7a8 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200121013332eucas1p223fe0dd6da9ac002f3d5dd152d4ea7a8 References: <20200121012827.1036-1-chenzhou10@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/21/20 2:28 AM, Chen Zhou wrote: > Fixes coccicheck warning: > > ./drivers/ata/pata_macio.c:982:31-32: > WARNING comparing pointer to 0, suggest !E > > Compare pointer-typed values to NULL rather than 0. > > Signed-off-by: Chen Zhou Acked-by: Bartlomiej Zolnierkiewicz Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/ata/pata_macio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c > index 1bfd015..e47a282 100644 > --- a/drivers/ata/pata_macio.c > +++ b/drivers/ata/pata_macio.c > @@ -979,7 +979,7 @@ static void pata_macio_invariants(struct pata_macio_priv *priv) > priv->aapl_bus_id = bidp ? *bidp : 0; > > /* Fixup missing Apple bus ID in case of media-bay */ > - if (priv->mediabay && bidp == 0) > + if (priv->mediabay && !bidp) > priv->aapl_bus_id = 1; > } >