diff mbox

Bluetooth: Fix BT_L2CAP and BT_SCO in Kconfig

Message ID 1298684485-3081-1-git-send-email-padovan@profusion.mobi
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

Gustavo F. Padovan Feb. 26, 2011, 1:41 a.m. UTC
If we want something "bool" built-in in something "tristate" it can't
"depend on" the tristate config option.

Report by DaveM:

   I give it 'y' just to make it happen, for both, and afterways no
   matter how many times I rerun "make oldconfig" I keep seeing things
   like this in my build:

scripts/kconfig/conf --silentoldconfig Kconfig
include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO
include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
---
 net/bluetooth/Kconfig |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Comments

Vitaly Wool Feb. 26, 2011, 5:52 p.m. UTC | #1
Hi Gustavo,

On Sat, Feb 26, 2011 at 2:41 AM, Gustavo F. Padovan
<padovan@profusion.mobi> wrote:
> If we want something "bool" built-in in something "tristate" it can't
> "depend on" the tristate config option.
>
> Report by DaveM:
>
>   I give it 'y' just to make it happen, for both, and afterways no
>   matter how many times I rerun "make oldconfig" I keep seeing things
>   like this in my build:
>
> scripts/kconfig/conf --silentoldconfig Kconfig
> include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO
> include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP
>
> Reported-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> ---
>  net/bluetooth/Kconfig |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
> index c6f9c2f..6ae5ec5 100644
> --- a/net/bluetooth/Kconfig
> +++ b/net/bluetooth/Kconfig
> @@ -31,9 +31,10 @@ menuconfig BT
>          to Bluetooth kernel modules are provided in the BlueZ packages.  For
>          more information, see <http://www.bluez.org/>.
>
> +if BT != n
> +
>  config BT_L2CAP
>        bool "L2CAP protocol support"
> -       depends on BT
>        select CRC16
>        help
>          L2CAP (Logical Link Control and Adaptation Protocol) provides
> @@ -42,11 +43,12 @@ config BT_L2CAP
>
>  config BT_SCO
>        bool "SCO links support"
> -       depends on BT
>        help
>          SCO link provides voice transport over Bluetooth.  SCO support is
>          required for voice applications like Headset and Audio.
>
> +endif
> +

Ugh, isn't it far cleaner to change initial dependencies to "depends
on BT != n" ?

Thanks,
   Vitaly
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gustavo F. Padovan Feb. 27, 2011, 7:19 p.m. UTC | #2
Hi Vitaly,

* Vitaly Wool <vitalywool@gmail.com> [2011-02-26 18:52:44 +0100]:

> Hi Gustavo,
> 
> On Sat, Feb 26, 2011 at 2:41 AM, Gustavo F. Padovan
> <padovan@profusion.mobi> wrote:
> > If we want something "bool" built-in in something "tristate" it can't
> > "depend on" the tristate config option.
> >
> > Report by DaveM:
> >
> >   I give it 'y' just to make it happen, for both, and afterways no
> >   matter how many times I rerun "make oldconfig" I keep seeing things
> >   like this in my build:
> >
> > scripts/kconfig/conf --silentoldconfig Kconfig
> > include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO
> > include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP
> >
> > Reported-by: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> > ---
> >  net/bluetooth/Kconfig |    6 ++++--
> >  1 files changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
> > index c6f9c2f..6ae5ec5 100644
> > --- a/net/bluetooth/Kconfig
> > +++ b/net/bluetooth/Kconfig
> > @@ -31,9 +31,10 @@ menuconfig BT
> >          to Bluetooth kernel modules are provided in the BlueZ packages.  For
> >          more information, see <http://www.bluez.org/>.
> >
> > +if BT != n
> > +
> >  config BT_L2CAP
> >        bool "L2CAP protocol support"
> > -       depends on BT
> >        select CRC16
> >        help
> >          L2CAP (Logical Link Control and Adaptation Protocol) provides
> > @@ -42,11 +43,12 @@ config BT_L2CAP
> >
> >  config BT_SCO
> >        bool "SCO links support"
> > -       depends on BT
> >        help
> >          SCO link provides voice transport over Bluetooth.  SCO support is
> >          required for voice applications like Headset and Audio.
> >
> > +endif
> > +
> 
> Ugh, isn't it far cleaner to change initial dependencies to "depends
> on BT != n" ?

I just followed the same approach as net/ipv6/Kconfig and
net/mac80211/Kconfig. 

Dave, how do you prefer this?
David Miller March 3, 2011, 5:54 a.m. UTC | #3
From: "Gustavo F. Padovan" <padovan@profusion.mobi>
Date: Fri, 25 Feb 2011 22:41:25 -0300

> If we want something "bool" built-in in something "tristate" it can't
> "depend on" the tristate config option.
> 
> Report by DaveM:
> 
>    I give it 'y' just to make it happen, for both, and afterways no
>    matter how many times I rerun "make oldconfig" I keep seeing things
>    like this in my build:
> 
> scripts/kconfig/conf --silentoldconfig Kconfig
> include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO
> include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP
> 
> Reported-by: David S. Miller <davem@davemloft.net>
> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>

I think this approach is fine since it mirrors what we use in other similar
situations.

I am assuming this patch will propagate via bluetooth --> wireless --> me.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
John W. Linville March 3, 2011, 2:05 p.m. UTC | #4
On Wed, Mar 02, 2011 at 09:54:33PM -0800, David Miller wrote:
> From: "Gustavo F. Padovan" <padovan@profusion.mobi>
> Date: Fri, 25 Feb 2011 22:41:25 -0300
> 
> > If we want something "bool" built-in in something "tristate" it can't
> > "depend on" the tristate config option.
> > 
> > Report by DaveM:
> > 
> >    I give it 'y' just to make it happen, for both, and afterways no
> >    matter how many times I rerun "make oldconfig" I keep seeing things
> >    like this in my build:
> > 
> > scripts/kconfig/conf --silentoldconfig Kconfig
> > include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO
> > include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP
> > 
> > Reported-by: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
> 
> I think this approach is fine since it mirrors what we use in other similar
> situations.
> 
> I am assuming this patch will propagate via bluetooth --> wireless --> me.

Yes, I have it queued.
diff mbox

Patch

diff --git a/net/bluetooth/Kconfig b/net/bluetooth/Kconfig
index c6f9c2f..6ae5ec5 100644
--- a/net/bluetooth/Kconfig
+++ b/net/bluetooth/Kconfig
@@ -31,9 +31,10 @@  menuconfig BT
 	  to Bluetooth kernel modules are provided in the BlueZ packages.  For
 	  more information, see <http://www.bluez.org/>.
 
+if BT != n
+
 config BT_L2CAP
 	bool "L2CAP protocol support"
-	depends on BT
 	select CRC16
 	help
 	  L2CAP (Logical Link Control and Adaptation Protocol) provides
@@ -42,11 +43,12 @@  config BT_L2CAP
 
 config BT_SCO
 	bool "SCO links support"
-	depends on BT
 	help
 	  SCO link provides voice transport over Bluetooth.  SCO support is
 	  required for voice applications like Headset and Audio.
 
+endif
+
 source "net/bluetooth/rfcomm/Kconfig"
 
 source "net/bluetooth/bnep/Kconfig"