All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/mtd: remove makefile subdirectory processing
@ 2010-07-14  4:25 ` Kyle Spaans
  0 siblings, 0 replies; 12+ messages in thread
From: Kyle Spaans @ 2010-07-14  4:25 UTC (permalink / raw)
  To: David Woodhouse, dedekind1, linux-mtd; +Cc: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 3650 bytes --]

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 <kspaans@uwaterloo.ca>
Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
---

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_BI)		+= 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
-- 
1.5.6.5


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies
@ 2010-07-14  4:25 ` Kyle Spaans
  0 siblings, 0 replies; 12+ messages in thread
From: Kyle Spaans @ 2010-07-14  4:25 UTC (permalink / raw)
  To: David Woodhouse, dedekind1, linux-mtd; +Cc: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 3650 bytes --]

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 <kspaans@uwaterloo.ca>
Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
---

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_BI)		+= 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
-- 
1.5.6.5


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing
  2010-07-14  4:25 ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Kyle Spaans
@ 2010-07-18 16:46   ` Artem Bityutskiy
  -1 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2010-07-18 16:46 UTC (permalink / raw)
  To: Kyle Spaans; +Cc: linux-mtd, kernel-janitors, David Woodhouse

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 <kspaans@uwaterloo.ca>
> Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
> ---

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'.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies
@ 2010-07-18 16:46   ` Artem Bityutskiy
  0 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2010-07-18 16:46 UTC (permalink / raw)
  To: Kyle Spaans; +Cc: linux-mtd, kernel-janitors, David Woodhouse

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 <kspaans@uwaterloo.ca>
> Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
> ---

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'.

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing
  2010-07-18 16:46   ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Artem Bityutskiy
@ 2010-07-20  2:17     ` Kyle Spaans
  -1 siblings, 0 replies; 12+ messages in thread
From: Kyle Spaans @ 2010-07-20  2:17 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: kernel-janitors, linux-mtd, David Woodhouse

[-- Attachment #1: Type: text/plain, Size: 4750 bytes --]

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 <kspaans@uwaterloo.ca>
> > Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
> > ---
> 
> 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 <kspaans@uwaterloo.ca>
Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
---

 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
-- 
1.5.6.5


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies
@ 2010-07-20  2:17     ` Kyle Spaans
  0 siblings, 0 replies; 12+ messages in thread
From: Kyle Spaans @ 2010-07-20  2:17 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: kernel-janitors, linux-mtd, David Woodhouse

[-- Attachment #1: Type: text/plain, Size: 4750 bytes --]

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 <kspaans@uwaterloo.ca>
> > Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
> > ---
> 
> 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 <kspaans@uwaterloo.ca>
Reviewed-by: Robert P. J. Day <rpjday@crashcourse.ca>
---

 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
-- 
1.5.6.5


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing
  2010-07-20  2:17     ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Kyle Spaans
@ 2010-07-21 10:09       ` Artem Bityutskiy
  -1 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2010-07-21 10:09 UTC (permalink / raw)
  To: Kyle Spaans; +Cc: kernel-janitors, linux-mtd, David Woodhouse

On Mon, 2010-07-19 at 22:17 -0400, Kyle Spaans wrote:
> > > +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.)

I see the following errors when I apply your patch to my l2-mtd-2.6 [1]
tree and compile on my x86_64 PC:

Kernel: arch/x86/boot/bzImage is ready  (#4)
ERROR: "ubi_open_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_map" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_nm" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_change" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_write" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_device_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_read" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_unmap" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_close_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_volume_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_path" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_sync" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_is_mapped" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_register_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "ubi_leb_read" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_write" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_erase" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_unmap" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_open_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_close_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_unregister_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "flexonenand_region" [drivers/mtd/onenand/onenand_sim.ko]
undefined!
ERROR: "onenand_addr" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/r852.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_default_bbt" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_scan_bbt" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_wait_ready" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "lpddr_cmdset" [drivers/mtd/lpddr/qinfo_probe.ko] undefined!
WARNING: modpost: Found 10 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

[1] git://git.infradead.org/users/dedekind/l2-mtd-2.6.git

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies
@ 2010-07-21 10:09       ` Artem Bityutskiy
  0 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2010-07-21 10:09 UTC (permalink / raw)
  To: Kyle Spaans; +Cc: kernel-janitors, linux-mtd, David Woodhouse

On Mon, 2010-07-19 at 22:17 -0400, Kyle Spaans wrote:
> > > +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.)

I see the following errors when I apply your patch to my l2-mtd-2.6 [1]
tree and compile on my x86_64 PC:

