From patchwork Tue Jul 20 02:17:18 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyle Spaans X-Patchwork-Id: 59262 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 38ACBB6EF0 for ; Tue, 20 Jul 2010 12:19:20 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Ob2Oj-0006Ru-1F; Tue, 20 Jul 2010 02:17:33 +0000 Received: from services05.student.math.uwaterloo.ca ([129.97.204.15]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1Ob2Oe-0005tN-Pn; Tue, 20 Jul 2010 02:17:30 +0000 Received: from caffeine (caffeine.csclub.uwaterloo.ca [129.97.134.17]) (authenticated bits=0) by services05.student.math.uwaterloo.ca (8.13.8/8.13.8) with ESMTP id o6K2HJvr029718 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Jul 2010 22:17:19 -0400 (EDT) Received: by caffeine (sSMTP sendmail emulation); Mon, 19 Jul 2010 22:17:18 -0400 Date: Mon, 19 Jul 2010 22:17:18 -0400 From: Kyle Spaans To: Artem Bityutskiy Subject: Re: [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Message-ID: <20100720021718.GA32479@caffeine.csclub.uwaterloo.ca> Mail-Followup-To: Kyle Spaans , Artem Bityutskiy , linux-mtd@lists.infradead.org, kernel-janitors@vger.kernel.org, David Woodhouse References: <20100714042509.GA7775@caffeine.csclub.uwaterloo.ca> <1279471590.16247.57.camel@localhost.localdomain> MIME-Version: 1.0 In-Reply-To: <1279471590.16247.57.camel@localhost.localdomain> X-PGP-Key: http://csclub.uwaterloo.ca/~kspaans/kspaans-pubkey.asc User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (services05.student.math.uwaterloo.ca [129.97.204.15]); Mon, 19 Jul 2010 22:17:21 -0400 (EDT) X-Miltered: at minos with ID 4C45072F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Virus-Scanned: clamav-milter 0.96 at mailchk-w02 X-Virus-Status: Clean X-UUID: f561354e-d32b-4c15-9079-5880b9e3855c X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100719_221728_992898_708683EC X-CRM114-Status: GOOD ( 28.34 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [129.97.204.15 listed in list.dnswl.org] Cc: kernel-janitors@vger.kernel.org, linux-mtd@lists.infradead.org, David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org On Sun, Jul 18, 2010 at 07:46:30PM +0300, Artem Bityutskiy wrote: > On Wed, 2010-07-14 at 00:25 -0400, Kyle Spaans wrote: > > Remove redundant config checks when the subdirectory's Makefile is already > > conditionally processed. Add more conditional processing when the subdirectory > > can be selected/deselected as a whole. > > > > Signed-off-by: Kyle Spaans > > Reviewed-by: Robert P. J. Day > > --- > > This does not apply to the mtd-2.6.git tree [1]. Also I spotted that > > ... > > > +obj-$(CONFIG_MTD_TESTS) += tests/ > > +obj-$(CONFIG_MTD_LPDDR) += lpddr/ > > +obj-$(CONFIG_MTD_NAND) += nand/ > > +obj-$(CONFIG_MTD_ONENAND) += onenand/ > > obj-$(CONFIG_MTD_BI) += ubi/ > > This cannot be right, because we have UBI, not 'BI'. Weird! Mutt seems to have mangled the patch on me. I must have pressed some buttons while composing the message. Try it now. Thanks! (Can I resubmit the patch like this, or does it need to go in its own email? I can't quite tell from looking at linux-mtd and lkml traffic.) Remove redundant config checks when the subdirectory's Makefile is already conditionally processed. Add more conditional processing when the subdirectory can be selected/deselected as a whole. Signed-off-by: Kyle Spaans Reviewed-by: Robert P. J. Day --- compile tested on Debian Lenny drivers/mtd/Makefile | 6 +++++- drivers/mtd/lpddr/Makefile | 2 +- drivers/mtd/nand/Makefile | 2 +- drivers/mtd/onenand/Makefile | 4 ++-- drivers/mtd/tests/Makefile | 16 ++++++++-------- drivers/mtd/ubi/Makefile | 2 +- 6 files changed, 18 insertions(+), 14 deletions(-) diff --git a/drivers/mtd/Makefile b/drivers/mtd/Makefile index 760abc5..3bf50bd 100644 --- a/drivers/mtd/Makefile +++ b/drivers/mtd/Makefile @@ -30,6 +30,10 @@ obj-$(CONFIG_MTD_OOPS) += mtdoops.o nftl-objs := nftlcore.o nftlmount.o inftl-objs := inftlcore.o inftlmount.o -obj-y += chips/ lpddr/ maps/ devices/ nand/ onenand/ tests/ +obj-y += chips/ maps/ devices/ +obj-$(CONFIG_MTD_TESTS) += tests/ +obj-$(CONFIG_MTD_LPDDR) += lpddr/ +obj-$(CONFIG_MTD_NAND) += nand/ +obj-$(CONFIG_MTD_ONENAND) += onenand/ obj-$(CONFIG_MTD_UBI) += ubi/ diff --git a/drivers/mtd/lpddr/Makefile b/drivers/mtd/lpddr/Makefile index da48e46..0e9be65 100644 --- a/drivers/mtd/lpddr/Makefile +++ b/drivers/mtd/lpddr/Makefile @@ -3,4 +3,4 @@ # obj-$(CONFIG_MTD_QINFO_PROBE) += qinfo_probe.o -obj-$(CONFIG_MTD_LPDDR) += lpddr_cmds.o +obj-y += lpddr_cmds.o diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index e8ab884..8fe5869 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -2,7 +2,7 @@ # linux/drivers/nand/Makefile # -obj-$(CONFIG_MTD_NAND) += nand.o +obj-y += nand.o obj-$(CONFIG_MTD_NAND_ECC) += nand_ecc.o obj-$(CONFIG_MTD_NAND_IDS) += nand_ids.o obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o diff --git a/drivers/mtd/onenand/Makefile b/drivers/mtd/onenand/Makefile index 2b7884c..f6a8495 100644 --- a/drivers/mtd/onenand/Makefile +++ b/drivers/mtd/onenand/Makefile @@ -3,12 +3,12 @@ # # Core functionality. -obj-$(CONFIG_MTD_ONENAND) += onenand.o +obj-y += onenand.o # Board specific. obj-$(CONFIG_MTD_ONENAND_GENERIC) += generic.o obj-$(CONFIG_MTD_ONENAND_OMAP2) += omap2.o -obj-$(CONFIG_MTD_ONENAND_SAMSUNG) += samsung.o +obj-$(CONFIG_MTD_ONENAND_SAMSUNG) += samsung.o # Simulator obj-$(CONFIG_MTD_ONENAND_SIM) += onenand_sim.o diff --git a/drivers/mtd/tests/Makefile b/drivers/mtd/tests/Makefile index b44dcab..14adc55 100644 --- a/drivers/mtd/tests/Makefile +++ b/drivers/mtd/tests/Makefile @@ -1,8 +1,8 @@ -obj-$(CONFIG_MTD_TESTS) += mtd_oobtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_pagetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_readtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_speedtest.o -obj-$(CONFIG_MTD_TESTS) += mtd_stresstest.o -obj-$(CONFIG_MTD_TESTS) += mtd_subpagetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_torturetest.o -obj-$(CONFIG_MTD_TESTS) += mtd_nandecctest.o +obj-y += mtd_oobtest.o +obj-y += mtd_pagetest.o +obj-y += mtd_readtest.o +obj-y += mtd_speedtest.o +obj-y += mtd_stresstest.o +obj-y += mtd_subpagetest.o +obj-y += mtd_torturetest.o +obj-y += mtd_nandecctest.o diff --git a/drivers/mtd/ubi/Makefile b/drivers/mtd/ubi/Makefile index c9302a5..caf0316 100644 --- a/drivers/mtd/ubi/Makefile +++ b/drivers/mtd/ubi/Makefile @@ -1,4 +1,4 @@ -obj-$(CONFIG_MTD_UBI) += ubi.o +obj-y += ubi.o ubi-y += vtbl.o vmt.o upd.o build.o cdev.o kapi.o eba.o io.o wl.o scan.o ubi-y += misc.o