From patchwork Wed Mar 19 12:35:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Finn Thain X-Patchwork-Id: 3862441 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 51873BF540 for ; Thu, 20 Mar 2014 00:13:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E79C201F4 for ; Thu, 20 Mar 2014 00:13:41 +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 8D3BC201EF for ; Thu, 20 Mar 2014 00:13:40 +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 1WQPwe-0007EC-Vk; Wed, 19 Mar 2014 23:30:50 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WQPvo-00054g-Vp; Wed, 19 Mar 2014 23:29:56 +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 1WQPuS-0004vK-GE for linux-arm-kernel@lists.infradead.org; Wed, 19 Mar 2014 23:28:33 +0000 Received: by kvm5.telegraphics.com.au (Postfix, from userid 502) id 911E2286E2; Wed, 19 Mar 2014 19:28:16 -0400 (EDT) Message-Id: <20140319123519.842734137@telegraphics.com.au> User-Agent: quilt/0.50-1 Date: Wed, 19 Mar 2014 23:35:27 +1100 From: Finn Thain To: "James E.J. Bottomley" , Subject: [PATCH v2 11/12] scsi/NCR5380: reduce depth of sun3_scsi nested includes References: <20140319123516.542623278@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-20140319_192832_791662_F0DA093E X-CRM114-Status: GOOD ( 12.08 ) X-Spam-Score: -0.4 (/) Cc: Sam Creasey , linux-m68k@vger.kernel.org, Russell King , Michael Schmitz , linux-kernel@vger.kernel.org, Joe Perches , 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=-2.7 required=5.0 tests=BAYES_00, DATE_IN_PAST_06_12, 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 --- 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-19 23:34:44.000000000 +1100 +++ linux-m68k/drivers/scsi/sun3_scsi.c 2014-03-19 23:34:45.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-19 23:34:45.000000000 +1100 +++ linux-m68k/drivers/scsi/sun3_scsi.h 2014-03-19 23:34:45.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-19 23:34:44.000000000 +1100 +++ linux-m68k/drivers/scsi/sun3_scsi_vme.c 2014-03-19 23:34:45.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 *);