Re: [PATCH 1/7] lib/crc: remove unnecessary prompt for CONFIG_CRC32 and drop 'default y'
From: Eric Biggers
Date: Wed Apr 02 2025 - 12:41:11 EST
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@xxxxxxxxxx>
> >>>>>
> >>>>> 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