[PATCH] powerpc/pci: fix warning comparing pointer to 0

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE1970d LANDED

Landed in mainline as 7a0fdc19f241 on 2021-03-29.

2 messages, 2 authors, 2021-03-31 · open the first message on its own page

[PATCH] powerpc/pci: fix warning comparing pointer to 0

From: Jiapeng Chong <hidden>
Date: 2021-03-15 07:36:16

Fix the following coccicheck warning:

./arch/powerpc/platforms/maple/pci.c:37:16-17: WARNING comparing pointer
to 0.

Reported-by: Abaci Robot <redacted>
Signed-off-by: Jiapeng Chong <redacted>
---
 arch/powerpc/platforms/maple/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/maple/pci.c b/arch/powerpc/platforms/maple/pci.c
index a20b957..37875e4 100644
--- a/arch/powerpc/platforms/maple/pci.c
+++ b/arch/powerpc/platforms/maple/pci.c
@@ -34,7 +34,7 @@
 
 static int __init fixup_one_level_bus_range(struct device_node *node, int higher)
 {
-	for (; node != 0;node = node->sibling) {
+	for (; node; node = node->sibling) {
 		const int *bus_range;
 		const unsigned int *class_code;
 		int len;
-- 
1.8.3.1

Re: [PATCH] powerpc/pci: fix warning comparing pointer to 0

From: Michael Ellerman <hidden>
Date: 2021-03-31 01:11:02

On Mon, 15 Mar 2021 15:35:24 +0800, Jiapeng Chong wrote:
Fix the following coccicheck warning:

./arch/powerpc/platforms/maple/pci.c:37:16-17: WARNING comparing pointer
to 0.
Applied to powerpc/next.

[1/1] powerpc/pci: fix warning comparing pointer to 0
      https://git.kernel.org/powerpc/c/7a0fdc19f2415683f403abee7bb87085d0c624ad

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help