Patchwork ubifs: fix kconfig dependency warning

login
register
mail settings
Submitter Randy Dunlap
Date March 28, 2011, 8:40 p.m.
Message ID <20110328134016.deb5d0c8.randy.dunlap@oracle.com>
Download mbox | patch
Permalink /patch/88683/
State New
Headers show

Comments

Randy Dunlap - March 28, 2011, 8:40 p.m.
From: Randy Dunlap <randy.dunlap@oracle.com>

Fix another kconfig dependency warning, this time in ubifs.

warning: (UBIFS_FS_DEBUG && LOCKDEP && LATENCYTOP) selects KALLSYMS_ALL which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)

Without this patch, we can have:
# CONFIG_KALLSYMS is not set
CONFIG_KALLSYMS_ALL=y
which is useless (does nothing unless KALLSYMS is enabled).

However, ubifs builds successfully with or without this patch,
and it builds with this line completely deleted,
so what was this 'select' for?  Just developer convenience?

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc:      Artem Bityutskiy <dedekind1@gmail.com>
Cc:      Adrian Hunter <adrian.hunter@nokia.com>
Cc:      linux-mtd@lists.infradead.org
---
 fs/ubifs/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Artem Bityutskiy - March 29, 2011, 7:02 a.m.
On Mon, 2011-03-28 at 13:40 -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> Fix another kconfig dependency warning, this time in ubifs.
> 
> warning: (UBIFS_FS_DEBUG && LOCKDEP && LATENCYTOP) selects KALLSYMS_ALL which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)
> 
> Without this patch, we can have:
> # CONFIG_KALLSYMS is not set
> CONFIG_KALLSYMS_ALL=y
> which is useless (does nothing unless KALLSYMS is enabled).
> 
> However, ubifs builds successfully with or without this patch,
> and it builds with this line completely deleted,
> so what was this 'select' for?  Just developer convenience?

Well, here is the idea. You can compile UBIFS with debugging and without
debugging. Without debugging the resulting ubifs.ko is much smaller, so
some embedded people prefer it this way.

If you select debugging support, then we'll compile it a lot of
assertions, self-checks, test-modes, extra error messages with detailed
dumps. And we want to see stackdumps when errors or problems happen,
this is why we select KALLSYMS_ALL.

So I guess instead we should do:

select KALLSYMS
select KALLSYMS_ALL

?
Randy Dunlap - March 29, 2011, 3:01 p.m.
On 03/29/11 00:02, Artem Bityutskiy wrote:
> On Mon, 2011-03-28 at 13:40 -0700, Randy Dunlap wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> Fix another kconfig dependency warning, this time in ubifs.
>>
>> warning: (UBIFS_FS_DEBUG && LOCKDEP && LATENCYTOP) selects KALLSYMS_ALL which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)
>>
>> Without this patch, we can have:
>> # CONFIG_KALLSYMS is not set
>> CONFIG_KALLSYMS_ALL=y
>> which is useless (does nothing unless KALLSYMS is enabled).
>>
>> However, ubifs builds successfully with or without this patch,
>> and it builds with this line completely deleted,
>> so what was this 'select' for?  Just developer convenience?
> 
> Well, here is the idea. You can compile UBIFS with debugging and without
> debugging. Without debugging the resulting ubifs.ko is much smaller, so
> some embedded people prefer it this way.
> 
> If you select debugging support, then we'll compile it a lot of
> assertions, self-checks, test-modes, extra error messages with detailed
> dumps. And we want to see stackdumps when errors or problems happen,
> this is why we select KALLSYMS_ALL.
> 
> So I guess instead we should do:
> 
> select KALLSYMS
> select KALLSYMS_ALL

Yes, that should do it.  Thanks for the explanation.
Artem Bityutskiy - March 29, 2011, 3:04 p.m.
On Tue, 2011-03-29 at 08:01 -0700, Randy Dunlap wrote:
> On 03/29/11 00:02, Artem Bityutskiy wrote:
> > On Mon, 2011-03-28 at 13:40 -0700, Randy Dunlap wrote:
> >> From: Randy Dunlap <randy.dunlap@oracle.com>
> >>
> >> Fix another kconfig dependency warning, this time in ubifs.
> >>
> >> warning: (UBIFS_FS_DEBUG && LOCKDEP && LATENCYTOP) selects KALLSYMS_ALL which has unmet direct dependencies (DEBUG_KERNEL && KALLSYMS)
> >>
> >> Without this patch, we can have:
> >> # CONFIG_KALLSYMS is not set
> >> CONFIG_KALLSYMS_ALL=y
> >> which is useless (does nothing unless KALLSYMS is enabled).
> >>
> >> However, ubifs builds successfully with or without this patch,
> >> and it builds with this line completely deleted,
> >> so what was this 'select' for?  Just developer convenience?
> > 
> > Well, here is the idea. You can compile UBIFS with debugging and without
> > debugging. Without debugging the resulting ubifs.ko is much smaller, so
> > some embedded people prefer it this way.
> > 
> > If you select debugging support, then we'll compile it a lot of
> > assertions, self-checks, test-modes, extra error messages with detailed
> > dumps. And we want to see stackdumps when errors or problems happen,
> > this is why we select KALLSYMS_ALL.
> > 
> > So I guess instead we should do:
> > 
> > select KALLSYMS
> > select KALLSYMS_ALL
> 
> Yes, that should do it.  Thanks for the explanation.

Will you submit a patch? Alternatively, I can make it myself. What is
your preference?

And I'll merge it upstream this cycle (before 2.6.39) then.

Patch

--- linux-2.6.38-git18.orig/fs/ubifs/Kconfig
+++ linux-2.6.38-git18/fs/ubifs/Kconfig
@@ -47,7 +47,7 @@  config UBIFS_FS_DEBUG
 	bool "Enable debugging support"
 	depends on UBIFS_FS
 	select DEBUG_FS
-	select KALLSYMS_ALL
+	select KALLSYMS_ALL if DEBUG_KERNEL && KALLSYMS
 	help
 	  This option enables UBIFS debugging support. It makes sure various
 	  assertions, self-checks, debugging messages and test modes are compiled