From: Chen Zhou <chenzhou10@huawei.com>
To: <b.zolnierkie@samsung.com>, <axboe@kernel.dk>
Cc: <linux-ide@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<chenzhou10@huawei.com>
Subject: [PATCH -next] ata: pata_macio: fix comparing pointer to 0
Date: Tue, 21 Jan 2020 09:28:27 +0800 [thread overview]
Message-ID: <20200121012827.1036-1-chenzhou10@huawei.com> (raw)
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 <chenzhou10@huawei.com>
---
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;
}
--
2.7.4
next reply other threads:[~2020-01-21 1:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20200121013332eucas1p223fe0dd6da9ac002f3d5dd152d4ea7a8@eucas1p2.samsung.com>
2020-01-21 1:28 ` Chen Zhou [this message]
2020-01-21 10:58 ` Bartlomiej Zolnierkiewicz
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=20200121012827.1036-1-chenzhou10@huawei.com \
--to=chenzhou10@huawei.com \
--cc=axboe@kernel.dk \
--cc=b.zolnierkie@samsung.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®