Skip to contentSkip to conversation

ubifs: fix kconfig dependency warning

PATCH Superseded Randy Dunlap 2 participants 7 messages Mar 28, 2011 – Mar 30, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ubifs: fix kconfig dependency warning

From: Randy Dunlap <[email protected]>

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?

Cc:      Artem Bityutskiy <[email protected]>
Cc:      Adrian Hunter <[email protected]>
Cc:      [email protected]
---
 fs/ubifs/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ubifs/Kconfig +1 -1
@@ -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
#1 lore raw
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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)

Quoted 8 lines

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

?

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#2 lore raw
Quoted 25 lines · Artem Bityutskiy
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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)

Quoted 8 lines

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.

Quoted 4 lines

So I guess instead we should do:

select KALLSYMS
select KALLSYMS_ALL

Yes, that should do it. Thanks for the explanation.

Signature · 2 lines
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
#3 lore raw
Quoted 26 lines · Randy Dunlap
Quoted 25 lines · Artem Bityutskiy
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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)

Quoted 8 lines

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.

Quoted 6 lines
Quoted 4 lines

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.

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#4 lore raw

PATCH v2 1/1 ubifs: fix kconfig dependency warning

Quoted 29 lines · On Tue, 29 Mar 2011 18:04:15 +0300 Artem Bityutskiy wrote:
Quoted 28 lines · Randy Dunlap
Quoted 27 lines · Artem Bityutskiy
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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)

Quoted 8 lines

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:

Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

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?

Here's an updated patch. But since KALLSYMS_ALL depends on DEBUG_KERNEL, the lines above aren't quite sufficient and I don't care to select DEBUG_KERNEL.

---
From: Randy Dunlap <[email protected]>

Fix kconfig dependency warning 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).

Cc:      Artem Bityutskiy <[email protected]>
Cc:      Adrian Hunter <[email protected]>
Cc:      [email protected]
---
 fs/ubifs/Kconfig |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
fs/ubifs/Kconfig +2 -1
@@ -47,7 +47,8 @@ config UBIFS_FS_DEBUG
 	bool "Enable debugging support"
 	depends on UBIFS_FS
 	select DEBUG_FS
-	select KALLSYMS_ALL
+	select KALLSYMS
+	select KALLSYMS_ALL if DEBUG_KERNEL
 	help
 	  This option enables UBIFS debugging support. It makes sure various
 	  assertions, self-checks, debugging messages and test modes are compiled
#5 lore raw
Quoted 34 lines · Randy Dunlap
Quoted 32 lines · On Tue, 29 Mar 2011 18:04:15 +0300 Artem Bityutskiy wrote:
Quoted 31 lines · Randy Dunlap
Quoted 29 lines · Artem Bityutskiy
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap <[email protected]>

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)

Quoted 8 lines

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

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Yes, that should do it. Thanks for the explanation.

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

Here's an updated patch. But since KALLSYMS_ALL depends on DEBUG_KERNEL, the lines above aren't quite sufficient and I don't care to select DEBUG_KERNEL.

What is the real difference between KALLSYMS_ALL and KALLSYMS? It looks like for stack dumps KALLSYMS is enough. The Kconfig help text is not very helpful. And when I look at the help text of CONFIG_KALLSYMS_EXTRA_PASS I get feeling that this area needs some clean-up work.

Anyway, any idea why we wouldn't just kill KALLSYMS_ALL by merging it with KALLSYMS?

Signature · 2 lines
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
#6 lore raw
Quoted 44 lines · Artem Bityutskiy
Quoted 34 lines · Randy Dunlap
Quoted 32 lines · On Tue, 29 Mar 2011 18:04:15 +0300 Artem Bityutskiy wrote:
Quoted 31 lines · Randy Dunlap
Quoted 29 lines · Artem Bityutskiy
Quoted 6 lines · Randy Dunlap

From: Randy Dunlap<[email protected]>

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)

Quoted 8 lines

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

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Yes, that should do it. Thanks for the explanation.

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

Here's an updated patch. But since KALLSYMS_ALL depends on DEBUG_KERNEL, the lines above aren't quite sufficient and I don't care to select DEBUG_KERNEL.

Quoted 5 lines

What is the real difference between KALLSYMS_ALL and KALLSYMS? It looks like for stack dumps KALLSYMS is enough. The Kconfig help text is not very helpful. And when I look at the help text of CONFIG_KALLSYMS_EXTRA_PASS I get feeling that this area needs some clean-up work.

Yes, KALLSYMS is enough for most of us.

You can see what KALLSYMS_ALL does by looking at scripts/kallsyms.c, the --all-symbols option:

Quoted 7 lines

/* if --all-symbols is not specified, then symbols outside the text
* and inittext sections are discarded */

Anyway, any idea why we wouldn't just kill KALLSYMS_ALL by merging it with KALLSYMS?

KALLSYMS_ALL probably generates noise for most use cases.

---