* [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare()
[not found] <20190224080209.15969-1-himadri18.07@gmail.com>
@ 2019-02-25 9:00 ` Himadri Pandya
2019-02-25 9:00 ` [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Himadri Pandya @ 2019-02-25 9:00 UTC (permalink / raw)
To: benh, paulus, mpe; +Cc: linuxppc-dev, Himadri Pandya
Decrement the reference count on device_node "node" while breaking out
of the loop. Issue identified by Coccinelle.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
---
Changes in V2:
- Change subject line
---
arch/powerpc/kernel/machine_kexec_64.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index a0f6f45005bd..46edde582984 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -65,6 +65,7 @@ int default_machine_kexec_prepare(struct kimage *image)
end = begin + image->segment[i].memsz;
if ((begin < high) && (end > low))
+ of_node_put(node);
return -ETXTBSY;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe()
2019-02-25 9:00 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() Himadri Pandya
@ 2019-02-25 9:00 ` Himadri Pandya
2019-02-25 23:21 ` Tyrel Datwyler
2019-02-25 16:09 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() kbuild test robot
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Himadri Pandya @ 2019-02-25 9:00 UTC (permalink / raw)
To: benh, paulus, mpe; +Cc: linuxppc-dev, Himadri Pandya
Decrement the reference count on device_node "np" while breaking out of
the loop. Issue identified by Coccinelle.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
---
Changes in V2:
- Change subject line
---
arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
index 8112b39879d6..3ee1404ceef4 100644
--- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -220,6 +220,7 @@ void hlwd_pic_probe(void)
irq_set_chained_handler(cascade_virq,
hlwd_pic_irq_cascade);
hlwd_irq_host = host;
+ of_node_put(np);
break;
}
}
@@ -237,4 +238,3 @@ void hlwd_quiesce(void)
__hlwd_quiesce(io_base);
}
-
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare()
2019-02-25 9:00 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() Himadri Pandya
2019-02-25 9:00 ` [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
@ 2019-02-25 16:09 ` kbuild test robot
2019-02-25 23:20 ` Tyrel Datwyler
2019-02-27 9:51 ` [PATCH v3 " Himadri Pandya
3 siblings, 0 replies; 7+ messages in thread
From: kbuild test robot @ 2019-02-25 16:09 UTC (permalink / raw)
To: Himadri Pandya; +Cc: paulus, kbuild-all, Himadri Pandya, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 6279 bytes --]
Hi Himadri,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.0-rc8 next-20190225]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Himadri-Pandya/arch-powerpc-kexec-Add-missing-of_node-put-in-default_machine_kexec_prepare/20190225-233822
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=powerpc
All warnings (new ones prefixed by >>):
arch/powerpc/kernel/machine_kexec_64.c: In function 'default_machine_kexec_prepare':
>> arch/powerpc/kernel/machine_kexec_64.c:67:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if ((begin < high) && (end > low))
^~
arch/powerpc/kernel/machine_kexec_64.c:69:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
return -ETXTBSY;
^~~~~~
vim +/if +67 arch/powerpc/kernel/machine_kexec_64.c
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 34
3d1229d6 arch/powerpc/kernel/machine_kexec_64.c Michael Ellerman 2005-11-14 35 int default_machine_kexec_prepare(struct kimage *image)
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 36 {
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 37 int i;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 38 unsigned long begin, end; /* limits of segment */
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 39 unsigned long low, high; /* limits of blocked memory range */
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 40 struct device_node *node;
a7f67bdf arch/powerpc/kernel/machine_kexec_64.c Jeremy Kerr 2006-07-12 41 const unsigned long *basep;
a7f67bdf arch/powerpc/kernel/machine_kexec_64.c Jeremy Kerr 2006-07-12 42 const unsigned int *sizep;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 43
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 44 /*
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 45 * Since we use the kernel fault handlers and paging code to
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 46 * handle the virtual mode, we must make sure no destination
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 47 * overlaps kernel static data or bss.
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 48 */
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 49 for (i = 0; i < image->nr_segments; i++)
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 50 if (image->segment[i].mem < __pa(_end))
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 51 return -ETXTBSY;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 52
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 53 /* We also should not overwrite the tce tables */
94db7c5e arch/powerpc/kernel/machine_kexec_64.c Anton Blanchard 2011-08-10 54 for_each_node_by_type(node, "pci") {
e2eb6392 arch/powerpc/kernel/machine_kexec_64.c Stephen Rothwell 2007-04-03 55 basep = of_get_property(node, "linux,tce-base", NULL);
e2eb6392 arch/powerpc/kernel/machine_kexec_64.c Stephen Rothwell 2007-04-03 56 sizep = of_get_property(node, "linux,tce-size", NULL);
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 57 if (basep == NULL || sizep == NULL)
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 58 continue;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 59
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 60 low = *basep;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 61 high = low + (*sizep);
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 62
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 63 for (i = 0; i < image->nr_segments; i++) {
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 64 begin = image->segment[i].mem;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 65 end = begin + image->segment[i].memsz;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 66
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 @67 if ((begin < high) && (end > low))
bd754146 arch/powerpc/kernel/machine_kexec_64.c Himadri Pandya 2019-02-25 68 of_node_put(node);
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 69 return -ETXTBSY;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 70 }
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 71 }
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 72
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 73 return 0;
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 74 }
fce0d574 arch/ppc64/kernel/machine_kexec.c R Sharada 2005-06-25 75
:::::: The code at line 67 was first introduced by commit
:::::: fce0d5740322b98b863f9e609f5a9bd4c06703af [PATCH] ppc64: kexec support for ppc64
:::::: TO: R Sharada <sharada@in.ibm.com>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59752 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare()
2019-02-25 9:00 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() Himadri Pandya
2019-02-25 9:00 ` [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
2019-02-25 16:09 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() kbuild test robot
@ 2019-02-25 23:20 ` Tyrel Datwyler
2019-02-27 9:51 ` [PATCH v3 " Himadri Pandya
3 siblings, 0 replies; 7+ messages in thread
From: Tyrel Datwyler @ 2019-02-25 23:20 UTC (permalink / raw)
To: Himadri Pandya, benh, paulus, mpe; +Cc: linuxppc-dev
On 02/25/2019 01:00 AM, Himadri Pandya wrote:
> Decrement the reference count on device_node "node" while breaking out
> of the loop. Issue identified by Coccinelle.
>
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
> Changes in V2:
> - Change subject line
> ---
> arch/powerpc/kernel/machine_kexec_64.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
> index a0f6f45005bd..46edde582984 100644
> --- a/arch/powerpc/kernel/machine_kexec_64.c
> +++ b/arch/powerpc/kernel/machine_kexec_64.c
> @@ -65,6 +65,7 @@ int default_machine_kexec_prepare(struct kimage *image)
> end = begin + image->segment[i].memsz;
>
> if ((begin < high) && (end > low))
> + of_node_put(node);
> return -ETXTBSY;
I think the kbuild robot already caught this, but you need to add { } block
around this if now. Previously it was a one line statement, but adding the
of_node_put() makes it multiple lines that now require { }.
-Tyrel
> }
> }
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe()
2019-02-25 9:00 ` [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
@ 2019-02-25 23:21 ` Tyrel Datwyler
0 siblings, 0 replies; 7+ messages in thread
From: Tyrel Datwyler @ 2019-02-25 23:21 UTC (permalink / raw)
To: Himadri Pandya, benh, paulus, mpe; +Cc: linuxppc-dev
On 02/25/2019 01:00 AM, Himadri Pandya wrote:
> Decrement the reference count on device_node "np" while breaking out of
> the loop. Issue identified by Coccinelle.
>
> Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
> ---
> Changes in V2:
> - Change subject line
> ---
> arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
> index 8112b39879d6..3ee1404ceef4 100644
> --- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
> +++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
> @@ -220,6 +220,7 @@ void hlwd_pic_probe(void)
> irq_set_chained_handler(cascade_virq,
> hlwd_pic_irq_cascade);
> hlwd_irq_host = host;
> + of_node_put(np);
> break;
> }
> }
> @@ -237,4 +238,3 @@ void hlwd_quiesce(void)
>
> __hlwd_quiesce(io_base);
> }
> -
>
This line removal at the end of the patch is likely accidental, but really
should not be here. Otherwise,
Reviewed-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare()
2019-02-25 9:00 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() Himadri Pandya
` (2 preceding siblings ...)
2019-02-25 23:20 ` Tyrel Datwyler
@ 2019-02-27 9:51 ` Himadri Pandya
2019-02-27 9:51 ` [PATCH v3 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
3 siblings, 1 reply; 7+ messages in thread
From: Himadri Pandya @ 2019-02-27 9:51 UTC (permalink / raw)
To: benh, paulus, mpe, tyreld; +Cc: linuxppc-dev, Himadri Pandya
Decrement the reference count on device_node "node" while breaking out
of the loop. Issue identified by Coccinelle.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
---
Changes in V2:
- Change subject line
---
Changes in V3:
- Add braces around the if block
---
arch/powerpc/kernel/machine_kexec_64.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index a0f6f45005bd..ef484a25fc50 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -64,8 +64,10 @@ int default_machine_kexec_prepare(struct kimage *image)
begin = image->segment[i].mem;
end = begin + image->segment[i].memsz;
- if ((begin < high) && (end > low))
+ if ((begin < high) && (end > low)) {
+ of_node_put(node);
return -ETXTBSY;
+ }
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v3 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe()
2019-02-27 9:51 ` [PATCH v3 " Himadri Pandya
@ 2019-02-27 9:51 ` Himadri Pandya
0 siblings, 0 replies; 7+ messages in thread
From: Himadri Pandya @ 2019-02-27 9:51 UTC (permalink / raw)
To: benh, paulus, mpe, tyreld; +Cc: linuxppc-dev, Himadri Pandya
Decrement the reference count on device_node "np" while breaking out of
the loop. Issue identified by Coccinelle.
Signed-off-by: Himadri Pandya <himadri18.07@gmail.com>
---
Changes in V2:
- Change subject line
---
Changes in V3:
- Do not remove the blank line at end of the file
---
arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
index 8112b39879d6..df098989e373 100644
--- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -220,6 +220,7 @@ void hlwd_pic_probe(void)
irq_set_chained_handler(cascade_virq,
hlwd_pic_irq_cascade);
hlwd_irq_host = host;
+ of_node_put(np);
break;
}
}
@@ -232,7 +233,7 @@ void hlwd_pic_probe(void)
*
*/
void hlwd_quiesce(void)
-{
+{i
void __iomem *io_base = hlwd_irq_host->host_data;
__hlwd_quiesce(io_base);
--
2.17.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-02-27 9:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20190224080209.15969-1-himadri18.07@gmail.com>
2019-02-25 9:00 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() Himadri Pandya
2019-02-25 9:00 ` [PATCH v2 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
2019-02-25 23:21 ` Tyrel Datwyler
2019-02-25 16:09 ` [PATCH v2 1/2] arch: powerpc/kexec: Add missing of_node-put() in default_machine_kexec_prepare() kbuild test robot
2019-02-25 23:20 ` Tyrel Datwyler
2019-02-27 9:51 ` [PATCH v3 " Himadri Pandya
2019-02-27 9:51 ` [PATCH v3 2/2] arch: powerpc/hlwd-pic: Add missing of_node-put() in hlwd_pic_probe() Himadri Pandya
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.