* [PATCH kernel] powerpc/lpar/debug: Initialize flags before printing debug message
@ 2018-01-09 5:52 Alexey Kardashevskiy
2018-02-15 5:44 ` Alexey Kardashevskiy
2018-03-28 14:13 ` [kernel] " Michael Ellerman
0 siblings, 2 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2018-01-09 5:52 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Alexey Kardashevskiy
With enabled DEBUG, there is a compile error:
"error: ‘flags’ is used uninitialized in this function".
This moves pr_devel() little further where @flags are initialized.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
/home/aik/p/guest-kernel/arch/powerpc/platforms/pseries/lpar.c: In function ‘pSeries_lpar_hpte_updatepp’:
/home/aik/p/guest-kernel/include/linux/printk.h:320:2: error: ‘flags’ is used uninitialized in this function [-Werror=un
initialized]
printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
^
/home/aik/p/guest-kernel/arch/powerpc/platforms/pseries/lpar.c:304:16: note: ‘flags’ was declared here
unsigned long flags;
^
---
arch/powerpc/platforms/pseries/lpar.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
index 0ee4a46..1365424 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -306,14 +306,14 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot,
want_v = hpte_encode_avpn(vpn, psize, ssize);
+ flags = (newpp & 7) | H_AVPN;
+ if (mmu_has_feature(MMU_FTR_KERNEL_RO))
+ /* Move pp0 into bit 8 (IBM 55) */
+ flags |= (newpp & HPTE_R_PP0) >> 55;
+
pr_devel(" update: avpnv=%016lx, hash=%016lx, f=%lx, psize: %d ...",
want_v, slot, flags, psize);
- flags = (newpp & 7) | H_AVPN;
- if (mmu_has_feature(MMU_FTR_KERNEL_RO))
- /* Move pp0 into bit 8 (IBM 55) */
- flags |= (newpp & HPTE_R_PP0) >> 55;
-
lpar_rc = plpar_pte_protect(flags, slot, want_v);
if (lpar_rc == H_NOT_FOUND) {
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH kernel] powerpc/lpar/debug: Initialize flags before printing debug message
2018-01-09 5:52 [PATCH kernel] powerpc/lpar/debug: Initialize flags before printing debug message Alexey Kardashevskiy
@ 2018-02-15 5:44 ` Alexey Kardashevskiy
2018-03-28 14:13 ` [kernel] " Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Alexey Kardashevskiy @ 2018-02-15 5:44 UTC (permalink / raw)
To: linuxppc-dev
On 09/01/18 16:52, Alexey Kardashevskiy wrote:
> With enabled DEBUG, there is a compile error:
> "error: ‘flags’ is used uninitialized in this function".
>
> This moves pr_devel() little further where @flags are initialized.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Ping?
> ---
>
> /home/aik/p/guest-kernel/arch/powerpc/platforms/pseries/lpar.c: In function ‘pSeries_lpar_hpte_updatepp’:
> /home/aik/p/guest-kernel/include/linux/printk.h:320:2: error: ‘flags’ is used uninitialized in this function [-Werror=un
> initialized]
> printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
> ^
> /home/aik/p/guest-kernel/arch/powerpc/platforms/pseries/lpar.c:304:16: note: ‘flags’ was declared here
> unsigned long flags;
> ^
> ---
> arch/powerpc/platforms/pseries/lpar.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/powerpc/platforms/pseries/lpar.c
> index 0ee4a46..1365424 100644
> --- a/arch/powerpc/platforms/pseries/lpar.c
> +++ b/arch/powerpc/platforms/pseries/lpar.c
> @@ -306,14 +306,14 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot,
>
> want_v = hpte_encode_avpn(vpn, psize, ssize);
>
> + flags = (newpp & 7) | H_AVPN;
> + if (mmu_has_feature(MMU_FTR_KERNEL_RO))
> + /* Move pp0 into bit 8 (IBM 55) */
> + flags |= (newpp & HPTE_R_PP0) >> 55;
> +
> pr_devel(" update: avpnv=%016lx, hash=%016lx, f=%lx, psize: %d ...",
> want_v, slot, flags, psize);
>
> - flags = (newpp & 7) | H_AVPN;
> - if (mmu_has_feature(MMU_FTR_KERNEL_RO))
> - /* Move pp0 into bit 8 (IBM 55) */
> - flags |= (newpp & HPTE_R_PP0) >> 55;
> -
> lpar_rc = plpar_pte_protect(flags, slot, want_v);
>
> if (lpar_rc == H_NOT_FOUND) {
>
--
Alexey
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [kernel] powerpc/lpar/debug: Initialize flags before printing debug message
2018-01-09 5:52 [PATCH kernel] powerpc/lpar/debug: Initialize flags before printing debug message Alexey Kardashevskiy
2018-02-15 5:44 ` Alexey Kardashevskiy
@ 2018-03-28 14:13 ` Michael Ellerman
1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2018-03-28 14:13 UTC (permalink / raw)
To: Alexey Kardashevskiy, linuxppc-dev; +Cc: Alexey Kardashevskiy
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 411 bytes --]
On Tue, 2018-01-09 at 05:52:14 UTC, Alexey Kardashevskiy wrote:
> With enabled DEBUG, there is a compile error:
> "error: ‘flags’ is used uninitialized in this function".
>
> This moves pr_devel() little further where @flags are initialized.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/a8c0bf3c621e0acc01451e27fe47c4
cheers
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-03-28 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-09 5:52 [PATCH kernel] powerpc/lpar/debug: Initialize flags before printing debug message Alexey Kardashevskiy
2018-02-15 5:44 ` Alexey Kardashevskiy
2018-03-28 14:13 ` [kernel] " Michael Ellerman
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.