All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniele Venzano <venza@brownhat.org>
To: Kernel Janitors <kernel-janitors@vger.kernel.org>
Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org
Subject: [PATCH] Fix unused variable warning in rfcomm
Date: Fri, 23 Jan 2009 09:41:49 +0000	[thread overview]
Message-ID: <20090123094149.GA31218@milesteg.arr> (raw)

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);


WARNING: multiple messages have this Message-ID (diff)
From: Daniele Venzano <venza@brownhat.org>
To: Kernel Janitors <kernel-janitors@vger.kernel.org>
Cc: linux-bluetooth@vger.kernel.org, marcel@holtmann.org
Subject: [PATCH] Fix unused variable warning in rfcomm
Date: Fri, 23 Jan 2009 10:41:49 +0100	[thread overview]
Message-ID: <20090123094149.GA31218@milesteg.arr> (raw)

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);

             reply	other threads:[~2009-01-23  9:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-23  9:41 Daniele Venzano [this message]
2009-01-23  9:41 ` [PATCH] Fix unused variable warning in rfcomm Daniele Venzano
2009-01-23 13:50 ` Richard Genoud
2009-01-23 13:50   ` Richard Genoud
2009-01-23 14:09 ` Daniele Venzano
2009-01-23 14:09   ` Daniele Venzano
2009-01-23 14:22   ` Marcel Holtmann
2009-01-23 14:22     ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090123094149.GA31218@milesteg.arr \
    --to=venza@brownhat.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.