From: Finn Thain <fthain@telegraphics.com.au>
To: "James E.J. Bottomley" <JBottomley@parallels.com>,
linux-scsi@vger.kernel.org
Cc: Sam Creasey <sammy@sammy.net>,
Russell King <linux@arm.linux.org.uk>,
Michael Schmitz <schmitz@debian.org>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-m68k@vger.kernel.org
Subject: [PATCH 11/12] scsi/NCR5380: reduce depth of sun3_scsi nested includes
Date: Tue, 18 Mar 2014 11:42:23 +1100 [thread overview]
Message-ID: <20140318004215.872456456@telegraphics.com.au> (raw)
In-Reply-To: 20140318004212.612472697@telegraphics.com.au
[-- Attachment #1: ncr5380-sun3-includes --]
[-- Type: text/plain, Size: 3177 bytes --]
Move the #include "NCR5380.h" out of the sun3_scsi.h header file and into
the driver .c files, like all the other NCR5380 drivers in the tree.
This improves uniformity and reduces the depth of nested includes. The
sequence of #include's, #define's and #if's no longer does my head in.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
Here's a graph showing the present #include structure.
sun3_scsi_vme.c -----> sun3_scsi.h -----> NCR5380.h
| ^
'--------------------|----.
| |
.----------------' |
| v
sun3_scsi.c -----> sun3_NCR5380.c
And here's the situation at the end of this patch series, after moving the
#includes with this patch, and merging sun3_scsi.c and sun3_scsi_vme with
the next patch.
sun3_scsi.h
^
|
|
sun3_scsi_vme.c -----> sun3_scsi.c -----> sun3_NCR5380.c
|
|
v
NCR5380.h
The final structure (see the next patch) of sun3_scsi_vme mirrors that of
g_NCR5380_mmio.c, and the final structure of sun3_scsi mirrors that of all
the other NCR5380 drivers.
BTW, both sun3_scsi.c and sun3_scsi_vme.c also #include "initio.h"
but I've sent a separate patch to address this.
---
drivers/scsi/sun3_scsi.c | 1 +
drivers/scsi/sun3_scsi.h | 8 +++-----
drivers/scsi/sun3_scsi_vme.c | 1 +
3 files changed, 5 insertions(+), 5 deletions(-)
Index: linux-m68k/drivers/scsi/sun3_scsi.c
===================================================================
--- linux-m68k.orig/drivers/scsi/sun3_scsi.c 2014-03-18 00:18:36.000000000 +1100
+++ linux-m68k/drivers/scsi/sun3_scsi.c 2014-03-18 00:18:38.000000000 +1100
@@ -72,6 +72,7 @@
#include "initio.h"
#include <scsi/scsi_host.h>
#include "sun3_scsi.h"
+#include "NCR5380.h"
/* #define OLDDMA */
Index: linux-m68k/drivers/scsi/sun3_scsi.h
===================================================================
--- linux-m68k.orig/drivers/scsi/sun3_scsi.h 2014-03-18 00:18:37.000000000 +1100
+++ linux-m68k/drivers/scsi/sun3_scsi.h 2014-03-18 00:18:38.000000000 +1100
@@ -29,8 +29,8 @@
* 1+ (800) 334-5454
*/
-#ifndef SUN3_NCR5380_H
-#define SUN3_NCR5380_H
+#ifndef SUN3_SCSI_H
+#define SUN3_SCSI_H
#define SUN3SCSI_PUBLIC_RELEASE 1
@@ -182,7 +182,5 @@ struct sun3_udc_regs {
#define VME_DATA24 0x3d00
-#include "NCR5380.h"
-
-#endif /* SUN3_NCR5380_H */
+#endif /* SUN3_SCSI_H */
Index: linux-m68k/drivers/scsi/sun3_scsi_vme.c
===================================================================
--- linux-m68k.orig/drivers/scsi/sun3_scsi_vme.c 2014-03-18 00:18:36.000000000 +1100
+++ linux-m68k/drivers/scsi/sun3_scsi_vme.c 2014-03-18 00:18:38.000000000 +1100
@@ -42,6 +42,7 @@
#include "initio.h"
#include <scsi/scsi_host.h>
#include "sun3_scsi.h"
+#include "NCR5380.h"
extern int sun3_map_test(unsigned long, char *);
next prev parent reply other threads:[~2014-03-18 0:42 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 0:42 [PATCH 00/12] scsi/NCR5380: fix debugging macros and #include structure Finn Thain
2014-03-18 0:42 ` [PATCH 01/12] scsi/NCR5380: remove unused BOARD_NORMAL and BOARD_NCR53C400 Finn Thain
2014-05-28 9:48 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 02/12] scsi/NCR5380: remove redundant HOSTS_C macro tests Finn Thain
2014-05-28 9:49 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 03/12] scsi/NCR5380: remove old CVS keywords Finn Thain
2014-05-28 9:49 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 04/12] scsi/NCR5380: use NCR5380_dprint() instead of NCR5380_print() Finn Thain
2014-05-28 9:49 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 05/12] scsi/NCR5380: fix build failures when debugging is enabled Finn Thain
2014-05-28 9:50 ` Christoph Hellwig
2014-05-28 12:09 ` Finn Thain
2014-05-28 12:13 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 06/12] scsi/NCR5380: fix dprintk macro usage and definition Finn Thain
2014-05-28 9:50 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 07/12] scsi/NCR5380: adopt NCR5380_dprint() and NCR5380_dprint_phase() Finn Thain
2014-05-28 9:51 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 08/12] scsi/NCR5380: adopt dprintk() Finn Thain
2014-05-28 9:52 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 09/12] scsi/NCR5380: fix and standardize NDEBUG macros Finn Thain
2014-05-28 9:54 ` Christoph Hellwig
2014-03-18 0:42 ` [PATCH 10/12] scsi/NCR5380: remove unused macro definitions Finn Thain
2014-05-28 9:54 ` Christoph Hellwig
2014-03-18 0:42 ` Finn Thain [this message]
2014-05-28 9:55 ` [PATCH 11/12] scsi/NCR5380: reduce depth of sun3_scsi nested includes Christoph Hellwig
2014-03-18 0:42 ` [PATCH 12/12] scsi/NCR5380: merge sun3_scsi_vme.c into sun3_scsi.c Finn Thain
2014-05-28 9:55 ` Christoph Hellwig
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=20140318004215.872456456@telegraphics.com.au \
--to=fthain@telegraphics.com.au \
--cc=JBottomley@parallels.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sammy@sammy.net \
--cc=schmitz@debian.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