Kernel: arch/x86/boot/bzImage is ready  (#4)
ERROR: "ubi_open_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_map" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_nm" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_change" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_write" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_device_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_read" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_unmap" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_close_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_volume_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_path" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_sync" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_is_mapped" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_register_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "ubi_leb_read" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_write" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_erase" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_unmap" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_open_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_close_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_unregister_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "flexonenand_region" [drivers/mtd/onenand/onenand_sim.ko]
undefined!
ERROR: "onenand_addr" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/r852.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_default_bbt" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_scan_bbt" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_wait_ready" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "lpddr_cmdset" [drivers/mtd/lpddr/qinfo_probe.ko] undefined!
WARNING: modpost: Found 10 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

[1] git://git.infradead.org/users/dedekind/l2-mtd-2.6.git

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing
  2010-07-21 10:09       ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Artem Bityutskiy
@ 2010-08-04  0:58         ` Kyle Spaans
  -1 siblings, 0 replies; 12+ messages in thread
From: Kyle Spaans @ 2010-08-04  0:58 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-mtd, kernel-janitors, David Woodhouse

[-- Attachment #1: Type: text/plain, Size: 3560 bytes --]

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 <kspaans@uwaterloo.ca>
---
 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
-- 
1.5.6.5


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies
@ 2010-08-04  0:58         ` Kyle Spaans
  0 siblings, 0 replies; 12+ messages in thread
From: Kyle Spaans @ 2010-08-04  0:58 UTC (permalink / raw)
  To: Artem Bityutskiy; +Cc: linux-mtd, kernel-janitors, David Woodhouse

[-- Attachment #1: Type: text/plain, Size: 3560 bytes --]

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 <kspaans@uwaterloo.ca>
---
 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
-- 
1.5.6.5


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing
  2010-08-04  0:58         ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Kyle Spaans
@ 2010-08-24  8:17           ` Artem Bityutskiy
  -1 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2010-08-24  8:17 UTC (permalink / raw)
  To: Kyle Spaans; +Cc: linux-mtd, kernel-janitors, David Woodhouse

On Tue, 2010-08-03 at 20:58 -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 <kspaans@uwaterloo.ca>

Sorry, bad luck. I get the following with your patch, but without your
patch my compilation is fine. Forgot to compile-test? :-)

[dedekind@eru l2-mtd-2.6]$ make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     include/linux/version.h
make[2]: `scripts/unifdef' is up to date.
Kernel: arch/x86/boot/bzImage is ready  (#7)
  Building modules, stage 2.
  MODPOST 251 modules
ERROR: "ubi_open_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_map" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_nm" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_change" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_write" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_device_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_read" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_unmap" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_close_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_volume_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_path" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_sync" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_is_mapped" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_register_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "ubi_leb_read" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_write" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_erase" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_unmap" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_open_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_close_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_unregister_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "flexonenand_region" [drivers/mtd/onenand/onenand_sim.ko]
undefined!
ERROR: "onenand_addr" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/r852.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_default_bbt" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_scan_bbt" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_wait_ready" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "lpddr_cmdset" [drivers/mtd/lpddr/qinfo_probe.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies
@ 2010-08-24  8:17           ` Artem Bityutskiy
  0 siblings, 0 replies; 12+ messages in thread
From: Artem Bityutskiy @ 2010-08-24  8:17 UTC (permalink / raw)
  To: Kyle Spaans; +Cc: linux-mtd, kernel-janitors, David Woodhouse

On Tue, 2010-08-03 at 20:58 -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 <kspaans@uwaterloo.ca>

Sorry, bad luck. I get the following with your patch, but without your
patch my compilation is fine. Forgot to compile-test? :-)

[dedekind@eru l2-mtd-2.6]$ make
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CHK     include/linux/version.h
make[2]: `scripts/unifdef' is up to date.
Kernel: arch/x86/boot/bzImage is ready  (#7)
  Building modules, stage 2.
  MODPOST 251 modules
ERROR: "ubi_open_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_map" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_nm" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_change" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_write" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_device_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_read" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_leb_unmap" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_close_volume" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_get_volume_info" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_open_volume_path" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_sync" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_is_mapped" [fs/ubifs/ubifs.ko] undefined!
ERROR: "ubi_register_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "ubi_leb_read" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_write" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_erase" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_leb_unmap" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_open_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_close_volume" [drivers/mtd/ubi/gluebi.ko] undefined!
ERROR: "ubi_unregister_volume_notifier" [drivers/mtd/ubi/gluebi.ko]
undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "flexonenand_region" [drivers/mtd/onenand/onenand_sim.ko]
undefined!
ERROR: "onenand_addr" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/onenand_sim.ko] undefined!
ERROR: "onenand_scan" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "onenand_release" [drivers/mtd/onenand/generic.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/sm_common.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/r852.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/plat_nand.ko] undefined!
ERROR: "nand_default_bbt" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/nandsim.ko] undefined!
ERROR: "nand_scan" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_scan_bbt" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/diskonchip.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/denali.ko] undefined!
ERROR: "nand_release" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_tail" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_scan_ident" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "nand_wait_ready" [drivers/mtd/nand/cafe_nand.ko] undefined!
ERROR: "lpddr_cmdset" [drivers/mtd/lpddr/qinfo_probe.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

-- 
Best Regards,
Artem Bityutskiy (Артём Битюцкий)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2010-08-24  8:18 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-14  4:25 [PATCH] drivers/mtd: remove makefile subdirectory processing Kyle Spaans
2010-07-14  4:25 ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Kyle Spaans
2010-07-18 16:46 ` [PATCH] drivers/mtd: remove makefile subdirectory processing Artem Bityutskiy
2010-07-18 16:46   ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Artem Bityutskiy
2010-07-20  2:17   ` [PATCH] drivers/mtd: remove makefile subdirectory processing Kyle Spaans
2010-07-20  2:17     ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Kyle Spaans
2010-07-21 10:09     ` [PATCH] drivers/mtd: remove makefile subdirectory processing Artem Bityutskiy
2010-07-21 10:09       ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Artem Bityutskiy
2010-08-04  0:58       ` [PATCH] drivers/mtd: remove makefile subdirectory processing Kyle Spaans
2010-08-04  0:58         ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Kyle Spaans
2010-08-24  8:17         ` [PATCH] drivers/mtd: remove makefile subdirectory processing Artem Bityutskiy
2010-08-24  8:17           ` [PATCH] drivers/mtd: remove makefile subdirectory processing redundancies Artem Bityutskiy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.