From patchwork Tue Mar 18 00:42:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Finn Thain X-Patchwork-Id: 3847041 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 90B87BF540 for ; Tue, 18 Mar 2014 01:03:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B36262026D for ; Tue, 18 Mar 2014 01:03:53 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE93B20265 for ; Tue, 18 Mar 2014 01:03:52 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPiQC-0004og-0h; Tue, 18 Mar 2014 01:02:24 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPiPo-0003qV-S5; Tue, 18 Mar 2014 01:02:00 +0000 Received: from kvm5.telegraphics.com.au ([98.124.60.144]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WPiPC-0003mB-1K for linux-arm-kernel@lists.infradead.org; Tue, 18 Mar 2014 01:01:26 +0000 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 7D1E925260; Mon, 17 Mar 2014 20:43:56 -0400 (EDT) Message-Id: <20140318004215.872456456@telegraphics.com.au> User-Agent: quilt/0.50-1 Date: Tue, 18 Mar 2014 11:42:23 +1100 From: Finn Thain To: "James E.J. Bottomley" , Subject: [PATCH 11/12] scsi/NCR5380: reduce depth of sun3_scsi nested includes References: <20140318004212.612472697@telegraphics.com.au> Content-Disposition: inline; filename=ncr5380-sun3-includes X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140317_210122_326056_575E3B22 X-CRM114-Status: GOOD ( 11.28 ) X-Spam-Score: -1.9 (-) Cc: Sam Creasey , linux-m68k@vger.kernel.org, Russell King , Michael Schmitz , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Christoph Hellwig --- 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 #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 #include "sun3_scsi.h" +#include "NCR5380.h" extern int sun3_map_test(unsigned long, char *);