From: Colin Ian King <colin.king@canonical.com>
To: Vladimir Oltean <olteanv@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: re: net: dsa: sja1105: use detected device id instead of DT one on mismatch
Date: Thu, 6 Aug 2020 17:27:11 +0100 [thread overview]
Message-ID: <60d2d8f9-1376-2047-b958-7bdbbde1538e@canonical.com> (raw)
Hi,
Static analysis with Coverity has detected a potential issue with the
following commit:
commit 0b0e299720bb99428892a23ecbd2b4b7f61ccf6d
Author: Vladimir Oltean <olteanv@gmail.com>
Date: Mon Aug 3 19:48:23 2020 +0300
net: dsa: sja1105: use detected device id instead of DT one on mismatch
The analysis is as follows:
Array compared against 0 (NO_EFFECT)array_null: Comparing an array to
null is not useful: match->compatible, since the test will always
evaluate as true.
Was match->compatible formerly declared as a pointer?
3418 for (match = sja1105_dt_ids; match->compatible; match++) {
3419 const struct sja1105_info *info = match->data;
3420
I'm not sure what the original intention was, so I was unable to fix
this hence I'm sending this report as I think it needs addressing.
Colin
next reply other threads:[~2020-08-06 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-06 16:27 Colin Ian King [this message]
2020-08-06 19:25 ` net: dsa: sja1105: use detected device id instead of DT one on mismatch Vladimir Oltean
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=60d2d8f9-1376-2047-b958-7bdbbde1538e@canonical.com \
--to=colin.king@canonical.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=vivien.didelot@gmail.com \
/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