Re: [PATCH v2 2/2] i2c: i801: Remove linux/init.h and sort headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 20, 2019 at 01:32:56PM -0400, Paul Gortmaker wrote:
> [Re: [PATCH v2 2/2] i2c: i801: Remove linux/init.h and sort headers] On 20/06/2019 (Thu 15:24) Jean Delvare wrote:
> 
> > Hi Andy,
> > 
> > On Wed, 19 Jun 2019 18:12:48 +0300, Andy Shevchenko wrote:
> > > There is no need to include linux/init.h when at the same time
> > > we include linux/module.h.
> > > 
> > > Remove redundant inclusion.
> > > 
> > > For more details, refer to the commit
> > >   0fd972a7d91d ("module: relocate module_init from init.h to module.h")
> > > where the split had been introduced.
> > 
> > I've read it. It's not a split, it's a move. A move which makes sense
> > because, as explained in the commit message, module_init() is only
> > needed by modular code, so including it in init.h was slowing down the
> > pre-processing of non-modular code.
> > 
> > That being said, this alone does not imply that explicit inclusion of
> > both linux/init.h and linux/module.h in the same file is wrong. The
> 
> Agreed.  If one looks at all the many follow-on changes that relocation
> enabled, they will see that related changes are a "downgrade" of
> module.h to init.h inclusion - to reduce CPP overhead as stated above.
> 
> To be clear, that kind of change does NOT introduce any implicit header
> use, but the reverse:  init.h ---> module.h DOES introduce implicit use.
> 
> I've never intentionally removed init.h from a file just because
> module.h was already present.
> 
> I don't think implicit header inclusion is a good thing.  It leads to
> random compile failures that pop up depending on what is in your .config
> file and/or what architecture you are building for, etc etc.
> 
> Those issues wont happen from the patch proposed here, since module.h
> does explictly draw in init.h -- but that still doesn't make it right.
> 
> Note that solving all cases of implicit use of init.h is a totally
> different problem space than what I set out to tackle, as it doesn't
> impact CPP loading, and as Jean implies, it might not be worth tackling
> that problem - definitely not with 4000 individual commits!

Thank you for explanation.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux