[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZhAXwWtA8ASDG89x@smile.fi.intel.com>
Date: Fri, 5 Apr 2024 18:24:49 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Damien Le Moal <dlemoal@...nel.org>
Cc: "Martin K. Petersen" <martin.petersen@...cle.com>,
Hannes Reinecke <hare@...e.de>, linux-ide@...r.kernel.org,
linux-kernel@...r.kernel.org, Niklas Cassel <cassel@...nel.org>
Subject: Re: [PATCH v1 1/1] ata: libata: Move inclusion to where it belongs
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
Powered by blists - more mailing lists