* [PATCH] Fix unused variable warning in rfcomm
@ 2009-01-23 9:41 Daniele Venzano
2009-01-23 13:50 ` Richard Genoud
0 siblings, 1 reply; 4+ messages in thread
From: Daniele Venzano @ 2009-01-23 9:41 UTC (permalink / raw)
To: Kernel Janitors; +Cc: linux-bluetooth, marcel
The following patch fixes a warning generated when compiling rfcomm.c
without CONFIG_BT_RFCOMM_DEBUG.
The warning was:
net/bluetooth/rfcomm/sock.c: In function ‘rfcomm_sock_ioctl’:
net/bluetooth/rfcomm/sock.c:795: warning: unused variable ‘sk’
Patch is against 2.6.28.1
Signed-off-by: Daniele Venzano <venza@brownhat.org>
--- a/net/bluetooth/rfcomm/sock.c 2009-01-23 10:30:34.000000000 +0100
+++ b/net/bluetooth/rfcomm/sock.c 2009-01-23 10:31:25.000000000 +0100
@@ -792,7 +792,9 @@ static int rfcomm_sock_getsockopt(struct
static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
+#ifdef CONFIG_BT_RFCOMM_DEBUG
struct sock *sk = sock->sk;
+#endif
int err;
BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix unused variable warning in rfcomm
2009-01-23 9:41 [PATCH] Fix unused variable warning in rfcomm Daniele Venzano
@ 2009-01-23 13:50 ` Richard Genoud
0 siblings, 0 replies; 4+ messages in thread
From: Richard Genoud @ 2009-01-23 13:50 UTC (permalink / raw)
To: Daniele Venzano; +Cc: Kernel Janitors, linux-bluetooth, marcel
2009/1/23 Daniele Venzano <venza@brownhat.org>:
> The following patch fixes a warning generated when compiling rfcomm.c
> without CONFIG_BT_RFCOMM_DEBUG.
> The warning was:
> net/bluetooth/rfcomm/sock.c: In function 'rfcomm_sock_ioctl':
> net/bluetooth/rfcomm/sock.c:795: warning: unused variable 'sk'
>
> Patch is against 2.6.28.1
>
> Signed-off-by: Daniele Venzano <venza@brownhat.org>
>
> --- a/net/bluetooth/rfcomm/sock.c 2009-01-23 10:30:34.000000000 +0100
> +++ b/net/bluetooth/rfcomm/sock.c 2009-01-23 10:31:25.000000000 +0100
> @@ -792,7 +792,9 @@ static int rfcomm_sock_getsockopt(struct
>
> static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
> {
> +#ifdef CONFIG_BT_RFCOMM_DEBUG
> struct sock *sk = sock->sk;
> +#endif
> int err;
>
> BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
>
if CONFIG_BT_RFCOMM_TTY is set, the compilation will break.
richard.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix unused variable warning in rfcomm
@ 2009-01-23 14:09 Daniele Venzano
2009-01-23 14:22 ` Marcel Holtmann
0 siblings, 1 reply; 4+ messages in thread
From: Daniele Venzano @ 2009-01-23 14:09 UTC (permalink / raw)
To: Kernel Janitors; +Cc: richard.genoud, linux-bluetooth, marcel
Sorry, shouldn't have missed that.
The following patch fixes a warning generated when compiling rfcomm.c
without CONFIG_BT_RFCOMM_DEBUG.
The warning was:
net/bluetooth/rfcomm/sock.c: In function 'rfcomm_sock_ioctl':
net/bluetooth/rfcomm/sock.c:795: warning: unused variable 'sk'
Patch is against 2.6.28.1
Signed-off-by: Daniele Venzano <venza@brownhat.org>
--- a/net/bluetooth/rfcomm/sock.c 2009-01-23 10:30:34.000000000 +0100
+++ b/net/bluetooth/rfcomm/sock.c 2009-01-23 15:09:00.000000000 +0100
@@ -792,7 +792,9 @@ static int rfcomm_sock_getsockopt(struct
static int rfcomm_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
+#if defined(CONFIG_BT_RFCOMM_DEBUG) || defined(CONFIG_BT_RFCOMM_TTY)
struct sock *sk = sock->sk;
+#endif
int err;
BT_DBG("sk %p cmd %x arg %lx", sk, cmd, arg);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix unused variable warning in rfcomm
2009-01-23 14:09 Daniele Venzano
@ 2009-01-23 14:22 ` Marcel Holtmann
0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2009-01-23 14:22 UTC (permalink / raw)
To: Daniele Venzano; +Cc: Kernel Janitors, richard.genoud, linux-bluetooth
Hi guys,
> Sorry, shouldn't have missed that.
>
> The following patch fixes a warning generated when compiling rfcomm.c
> without CONFIG_BT_RFCOMM_DEBUG.
> The warning was:
> net/bluetooth/rfcomm/sock.c: In function 'rfcomm_sock_ioctl':
> net/bluetooth/rfcomm/sock.c:795: warning: unused variable 'sk'
this has been fixed upstream already. So why does this come up again?
Regards
Marcel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-23 14:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 9:41 [PATCH] Fix unused variable warning in rfcomm Daniele Venzano
2009-01-23 13:50 ` Richard Genoud
-- strict thread matches above, loose matches on Subject: below --
2009-01-23 14:09 Daniele Venzano
2009-01-23 14:22 ` Marcel Holtmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox