Message ID | 20190213174005.28785-2-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/11] powerpc: remove dead ifdefs in <asm/checksum.h> | expand |
Le 13/02/2019 à 18:39, Christoph Hellwig a écrit : > __KERNEL__ is never not defined for non-uapi headers, and GENERIC_CSUM > isn't ever set for powerpc either. GENERIC_CSUM was abandonned by commit d4fde568a34a ("powerpc/64: Use optimized checksum routines on little-endian") Could you also remove the 'config GENERIC_CSUM' item in arch/powerpc/Kconfig ? Christophe > > Signed-off-by: Christoph Hellwig <hch@lst.de> > --- > arch/powerpc/include/asm/checksum.h | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h > index a78a57e5058d..37c309500260 100644 > --- a/arch/powerpc/include/asm/checksum.h > +++ b/arch/powerpc/include/asm/checksum.h > @@ -1,6 +1,5 @@ > #ifndef _ASM_POWERPC_CHECKSUM_H > #define _ASM_POWERPC_CHECKSUM_H > -#ifdef __KERNEL__ > > /* > * This program is free software; you can redistribute it and/or > @@ -9,9 +8,6 @@ > * 2 of the License, or (at your option) any later version. > */ > > -#ifdef CONFIG_GENERIC_CSUM > -#include <asm-generic/checksum.h> > -#else > #include <linux/bitops.h> > #include <linux/in6.h> > /* > @@ -217,6 +213,4 @@ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, > const struct in6_addr *daddr, > __u32 len, __u8 proto, __wsum sum); > > -#endif > -#endif /* __KERNEL__ */ > -#endif > +#endif /* _ASM_POWERPC_CHECKSUM_H */ >
On Feb 13 2019, Christoph Hellwig <hch@lst.de> wrote:
> __KERNEL__ is never not defined for non-uapi headers, and GENERIC_CSUM
"... never not ... non-..." That's a bit too negative, I think. :-)
Andreas.
On Thu, Feb 14, 2019 at 09:26:19AM +0100, Christophe Leroy wrote: > Could you also remove the 'config GENERIC_CSUM' item in > arch/powerpc/Kconfig ? All the separate declarations go away later in this series.
Le 14/02/2019 à 18:05, Christoph Hellwig a écrit : > On Thu, Feb 14, 2019 at 09:26:19AM +0100, Christophe Leroy wrote: >> Could you also remove the 'config GENERIC_CSUM' item in >> arch/powerpc/Kconfig ? > > All the separate declarations go away later in this series. > I saw, but the purpose of the later patch is to replace arch defined GENERIC_CSUM by a common one that arches select. For the powerpc you are not in that case as the powerpc does not select GENERIC_CSUM. So I really believe that all stale bits of remaining GENERIC_CSUM in powerpc should go away as a single dedicated patch, as a fix of commit d4fde568a34a ("powerpc/64: Use optimized checksum routines on little-endian") Regarding the #ifdef __KERNEL__ , I think we should do a wide cleanup in arch/powerpc/include/asm, not only asm/checksum.h Christophe
On Fri, Feb 15, 2019 at 5:18 PM Christophe Leroy <christophe.leroy@c-s.fr> wrote: > > > > Le 14/02/2019 à 18:05, Christoph Hellwig a écrit : > > On Thu, Feb 14, 2019 at 09:26:19AM +0100, Christophe Leroy wrote: > >> Could you also remove the 'config GENERIC_CSUM' item in > >> arch/powerpc/Kconfig ? > > > > All the separate declarations go away later in this series. > > > > I saw, but the purpose of the later patch is to replace arch defined > GENERIC_CSUM by a common one that arches select. For the powerpc you are > not in that case as the powerpc does not select GENERIC_CSUM. > > So I really believe that all stale bits of remaining GENERIC_CSUM in > powerpc should go away as a single dedicated patch, as a fix of commit > d4fde568a34a ("powerpc/64: Use optimized checksum routines on > little-endian") > > Regarding the #ifdef __KERNEL__ , I think we should do a wide cleanup in > arch/powerpc/include/asm, not only asm/checksum.h > > Christophe Please send such cleanups to PowerPC ML instead of to me (Kbuild). Christoph, I think this one is independent of the rest of this series. How about separating it if you volunteer to Powerpc cleansup?
diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h index a78a57e5058d..37c309500260 100644 --- a/arch/powerpc/include/asm/checksum.h +++ b/arch/powerpc/include/asm/checksum.h @@ -1,6 +1,5 @@ #ifndef _ASM_POWERPC_CHECKSUM_H #define _ASM_POWERPC_CHECKSUM_H -#ifdef __KERNEL__ /* * This program is free software; you can redistribute it and/or @@ -9,9 +8,6 @@ * 2 of the License, or (at your option) any later version. */ -#ifdef CONFIG_GENERIC_CSUM -#include <asm-generic/checksum.h> -#else #include <linux/bitops.h> #include <linux/in6.h> /* @@ -217,6 +213,4 @@ __sum16 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, __u8 proto, __wsum sum); -#endif -#endif /* __KERNEL__ */ -#endif +#endif /* _ASM_POWERPC_CHECKSUM_H */
__KERNEL__ is never not defined for non-uapi headers, and GENERIC_CSUM isn't ever set for powerpc either. Signed-off-by: Christoph Hellwig <hch@lst.de> --- arch/powerpc/include/asm/checksum.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)