From: Cédric Le Goater <clg@kaod.org> Date: 2020-09-14 21:16:10
and condition its call with IS_ENABLED(CONFIG_PPC32). This fixes a
compile error with W=1.
arch/powerpc/kernel/prom.c: In function ‘early_reserve_mem’:
arch/powerpc/kernel/prom.c:625:10: error: variable ‘reserve_map’ set but not used [-Werror=unused-but-set-variable]
__be64 *reserve_map;
^~~~~~~~~~~
cc1: all warnings being treated as errors
Cc: Christophe Leroy <redacted>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/kernel/prom.c | 37 ++++++++++++++++++++-----------------
1 file changed, 20 insertions(+), 17 deletions(-)
@@ -620,27 +620,14 @@ static void __init early_reserve_mem_dt(void)}}-staticvoid__initearly_reserve_mem(void)+staticvoid__initearly_reserve_mem_old(void){__be64*reserve_map;reserve_map=(__be64*)(((unsignedlong)initial_boot_params)+fdt_off_mem_rsvmap(initial_boot_params));-/* Look for the new "reserved-regions" property in the DT */-early_reserve_mem_dt();--#ifdef CONFIG_BLK_DEV_INITRD-/* Then reserve the initrd, if any */-if(initrd_start&&(initrd_end>initrd_start)){-memblock_reserve(ALIGN_DOWN(__pa(initrd_start),PAGE_SIZE),-ALIGN(initrd_end,PAGE_SIZE)--ALIGN_DOWN(initrd_start,PAGE_SIZE));-}-#endif /* CONFIG_BLK_DEV_INITRD */--#ifdef CONFIG_PPC32-/* +/**Handlethecasewherewemightbebootingfromanoldkexec*imagethatsetupthemem_rsvmapaspairsof32-bitvalues*/
@@ -658,9 +645,25 @@ static void __init early_reserve_mem(void)DBG("reserving: %x -> %x\n",base_32,size_32);memblock_reserve(base_32,size_32);}-return;}-#endif+}++staticvoid__initearly_reserve_mem(void)+{+/* Look for the new "reserved-regions" property in the DT */+early_reserve_mem_dt();++#ifdef CONFIG_BLK_DEV_INITRD+/* Then reserve the initrd, if any */+if(initrd_start&&(initrd_end>initrd_start)){+memblock_reserve(ALIGN_DOWN(__pa(initrd_start),PAGE_SIZE),+ALIGN(initrd_end,PAGE_SIZE)-+ALIGN_DOWN(initrd_start,PAGE_SIZE));+}+#endif /* CONFIG_BLK_DEV_INITRD */++if(IS_ENABLED(CONFIG_PPC32))+early_reserve_mem_old();}#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
From: Cédric Le Goater <clg@kaod.org> Date: 2020-09-14 21:17:51
The check should be performed by the caller. This fixes a compile
error with W=1.
../arch/powerpc/lib/sstep.c: In function ‘mlsd_8lsd_ea’:
../arch/powerpc/lib/sstep.c:225:3: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
; /* Invalid form. Should already be checked for by caller! */
^
Cc: Jordan Niethe <redacted>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/lib/sstep.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
@@ -219,10 +219,13 @@ static nokprobe_inline unsigned long mlsd_8lsd_ea(unsigned int instr,ea+=regs->gpr[ra];elseif(!prefix_r&&!ra);/* Leave ea as is */-elseif(prefix_r&&!ra)+elseif(prefix_r)ea+=regs->nip;-elseif(prefix_r&&ra)-;/* Invalid form. Should already be checked for by caller! */++/*+*(prefix_r&&ra)isaninvalidform.Shouldalreadybe+*checkedforbycaller!+*/returnea;}
From: Cédric Le Goater <clg@kaod.org> Date: 2020-09-14 21:19:36
This fixes a compile error with W=1.
CC arch/powerpc/platforms/powernv/pci-ioda.o
../arch/powerpc/platforms/powernv/pci-ioda.c: In function ‘pnv_ioda_configure_pe’:
../arch/powerpc/platforms/powernv/pci-ioda.c:897:18: error: variable ‘parent’ set but not used [-Werror=unused-but-set-variable]
struct pci_dev *parent;
^~~~~~
Cc: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Christophe Leroy <redacted>
Reviewed-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/platforms/powernv/pci-ioda.c | 8 --------
1 file changed, 8 deletions(-)
From: Cédric Le Goater <clg@kaod.org> Date: 2020-09-14 21:21:21
This fixes a compile error with W=1.
arch/powerpc/kernel/sysfs.c: In function ‘sysfs_create_dscr_default’:
arch/powerpc/kernel/sysfs.c:228:7: error: variable ‘err’ set but not used [-Werror=unused-but-set-variable]
int err = 0;
^~~
cc1: all warnings being treated as errors
Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
Reviewed-by: Christophe Leroy <redacted>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/kernel/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
From: Cédric Le Goater <clg@kaod.org> Date: 2020-09-14 21:23:15
This fixes a compile error with W=1.
CC arch/powerpc/perf/imc-pmu.o
../arch/powerpc/perf/imc-pmu.c: In function ‘trace_imc_event_init’:
../arch/powerpc/perf/imc-pmu.c:1429:22: error: variable ‘target’ set but not used [-Werror=unused-but-set-variable]
struct task_struct *target;
^~~~~~
Cc: Anju T Sudhakar <redacted>
Reviewed-by: Christophe Leroy <redacted>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/perf/imc-pmu.c | 3 ---
1 file changed, 3 deletions(-)
and condition its call with IS_ENABLED(CONFIG_PPC32). This fixes a
compile error with W=1.
arch/powerpc/kernel/prom.c: In function ‘early_reserve_mem’:
arch/powerpc/kernel/prom.c:625:10: error: variable ‘reserve_map’ set
but not used [-Werror=unused-but-set-variable]
__be64 *reserve_map;
^~~~~~~~~~~
cc1: all warnings being treated as errors
Cc: Christophe Leroy <redacted>
Why _old ? Do you mean ppc32 are old ? Modern ADSL boxes like for
instance the famous French freebox have powerpc32 microcontroller.
Eventually you could name it _ppc32, but I don't think that's the good
way, see above.
Christophe
quoted hunk
{
__be64 *reserve_map;
reserve_map = (__be64 *)(((unsigned long)initial_boot_params) +
fdt_off_mem_rsvmap(initial_boot_params));
- /* Look for the new "reserved-regions" property in the DT */
- early_reserve_mem_dt();
-
-#ifdef CONFIG_BLK_DEV_INITRD
- /* Then reserve the initrd, if any */
- if (initrd_start && (initrd_end > initrd_start)) {
- memblock_reserve(ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE),
- ALIGN(initrd_end, PAGE_SIZE) -
- ALIGN_DOWN(initrd_start, PAGE_SIZE));
- }
-#endif /* CONFIG_BLK_DEV_INITRD */
-
-#ifdef CONFIG_PPC32
- /*
+ /*
* Handle the case where we might be booting from an old kexec
* image that setup the mem_rsvmap as pairs of 32-bit values
*/
@@ -658,9 +645,25 @@ static void __init early_reserve_mem(void) DBG("reserving: %x -> %x\n", base_32, size_32); memblock_reserve(base_32, size_32); }- return; }-#endif+}++static void __init early_reserve_mem(void)+{+ /* Look for the new "reserved-regions" property in the DT */+ early_reserve_mem_dt();++#ifdef CONFIG_BLK_DEV_INITRD+ /* Then reserve the initrd, if any */+ if (initrd_start && (initrd_end > initrd_start)) {+ memblock_reserve(ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE),+ ALIGN(initrd_end, PAGE_SIZE) -+ ALIGN_DOWN(initrd_start, PAGE_SIZE));+ }+#endif /* CONFIG_BLK_DEV_INITRD */++ if (IS_ENABLED(CONFIG_PPC32))+ early_reserve_mem_old(); } #ifdef CONFIG_PPC_TRANSACTIONAL_MEM--
From: Cédric Le Goater <clg@kaod.org> Date: 2020-09-16 05:58:05
On 9/15/20 6:46 PM, Christophe Leroy wrote:
Cédric Le Goater [off-list ref] a écrit :
quoted
and condition its call with IS_ENABLED(CONFIG_PPC32). This fixes a
compile error with W=1.
arch/powerpc/kernel/prom.c: In function ‘early_reserve_mem’:
arch/powerpc/kernel/prom.c:625:10: error: variable ‘reserve_map’ set but not used [-Werror=unused-but-set-variable]
__be64 *reserve_map;
^~~~~~~~~~~
cc1: all warnings being treated as errors
Cc: Christophe Leroy <redacted>
Why _old ? Do you mean ppc32 are old ? Modern ADSL boxes like for instance the famous French freebox have powerpc32 microcontroller.
Eventually you could name it _ppc32, but I don't think that's the good way, see above.
I choose old because of the comment ' ... booting from an old kexec ... ',
but I agree _ppc32 might be a better choice.
Thanks,
C.
Christophe
quoted
{
__be64 *reserve_map;
reserve_map = (__be64 *)(((unsigned long)initial_boot_params) +
fdt_off_mem_rsvmap(initial_boot_params));
- /* Look for the new "reserved-regions" property in the DT */
- early_reserve_mem_dt();
-
-#ifdef CONFIG_BLK_DEV_INITRD
- /* Then reserve the initrd, if any */
- if (initrd_start && (initrd_end > initrd_start)) {
- memblock_reserve(ALIGN_DOWN(__pa(initrd_start), PAGE_SIZE),
- ALIGN(initrd_end, PAGE_SIZE) -
- ALIGN_DOWN(initrd_start, PAGE_SIZE));
- }
-#endif /* CONFIG_BLK_DEV_INITRD */
-
-#ifdef CONFIG_PPC32
- /*
+ /*
* Handle the case where we might be booting from an old kexec
* image that setup the mem_rsvmap as pairs of 32-bit values
*/
On 15-Sep-2020, at 2:40 AM, Cédric Le Goater [off-list ref] wrote:
This fixes a compile error with W=1.
CC arch/powerpc/perf/imc-pmu.o
../arch/powerpc/perf/imc-pmu.c: In function ‘trace_imc_event_init’:
../arch/powerpc/perf/imc-pmu.c:1429:22: error: variable ‘target’ set but not used [-Werror=unused-but-set-variable]
struct task_struct *target;
^~~~~~
Cc: Anju T Sudhakar <redacted>
Reviewed-by: Christophe Leroy <redacted>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/powerpc/perf/imc-pmu.c | 3 ---
1 file changed, 3 deletions(-)