public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
	Hannes Reinecke <hare@suse.de>,
	linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
	Niklas Cassel <cassel@kernel.org>
Subject: Re: [PATCH v1 1/1] ata: libata: Move inclusion to where it belongs
Date: Fri, 5 Apr 2024 18:24:49 +0300	[thread overview]
Message-ID: <ZhAXwWtA8ASDG89x@smile.fi.intel.com> (raw)
In-Reply-To: <8e37f392-1ddd-4c8e-87df-acb3bb5bdf0b@kernel.org>

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



      reply	other threads:[~2024-04-05 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 19:21 [PATCH v1 1/1] ata: libata: Move inclusion to where it belongs Andy Shevchenko
2024-04-04 23:16 ` Damien Le Moal
2024-04-05 15:24   ` Andy Shevchenko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZhAXwWtA8ASDG89x@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=cassel@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hare@suse.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox