Message ID | 20210409093815.118619-1-zhengzucheng@huawei.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [-next] powerpc/pmac: Make some symbols static | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (f2b8ef18c8e0634e176be99dcf242e515cfdb1d3) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | fail | Build failed! |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded and removed 3 sparse warnings |
snowpatch_ozlabs/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 12 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
Le 09/04/2021 à 11:38, Zucheng Zheng a écrit : > ppc_override_l2cr/ppc_override_l2cr_value/has_l2cache symbol is not used > outside of setup.c, so commit marks it static. > > Reported-by: Hulk Robot <hulkci@huawei.com> > Signed-off-by: Zucheng Zheng <zhengzucheng@huawei.com> > --- > arch/powerpc/platforms/powermac/setup.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c > index 86aee3f2483f..db5107c80485 100644 > --- a/arch/powerpc/platforms/powermac/setup.c > +++ b/arch/powerpc/platforms/powermac/setup.c > @@ -71,9 +71,9 @@ > > #undef SHOW_GATWICK_IRQS > > -int ppc_override_l2cr = 0; > -int ppc_override_l2cr_value; > -int has_l2cache = 0; > +static int ppc_override_l2cr; > +static int ppc_override_l2cr_value; > +static int has_l2cache; > > int pmac_newworld; > With ppc64_defconfig, CC arch/powerpc/platforms/powermac/setup.o arch/powerpc/platforms/powermac/setup.c:75:12: error: 'ppc_override_l2cr_value' defined but not used [-Werror=unused-variable] 75 | static int ppc_override_l2cr_value; | ^~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/platforms/powermac/setup.c:74:12: error: 'ppc_override_l2cr' defined but not used [-Werror=unused-variable] 74 | static int ppc_override_l2cr; | ^~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors make[3]: *** [scripts/Makefile.build:288: arch/powerpc/platforms/powermac/setup.o] Error 1 You have to move it inside the #ifdef CONFIG_PPC32 block that uses it. Christophe
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c index 86aee3f2483f..db5107c80485 100644 --- a/arch/powerpc/platforms/powermac/setup.c +++ b/arch/powerpc/platforms/powermac/setup.c @@ -71,9 +71,9 @@ #undef SHOW_GATWICK_IRQS -int ppc_override_l2cr = 0; -int ppc_override_l2cr_value; -int has_l2cache = 0; +static int ppc_override_l2cr; +static int ppc_override_l2cr_value; +static int has_l2cache; int pmac_newworld;
ppc_override_l2cr/ppc_override_l2cr_value/has_l2cache symbol is not used outside of setup.c, so commit marks it static. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zucheng Zheng <zhengzucheng@huawei.com> --- arch/powerpc/platforms/powermac/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)