forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wpointer-bool-conversion in drivers/net/dsa/sja1105/sja1105_main.c #1139
Labels
-Wpointer-bool-conversion
[BUG] linux
A bug that should be fixed in the mainline kernel.
[FIXED][LINUX] 5.9
This bug was fixed in Linux 5.9
Comments
fengguang
pushed a commit
to 0day-ci/linux
that referenced
this issue
Aug 21, 2020
…_check_device_id Clang warns: drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of array 'match->compatible' will always evaluate to 'true' [-Wpointer-bool-conversion] for (match = sja1105_dt_ids; match->compatible; match++) { ~~~ ~~~~~~~^~~~~~~~~~ 1 warning generated. We should check the value of the first character in compatible to see if it is empty or not. This matches how the rest of the tree iterates over IDs. Fixes: 0b0e299 ("net: dsa: sja1105: use detected device id instead of DT one on mismatch") Link: ClangBuiltLinux#1139 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
mingkaihu
pushed a commit
to nxp-archive/openil_linux
that referenced
this issue
Aug 24, 2020
…_check_device_id Clang warns: drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of array 'match->compatible' will always evaluate to 'true' [-Wpointer-bool-conversion] for (match = sja1105_dt_ids; match->compatible; match++) { ~~~ ~~~~~~~^~~~~~~~~~ 1 warning generated. We should check the value of the first character in compatible to see if it is empty or not. This matches how the rest of the tree iterates over IDs. Fixes: 0b0e299720bb ("net: dsa: sja1105: use detected device id instead of DT one on mismatch") Link: ClangBuiltLinux/linux#1139 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
idosch
pushed a commit
to jpirko/linux_mlxsw
that referenced
this issue
Aug 25, 2020
…_check_device_id Clang warns: drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of array 'match->compatible' will always evaluate to 'true' [-Wpointer-bool-conversion] for (match = sja1105_dt_ids; match->compatible; match++) { ~~~ ~~~~~~~^~~~~~~~~~ 1 warning generated. We should check the value of the first character in compatible to see if it is empty or not. This matches how the rest of the tree iterates over IDs. Fixes: 0b0e299 ("net: dsa: sja1105: use detected device id instead of DT one on mismatch") Link: ClangBuiltLinux/linux#1139 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Merged into mainline: https://git.kernel.org/linus/5978fac03ea3faf793dffeedcbe60dd8da673f89 |
larrygwinn
pushed a commit
to nxp-auto-linux/linux
that referenced
this issue
Aug 12, 2022
…_check_device_id Clang warns: drivers/net/dsa/sja1105/sja1105_main.c:3418:38: warning: address of array 'match->compatible' will always evaluate to 'true' [-Wpointer-bool-conversion] for (match = sja1105_dt_ids; match->compatible; match++) { ~~~ ~~~~~~~^~~~~~~~~~ 1 warning generated. We should check the value of the first character in compatible to see if it is empty or not. This matches how the rest of the tree iterates over IDs. Fixes: 0b0e299 ("net: dsa: sja1105: use detected device id instead of DT one on mismatch") Link: ClangBuiltLinux/linux#1139 Signed-off-by: Nathan Chancellor <natechancellor@gmail.com> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Acked-by: Vladimir Oltean <olteanv@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> (cherry picked from commit 5978fac) Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
-Wpointer-bool-conversion
[BUG] linux
A bug that should be fixed in the mainline kernel.
[FIXED][LINUX] 5.9
This bug was fixed in Linux 5.9
Patch submitted: https://lore.kernel.org/r/20200821222515.414167-1-natechancellor@gmail.com
The text was updated successfully, but these errors were encountered: