Message ID | 20250401221600.24878-2-ebiggers@kernel.org (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | More CRC kconfig option cleanups | expand |
Hi On 4/1/25 3:15 PM, Eric Biggers wrote: > From: Eric Biggers <ebiggers@google.com> > > All modules that need CONFIG_CRC32 already select it, so there is no > need to bother users about the option, nor to default it to y. > My memory from 10-20 years ago could be foggy, but ISTR that someone made at least CRC16 and CRC32 user-selectable in order to support out-of-tree modules... FWIW. But they would not need to be default y. > Signed-off-by: Eric Biggers <ebiggers@google.com> > --- > arch/sh/configs/edosk7705_defconfig | 1 - > arch/sh/configs/kfr2r09-romimage_defconfig | 1 - > arch/sh/configs/sh7724_generic_defconfig | 1 - > arch/sh/configs/sh7770_generic_defconfig | 1 - > lib/Kconfig | 8 +------- > 5 files changed, 1 insertion(+), 11 deletions(-) >
On Tue, Apr 01, 2025 at 08:42:41PM -0700, Randy Dunlap wrote: > Hi > > On 4/1/25 3:15 PM, Eric Biggers wrote: > > From: Eric Biggers <ebiggers@google.com> > > > > All modules that need CONFIG_CRC32 already select it, so there is no > > need to bother users about the option, nor to default it to y. > > > > My memory from 10-20 years ago could be foggy, but ISTR that someone made at least > CRC16 and CRC32 user-selectable in order to support out-of-tree modules... > FWIW. > But they would not need to be default y. That's not supported by upstream, though. - Eric
On 4/1/25 8:51 PM, Eric Biggers wrote: > On Tue, Apr 01, 2025 at 08:42:41PM -0700, Randy Dunlap wrote: >> Hi >> >> On 4/1/25 3:15 PM, Eric Biggers wrote: >>> From: Eric Biggers <ebiggers@google.com> >>> >>> All modules that need CONFIG_CRC32 already select it, so there is no >>> need to bother users about the option, nor to default it to y. >>> >> >> My memory from 10-20 years ago could be foggy, but ISTR that someone made at least >> CRC16 and CRC32 user-selectable in order to support out-of-tree modules... >> FWIW. >> But they would not need to be default y. > > That's not supported by upstream, though. Which part is not supported by upstream?
On Tue, Apr 01, 2025 at 09:50:57PM -0700, Randy Dunlap wrote: > > > On 4/1/25 8:51 PM, Eric Biggers wrote: > > On Tue, Apr 01, 2025 at 08:42:41PM -0700, Randy Dunlap wrote: > >> Hi > >> > >> On 4/1/25 3:15 PM, Eric Biggers wrote: > >>> From: Eric Biggers <ebiggers@google.com> > >>> > >>> All modules that need CONFIG_CRC32 already select it, so there is no > >>> need to bother users about the option, nor to default it to y. > >>> > >> > >> My memory from 10-20 years ago could be foggy, but ISTR that someone made at least > >> CRC16 and CRC32 user-selectable in order to support out-of-tree modules... > >> FWIW. > >> But they would not need to be default y. > > > > That's not supported by upstream, though. > > Which part is not supported by upstream? Having prompts for library kconfig options solely because out-of-tree modules might need them. - Eric
On 4/1/25 10:02 PM, Eric Biggers wrote: > On Tue, Apr 01, 2025 at 09:50:57PM -0700, Randy Dunlap wrote: >> >> >> On 4/1/25 8:51 PM, Eric Biggers wrote: >>> On Tue, Apr 01, 2025 at 08:42:41PM -0700, Randy Dunlap wrote: >>>> Hi >>>> >>>> On 4/1/25 3:15 PM, Eric Biggers wrote: >>>>> From: Eric Biggers <ebiggers@google.com> >>>>> >>>>> All modules that need CONFIG_CRC32 already select it, so there is no >>>>> need to bother users about the option, nor to default it to y. >>>>> >>>> >>>> My memory from 10-20 years ago could be foggy, but ISTR that someone made at least >>>> CRC16 and CRC32 user-selectable in order to support out-of-tree modules... >>>> FWIW. >>>> But they would not need to be default y. >>> >>> That's not supported by upstream, though. >> >> Which part is not supported by upstream? > > Having prompts for library kconfig options solely because out-of-tree modules > might need them. Well, I think that is was supported for many years. I don't see how it would become unsupported all of a sudden. IMHO.
On Tue, Apr 01, 2025 at 10:56:32PM -0700, Randy Dunlap wrote: > > > On 4/1/25 10:02 PM, Eric Biggers wrote: > > On Tue, Apr 01, 2025 at 09:50:57PM -0700, Randy Dunlap wrote: > >> > >> > >> On 4/1/25 8:51 PM, Eric Biggers wrote: > >>> On Tue, Apr 01, 2025 at 08:42:41PM -0700, Randy Dunlap wrote: > >>>> Hi > >>>> > >>>> On 4/1/25 3:15 PM, Eric Biggers wrote: > >>>>> From: Eric Biggers <ebiggers@google.com> > >>>>> > >>>>> All modules that need CONFIG_CRC32 already select it, so there is no > >>>>> need to bother users about the option, nor to default it to y. > >>>>> > >>>> > >>>> My memory from 10-20 years ago could be foggy, but ISTR that someone made at least > >>>> CRC16 and CRC32 user-selectable in order to support out-of-tree modules... > >>>> FWIW. > >>>> But they would not need to be default y. > >>> > >>> That's not supported by upstream, though. > >> > >> Which part is not supported by upstream? > > > > Having prompts for library kconfig options solely because out-of-tree modules > > might need them. > > Well, I think that is was supported for many years. I don't see how it would become > unsupported all of a sudden. IMHO. Most kernel-internal options aren't user-selectable, though. It's mainly just some older ones that were made user-selectable for some reason, and that is a mistake that has been getting cleaned up over time. Consider that the upstream community has no visibility into out-of-tree modules in general, so there is no reasonable policy that could be applied in deciding which options should be user-selectable purely for the benefit of out-of-tree modules. The only reasonable policy is to consider in-tree users only. Just like we don't add EXPORT_SYMBOL() just because an out-of-tree module wants it. And of course downstreams always can, and do, just add a new kconfig option that selects any non-visible options they want. - Eric
On Tue, Apr 01, 2025 at 10:56:32PM -0700, Randy Dunlap wrote: > > Having prompts for library kconfig options solely because out-of-tree modules > > might need them. > > Well, I think that is was supported for many years. I don't see how it > would become unsupported all of a sudden. IMHO. Doing crap for out of tree modules was never in any way supported. Occasional sloppy maintainers let it slip in but we always fix it ASAP when noticed.
diff --git a/arch/sh/configs/edosk7705_defconfig b/arch/sh/configs/edosk7705_defconfig index 296ed768cbbb..ee3f6db7d8da 100644 --- a/arch/sh/configs/edosk7705_defconfig +++ b/arch/sh/configs/edosk7705_defconfig @@ -31,6 +31,5 @@ CONFIG_CMDLINE_FROM_BOOTLOADER=y # CONFIG_USB_SUPPORT is not set # CONFIG_DNOTIFY is not set # CONFIG_PROC_FS is not set # CONFIG_SYSFS is not set # CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_CRC32 is not set diff --git a/arch/sh/configs/kfr2r09-romimage_defconfig b/arch/sh/configs/kfr2r09-romimage_defconfig index 42bf34181a3e..88fbb65cb9f9 100644 --- a/arch/sh/configs/kfr2r09-romimage_defconfig +++ b/arch/sh/configs/kfr2r09-romimage_defconfig @@ -47,6 +47,5 @@ CONFIG_PROC_KCORE=y CONFIG_TMPFS=y # CONFIG_MISC_FILESYSTEMS is not set # CONFIG_NETWORK_FILESYSTEMS is not set # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_DEBUG_FS=y -# CONFIG_CRC32 is not set diff --git a/arch/sh/configs/sh7724_generic_defconfig b/arch/sh/configs/sh7724_generic_defconfig index 5440bd0ca4ed..e6298f22623a 100644 --- a/arch/sh/configs/sh7724_generic_defconfig +++ b/arch/sh/configs/sh7724_generic_defconfig @@ -37,6 +37,5 @@ CONFIG_UIO_PDRV_GENIRQ=y # CONFIG_DNOTIFY is not set # CONFIG_PROC_FS is not set # CONFIG_SYSFS is not set # CONFIG_MISC_FILESYSTEMS is not set # CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_CRC32 is not set diff --git a/arch/sh/configs/sh7770_generic_defconfig b/arch/sh/configs/sh7770_generic_defconfig index 4338af8d02d0..2e2b46980b58 100644 --- a/arch/sh/configs/sh7770_generic_defconfig +++ b/arch/sh/configs/sh7770_generic_defconfig @@ -39,6 +39,5 @@ CONFIG_UIO_PDRV_GENIRQ=y # CONFIG_DNOTIFY is not set # CONFIG_PROC_FS is not set # CONFIG_SYSFS is not set # CONFIG_MISC_FILESYSTEMS is not set # CONFIG_ENABLE_MUST_CHECK is not set -# CONFIG_CRC32 is not set diff --git a/lib/Kconfig b/lib/Kconfig index 61cce0686b53..c91de83b3e5a 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -175,18 +175,12 @@ config CRC_ITU_T modules require CRC ITU-T V.41 functions, but a module built outside the kernel tree does. Such modules that use library CRC ITU-T V.41 functions require M here. config CRC32 - tristate "CRC32/CRC32c functions" - default y + tristate select BITREVERSE - help - This option is provided for the case where no in-kernel-tree - modules require CRC32/CRC32c functions, but a module built outside - the kernel tree does. Such modules that use library CRC32/CRC32c - functions require M here. config ARCH_HAS_CRC32 bool config CRC32_ARCH