From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org,
Andy Whitcroft <apw@canonical.com>
Subject: Re: [PATCH 01/15] ide: include <asm/ide.h> only when needed
Date: Mon, 2 Feb 2009 19:27:25 +0100 [thread overview]
Message-ID: <200902021927.25177.bzolnier@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0902020847410.11930@anakin>
On Monday 02 February 2009, Geert Uytterhoeven wrote:
> On Sun, 1 Feb 2009, Bartlomiej Zolnierkiewicz wrote:
> > From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > Subject: [PATCH] ide: include <asm/ide.h> only when needed
> >
> > Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
> > ---
> > drivers/ide/ide-io-std.c | 7 +++++++
> > drivers/ide/tx4938ide.c | 2 ++
> > drivers/ide/tx4939ide.c | 2 ++
> > include/linux/ide.h | 7 -------
> > 4 files changed, 11 insertions(+), 7 deletions(-)
> >
> > Index: b/drivers/ide/ide-io-std.c
> > ===================================================================
> > --- a/drivers/ide/ide-io-std.c
> > +++ b/drivers/ide/ide-io-std.c
> > @@ -2,6 +2,13 @@
> > #include <linux/kernel.h>
> > #include <linux/ide.h>
> >
> > +#if defined(CONFIG_ARM) || defined(CONFIG_M68K) || defined(CONFIG_MIPS) || \
> > + defined(CONFIG_PARISC) || defined(CONFIG_PPC) || defined(CONFIG_SPARC)
> > +#include <asm/ide.h>
> > +#else
> > +#include <asm-generic/ide_iops.h>
> > +#endif
> > +
> > /*
> > * Conventional PIO operations for ATA devices
> > */
> > Index: b/drivers/ide/tx4938ide.c
> > ===================================================================
> > --- a/drivers/ide/tx4938ide.c
> > +++ b/drivers/ide/tx4938ide.c
> > @@ -15,6 +15,8 @@
> > #include <linux/init.h>
> > #include <linux/platform_device.h>
> > #include <linux/io.h>
> > +
> > +#include <asm/ide.h>
>
> Did you try checkpatch.pl?
Sure.
This driver uses stuff from <asm-mips/ide.h>.
[ I guess I could put '-mips' there to silence warnings on tx493{8,9}.c,
however I don't know of the way to get rid of ide-io-std.c's one... ]
> [...]
>
> > Index: b/include/linux/ide.h
> > ===================================================================
> > --- a/include/linux/ide.h
> > +++ b/include/linux/ide.h
> > @@ -193,13 +193,6 @@ static inline void ide_std_init_ports(hw
> > hw->io_ports.ctl_addr = ctl_addr;
> > }
> >
> > -#if defined(CONFIG_ARM) || defined(CONFIG_M68K) || defined(CONFIG_MIPS) || \
> > - defined(CONFIG_PARISC) || defined(CONFIG_PPC) || defined(CONFIG_SPARC)
> > -#include <asm/ide.h>
> > -#else
> > -#include <asm-generic/ide_iops.h>
> > -#endif
> > -
> > #define MAX_HWIFS 10
> >
> > /*
>
> As checkpatch.pl complains about any include of asm/*.h where the corresponding
> linux/*.h exists, this `fix' is incompatible with it.
checkpatch.pl gives false positives when it comes to some asm/*.h usages
This fix is such example -- it makes <asm/ide.h> pulled in only when really
needed (ide-io-std.c and tx493{8,9}.c) instead of being pulled in indirectly
by every file including <linux/ide.h>.
[ Long-term we want <asm/ide.h> removed but this is not possible yet so
I'm trying to limit its scope in the meantime... ]
Thanks,
Bart
next prev parent reply other threads:[~2009-02-02 18:36 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-01 17:49 [PATCH 00/15] weekly IDE updates Bartlomiej Zolnierkiewicz
2009-02-01 17:49 ` [PATCH 01/15] ide: include <asm/ide.h> only when needed Bartlomiej Zolnierkiewicz
2009-02-02 7:49 ` Geert Uytterhoeven
2009-02-02 18:27 ` Bartlomiej Zolnierkiewicz [this message]
2009-02-04 14:20 ` Atsushi Nemoto
2009-02-05 21:14 ` Bartlomiej Zolnierkiewicz
2009-02-05 23:58 ` Sergei Shtylyov
2009-02-06 16:21 ` Bartlomiej Zolnierkiewicz
2009-02-06 22:03 ` Sergei Shtylyov
2009-02-07 15:35 ` Atsushi Nemoto
2009-02-07 23:37 ` Sergei Shtylyov
2009-02-02 18:53 ` Jaswinder Singh Rajput
2009-02-01 17:49 ` [PATCH 02/15] scc_pata: remove DECLARE_SCC_DEV() macro Bartlomiej Zolnierkiewicz
2009-02-01 18:49 ` Sergei Shtylyov
2009-02-02 16:45 ` Daniel K.
2009-02-02 18:26 ` Bartlomiej Zolnierkiewicz
2009-02-01 17:49 ` [PATCH 03/15] ide: fix memleak on failure in probe_for_drive() Bartlomiej Zolnierkiewicz
2009-02-01 17:49 ` [PATCH 04/15] ide: fix error message in pre_task_out_intr() Bartlomiej Zolnierkiewicz
2009-02-01 17:49 ` [PATCH 05/15] ide: allow host drivers to specify IRQ flags Bartlomiej Zolnierkiewicz
2009-02-01 17:49 ` [PATCH 06/15] ide: remove now superfluous check from ide_host_register() Bartlomiej Zolnierkiewicz
2009-02-01 17:49 ` [PATCH 07/15] ide: add IDE_HFLAG_DTC2278 host flag Bartlomiej Zolnierkiewicz
2009-02-01 17:50 ` [PATCH 08/15] ide: add IDE_HFLAG_4DRIVES " Bartlomiej Zolnierkiewicz
2009-02-01 17:50 ` [PATCH 09/15] ide: add "flagged" taskfile flags to struct ide_taskfile Bartlomiej Zolnierkiewicz
2009-02-06 6:04 ` Stephen Rothwell
2009-02-08 11:38 ` Bartlomiej Zolnierkiewicz
2009-03-04 18:32 ` Sergei Shtylyov
2009-02-01 17:50 ` [PATCH 10/15] ide: complete power step in ide_complete_pm_request() Bartlomiej Zolnierkiewicz
2009-02-01 17:50 ` [PATCH 11/15] ide: factor out completion of taskfile from ide_end_drive_cmd() Bartlomiej Zolnierkiewicz
2009-02-01 17:50 ` [PATCH 12/15] ide: move request type specific code from ide_end_drive_cmd() to callers Bartlomiej Zolnierkiewicz
2009-02-01 17:50 ` [PATCH 13/15] ide: no need to read Status and Error registers for "empty" taskfile requests Bartlomiej Zolnierkiewicz
2009-02-01 17:50 ` [PATCH 14/15] ide: remove ->data_phase field from ide_hwif_t Bartlomiej Zolnierkiewicz
2009-02-01 17:50 ` [PATCH 15/15] ide: move smart_enable() call out from get_smart_data() Bartlomiej Zolnierkiewicz
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=200902021927.25177.bzolnier@gmail.com \
--to=bzolnier@gmail.com \
--cc=apw@canonical.com \
--cc=geert@linux-m68k.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).