On Mon, Dec 01, 2025 at 08:01:23PM +0100, Petr Pavlu wrote: > On 11/29/25 8:53 PM, Yury Norov (NVIDIA) wrote:
... > > -#include <linux/kernel.h> > > +#include <linux/sysfs.h> > > If you are removing the kernel.h include from > include/linux/moduleparam.h, I think it would be good to update the file > to ensure that all necessary includes are now listed directly. > > The following items are present in moduleparam.h: > > * __UNIQUE_ID(), __used(), __section(), __aligned(), __always_unused() > -> linux/compiler.h, > * THIS_MODULE -> linux/init.h, > * __stringify() -> linux/stringify.h, > * u8, s8, u16, ... -> linux/types.h, > * static_assert() -> linux/build_bug.h, > * VERIFY_OCTAL_PERMISSIONS() -> linux/sysfs.h, > * ARRAY_SIZE() -> linux/array_size.h. > > I suggest then updating the includes in include/linux/moduleparam.h to: > > #include <linux/array_size.h> > #include <linux/build_bug.h> > #include <linux/compiler.h> > #include <linux/init.h> > #include <linux/stringify.h> > #include <linux/sysfs.h> > #include <linux/types.h> Good point. And since we are not adding some top-level ones, this shouldn't be worse (in terms of potential cyclic dependencies). -- With Best Regards, Andy Shevchenko
