batman-adv: Kconfig, Add missing DEBUG_FS dependency

Message ID 1417284466-32016-1-git-send-email-mpa@pengutronix.de (mailing list archive)
State Accepted, archived
Headers

Commit Message

Markus Pargmann Nov. 29, 2014, 6:07 p.m. UTC
  BATMAN_ADV_DEBUG is using debugfs files for the debugging log. So it
depends on DEBUG_FS which is missing as dependency in the Kconfig file.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
 net/batman-adv/Kconfig | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Antonio Quartulli Nov. 29, 2014, 7:41 p.m. UTC | #1
On 29/11/14 19:07, Markus Pargmann wrote:
> BATMAN_ADV_DEBUG is using debugfs files for the debugging log. So it
> depends on DEBUG_FS which is missing as dependency in the Kconfig file.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> ---
>  net/batman-adv/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig
> index 11660a3aab5a..c6fc8f756c9a 100644
> --- a/net/batman-adv/Kconfig
> +++ b/net/batman-adv/Kconfig
> @@ -62,6 +62,7 @@ config BATMAN_ADV_MCAST
>  config BATMAN_ADV_DEBUG
>  	bool "B.A.T.M.A.N. debugging"
>  	depends on BATMAN_ADV
> +	depends on DEBUG_FS

What if somebody does not want to bloat the kernel with debug_fs but
still wants to run batman-adv? (i.e. on a very constrained embedded unit)

With this patch this would not be possible anymore..

Cheers,
  
Markus Pargmann Nov. 29, 2014, 7:46 p.m. UTC | #2
Hi,

On Sat, Nov 29, 2014 at 08:41:46PM +0100, Antonio Quartulli wrote:
> 
> 
> On 29/11/14 19:07, Markus Pargmann wrote:
> > BATMAN_ADV_DEBUG is using debugfs files for the debugging log. So it
> > depends on DEBUG_FS which is missing as dependency in the Kconfig file.
> > 
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > ---
> >  net/batman-adv/Kconfig | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig
> > index 11660a3aab5a..c6fc8f756c9a 100644
> > --- a/net/batman-adv/Kconfig
> > +++ b/net/batman-adv/Kconfig
> > @@ -62,6 +62,7 @@ config BATMAN_ADV_MCAST
> >  config BATMAN_ADV_DEBUG
> >  	bool "B.A.T.M.A.N. debugging"
> >  	depends on BATMAN_ADV
> > +	depends on DEBUG_FS
> 
> What if somebody does not want to bloat the kernel with debug_fs but
> still wants to run batman-adv? (i.e. on a very constrained embedded unit)
> 
> With this patch this would not be possible anymore..

It is still possible, it just adds a dependency for BATMAN_ADV_DEBUG,
the log which holds the verbose information. This is exported in debug
fs as far as I could see, so it is not usable anyway when DEBUG_FS is
not enabled as all debugfs function calls will be noops in that case.

Regards,

Markus
  
Antonio Quartulli Nov. 29, 2014, 7:48 p.m. UTC | #3
On 29/11/14 20:46, Markus Pargmann wrote:
>>> diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig
>>> index 11660a3aab5a..c6fc8f756c9a 100644
>>> --- a/net/batman-adv/Kconfig
>>> +++ b/net/batman-adv/Kconfig
>>> @@ -62,6 +62,7 @@ config BATMAN_ADV_MCAST
>>>  config BATMAN_ADV_DEBUG
>>>  	bool "B.A.T.M.A.N. debugging"
>>>  	depends on BATMAN_ADV
>>> +	depends on DEBUG_FS
>>
>> What if somebody does not want to bloat the kernel with debug_fs but
>> still wants to run batman-adv? (i.e. on a very constrained embedded unit)
>>
>> With this patch this would not be possible anymore..
> 
> It is still possible, it just adds a dependency for BATMAN_ADV_DEBUG,
> the log which holds the verbose information. This is exported in debug
> fs as far as I could see, so it is not usable anyway when DEBUG_FS is
> not enabled as all debugfs function calls will be noops in that case.
> 

Oh you are right, I thought you added the dependency to the BATMAN_ADV
symbol.

Better not to answer emails on Saturday evening :-)

Cheers,
  
Antonio Quartulli Jan. 7, 2015, 9:16 p.m. UTC | #4
On 29/11/14 19:07, Markus Pargmann wrote:
> BATMAN_ADV_DEBUG is using debugfs files for the debugging log. So it
> depends on DEBUG_FS which is missing as dependency in the Kconfig file.
> 
> Signed-off-by: Markus Pargmann <mpa@pengutronix.de>

Applied to my tree and queued for being sent upstream.
Thanks!
  

Patch

diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig
index 11660a3aab5a..c6fc8f756c9a 100644
--- a/net/batman-adv/Kconfig
+++ b/net/batman-adv/Kconfig
@@ -62,6 +62,7 @@  config BATMAN_ADV_MCAST
 config BATMAN_ADV_DEBUG
 	bool "B.A.T.M.A.N. debugging"
 	depends on BATMAN_ADV
+	depends on DEBUG_FS
 	help
 	  This is an option for use by developers; most people should
 	  say N here. This enables compilation of support for