Re: [PATCH v1 1/1] ata: libata: Move inclusion to where it belongs

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

 



On Fri, Apr 05, 2024 at 08:16:29AM +0900, Damien Le Moal wrote:
> On 4/5/24 04:21, Andy Shevchenko wrote:

...

> >  /* libata-acpi.c */
> > +
> > +#include <linux/acpi.h>
> 
> I am really not a big fan of including files in the middle of a header file.

I'm fine to place it at the top.

...

> > -#include <linux/acpi.h>
> 
> Why not:
> 
> #ifdef CONFIG_ATA_ACPI
> #include <linux/acpi.h>
> #endif
> 
> Which avoids the union forward declaration below.

The point is to reduce dependency hell. The header does NOT dependent on
ACPI guts, that's why I really prefer forward declaration over including
a monstrous acpi.h.

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux