From: Johannes Berg <johannes@sipsolutions.net>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
"Gustavo F. Padovan" <padovan@profusion.mobi>,
linux-bluetooth@vger.kernel.org
Subject: [PATCH] bluetooth: fix sparse & gcc warnings
Date: Wed, 01 Jun 2011 08:54:45 +0200 [thread overview]
Message-ID: <1306911285.3867.6.camel@jlt3.sipsolutions.net> (raw)
From: Johannes Berg <johannes.berg@intel.com>
sparse complains about a few things that should
be static, and I also noticed another warning
from gcc about a set but unused variable.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/bluetooth/l2cap_core.c | 6 +++---
net/bluetooth/mgmt.c | 2 +-
net/bluetooth/rfcomm/sock.c | 3 ---
3 files changed, 4 insertions(+), 7 deletions(-)
--- a/net/bluetooth/l2cap_core.c 2011-06-01 08:42:43.000000000 +0200
+++ b/net/bluetooth/l2cap_core.c 2011-06-01 08:45:04.000000000 +0200
@@ -62,8 +62,8 @@ static u8 l2cap_fixed_chan[8] = { 0x02,
static struct workqueue_struct *_busy_wq;
-LIST_HEAD(chan_list);
-DEFINE_RWLOCK(chan_list_lock);
+static LIST_HEAD(chan_list);
+static DEFINE_RWLOCK(chan_list_lock);
static void l2cap_busy_work(struct work_struct *work);
@@ -371,7 +371,7 @@ static inline int l2cap_check_security(s
return hci_conn_security(conn->hcon, chan->sec_level, auth_type);
}
-u8 l2cap_get_ident(struct l2cap_conn *conn)
+static u8 l2cap_get_ident(struct l2cap_conn *conn)
{
u8 id;
--- a/net/bluetooth/mgmt.c 2011-06-01 08:42:24.000000000 +0200
+++ b/net/bluetooth/mgmt.c 2011-06-01 08:42:28.000000000 +0200
@@ -41,7 +41,7 @@ struct pending_cmd {
void *user_data;
};
-LIST_HEAD(cmd_list);
+static LIST_HEAD(cmd_list);
static int cmd_status(struct sock *sk, u16 index, u16 cmd, u8 status)
{
--- a/net/bluetooth/rfcomm/sock.c 2011-06-01 08:50:06.000000000 +0200
+++ b/net/bluetooth/rfcomm/sock.c 2011-06-01 08:50:23.000000000 +0200
@@ -741,7 +741,6 @@ static int rfcomm_sock_setsockopt(struct
static int rfcomm_sock_getsockopt_old(struct socket *sock, int optname, char __user *optval, int __user *optlen)
{
struct sock *sk = sock->sk;
- struct sock *l2cap_sk;
struct rfcomm_conninfo cinfo;
struct l2cap_conn *conn = l2cap_pi(sk)->chan->conn;
int len, err = 0;
@@ -786,8 +785,6 @@ static int rfcomm_sock_getsockopt_old(st
break;
}
- l2cap_sk = rfcomm_pi(sk)->dlc->session->sock->sk;
-
cinfo.hci_handle = conn->hcon->handle;
memcpy(cinfo.dev_class, conn->hcon->dev_class, 3);
next reply other threads:[~2011-06-01 6:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 6:54 Johannes Berg [this message]
2011-06-01 19:48 ` [PATCH] bluetooth: fix sparse & gcc warnings Gustavo F. Padovan
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=1306911285.3867.6.camel@jlt3.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=padovan@profusion.mobi \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).