Re: [PATCH v3 0/4] powerpc: trivial unused functions cleanup
> On Fri, 2015-03-20 at 11:55 +0700, Arseny Solokha wrote: >> >> And by the way, while revisiting the series I've noticed that though the >> patch >> 4/4 basically reverts [1], it leaves >> >> #define MPIC_GREG_GLOBAL_CONF_10x00030 >> >> in arch/powerpc/include/asm/mpic.h untouched. That define also loses its uses >> after applying the patch. Compare the following hunk in today's patch w/ the >> one >> you committed: >> >> @@ -33,11 +33,6 @@ >>#define MPIC_GREG_GCONF_NO_BIAS 0x1000 >>#define MPIC_GREG_GCONF_BASE_MASK 0x000f >>#define MPIC_GREG_GCONF_MCK 0x0800 >> -#define MPIC_GREG_GLOBAL_CONF_1 0x00030 >> -#define MPIC_GREG_GLOBAL_CONF_1_SIE 0x0800 >> -#define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x7000 >> -#define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r)\ >> - (((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK) >>#define MPIC_GREG_VENDOR_00x00040 >>#define MPIC_GREG_VENDOR_10x00050 >>#define MPIC_GREG_VENDOR_20x00060 >> >> So the question is, should #define MPIC_GREG_GLOBAL_CONF_1 have been also >> removed, or could be left as is? >> >> [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2006-June/023867.html > > > OK, thanks for the thoroughness. > > With #defines like that it's never clear if they should be removed or not. On > the one hand it's not used, so it should be removed. But, it can be useful to > keep the #defines there as documentation. > > So I'm 50/50 on it. If you send me a patch to remove it I'll merge it, unless > someone else objects. So I'd abstain from removing it, for whatever it may be worth. Let it serve the documentation purposes. Arsény > cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 0/4] powerpc: trivial unused functions cleanup
On Fri, 2015-03-20 at 11:55 +0700, Arseny Solokha wrote: > > And by the way, while revisiting the series I've noticed that though the patch > 4/4 basically reverts [1], it leaves > > #define MPIC_GREG_GLOBAL_CONF_1 0x00030 > > in arch/powerpc/include/asm/mpic.h untouched. That define also loses its uses > after applying the patch. Compare the following hunk in today's patch w/ the > one > you committed: > > @@ -33,11 +33,6 @@ >#defineMPIC_GREG_GCONF_NO_BIAS 0x1000 >#defineMPIC_GREG_GCONF_BASE_MASK 0x000f >#defineMPIC_GREG_GCONF_MCK 0x0800 > -#define MPIC_GREG_GLOBAL_CONF_10x00030 > -#defineMPIC_GREG_GLOBAL_CONF_1_SIE 0x0800 > -#defineMPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x7000 > -#defineMPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r)\ > - (((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK) >#define MPIC_GREG_VENDOR_0 0x00040 >#define MPIC_GREG_VENDOR_1 0x00050 >#define MPIC_GREG_VENDOR_2 0x00060 > > So the question is, should #define MPIC_GREG_GLOBAL_CONF_1 have been also > removed, or could be left as is? > > [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2006-June/023867.html OK, thanks for the thoroughness. With #defines like that it's never clear if they should be removed or not. On the one hand it's not used, so it should be removed. But, it can be useful to keep the #defines there as documentation. So I'm 50/50 on it. If you send me a patch to remove it I'll merge it, unless someone else objects. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 0/4] powerpc: trivial unused functions cleanup
> On Fri, 2015-03-20 at 10:56 +0700, Arseny Solokha wrote: >> This series removes unused functions from powerpc tree that I've been able >> to discover. >> >> Two machines at hands, e300 and e500 based, boot and run without regressions >> on my workload with this series applied. The removed code seems also been >> rarely touched, so it seems the series is safe at least in general. But I >> can't obviously express any strong point in support of the series, so it's >> completely OK to leave things as is. >> >> v3: In patch 4/4, do not remove fsl_mpic_primary_get_version() from >> arch/powerpc/sysdev/mpic.c because the patch by Jia Hongtao >> ("powerpc/85xx: workaround for chips with MSI hardware errata") makes >> use of it. > > Sorry, too late. > > https://git.kernel.org/cgit/linux/kernel/git/mpe/linux.git/commit/?h=next&id=5e86bfde9cd93f272844c3ff6ac5f93d3666b3e7 > > > The patch that needs it can just add it back. I failed to notice that the series has been finally committed, so resent it. Of course Hongtao can add the removed function back if he needs to. And by the way, while revisiting the series I've noticed that though the patch 4/4 basically reverts [1], it leaves #define MPIC_GREG_GLOBAL_CONF_1 0x00030 in arch/powerpc/include/asm/mpic.h untouched. That define also loses its uses after applying the patch. Compare the following hunk in today's patch w/ the one you committed: @@ -33,11 +33,6 @@ #define MPIC_GREG_GCONF_NO_BIAS 0x1000 #define MPIC_GREG_GCONF_BASE_MASK 0x000f #define MPIC_GREG_GCONF_MCK 0x0800 -#define MPIC_GREG_GLOBAL_CONF_1 0x00030 -#define MPIC_GREG_GLOBAL_CONF_1_SIE 0x0800 -#define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK 0x7000 -#define MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO(r)\ - (((r) << 28) & MPIC_GREG_GLOBAL_CONF_1_CLK_RATIO_MASK) #define MPIC_GREG_VENDOR_0 0x00040 #define MPIC_GREG_VENDOR_1 0x00050 #define MPIC_GREG_VENDOR_2 0x00060 So the question is, should #define MPIC_GREG_GLOBAL_CONF_1 have been also removed, or could be left as is? [1] https://lists.ozlabs.org/pipermail/linuxppc-dev/2006-June/023867.html Arsény > cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH v3 0/4] powerpc: trivial unused functions cleanup
On Fri, 2015-03-20 at 10:56 +0700, Arseny Solokha wrote: > This series removes unused functions from powerpc tree that I've been able > to discover. > > Two machines at hands, e300 and e500 based, boot and run without regressions > on my workload with this series applied. The removed code seems also been > rarely touched, so it seems the series is safe at least in general. But I > can't obviously express any strong point in support of the series, so it's > completely OK to leave things as is. > > v3: In patch 4/4, do not remove fsl_mpic_primary_get_version() from > arch/powerpc/sysdev/mpic.c because the patch by Jia Hongtao > ("powerpc/85xx: workaround for chips with MSI hardware errata") makes > use of it. Sorry, too late. https://git.kernel.org/cgit/linux/kernel/git/mpe/linux.git/commit/?h=next&id=5e86bfde9cd93f272844c3ff6ac5f93d3666b3e7 The patch that needs it can just add it back. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
[PATCH v3 0/4] powerpc: trivial unused functions cleanup
This series removes unused functions from powerpc tree that I've been able to discover. Two machines at hands, e300 and e500 based, boot and run without regressions on my workload with this series applied. The removed code seems also been rarely touched, so it seems the series is safe at least in general. But I can't obviously express any strong point in support of the series, so it's completely OK to leave things as is. v3: In patch 4/4, do not remove fsl_mpic_primary_get_version() from arch/powerpc/sysdev/mpic.c because the patch by Jia Hongtao ("powerpc/85xx: workaround for chips with MSI hardware errata") makes use of it. v2: Added a brief explanation to each patch description of why removed functions are unused, as suggested by Michael Ellerman. Arseny Solokha (4): powerpc/boot: drop planetcore_set_serial_speed kvm/ppc/mpic: drop unused IRQ_testbit powrepc/qe: drop unused ucc_slow_poll_transmitter_now powerpc/mpic: remove unused functions arch/powerpc/boot/planetcore.c| 33 - arch/powerpc/boot/planetcore.h| 3 --- arch/powerpc/include/asm/mpic.h | 11 --- arch/powerpc/include/asm/ucc_slow.h | 13 - arch/powerpc/kvm/mpic.c | 5 - arch/powerpc/sysdev/mpic.c| 25 - arch/powerpc/sysdev/qe_lib/ucc_slow.c | 5 - 7 files changed, 95 deletions(-) -- 2.3.3 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev