linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 4/6] Bluetooth: 6lowpan: Remove unnecessary chan_open() function
Date: Tue,  6 Oct 2015 13:03:22 +0300	[thread overview]
Message-ID: <1444125804-15577-5-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1444125804-15577-1-git-send-email-johan.hedberg@gmail.com>

From: Johan Hedberg <johan.hedberg@intel.com>

All the chan_open() function now does is to call chan_create() so it
doesn't really add any value.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
 net/bluetooth/6lowpan.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/net/bluetooth/6lowpan.c b/net/bluetooth/6lowpan.c
index 023fa29db709..77eb698d898e 100644
--- a/net/bluetooth/6lowpan.c
+++ b/net/bluetooth/6lowpan.c
@@ -780,17 +780,6 @@ static struct l2cap_chan *chan_create(void)
 	return chan;
 }
 
-static struct l2cap_chan *chan_open(struct l2cap_chan *pchan)
-{
-	struct l2cap_chan *chan;
-
-	chan = chan_create();
-	if (!chan)
-		return NULL;
-
-	return chan;
-}
-
 static void set_ip_addr_bits(u8 addr_type, u8 *addr)
 {
 	if (addr_type == BDADDR_LE_PUBLIC)
@@ -913,7 +902,10 @@ static inline struct l2cap_chan *chan_new_conn_cb(struct l2cap_chan *pchan)
 {
 	struct l2cap_chan *chan;
 
-	chan = chan_open(pchan);
+	chan = chan_create();
+	if (!chan)
+		return NULL;
+
 	chan->ops = pchan->ops;
 
 	BT_DBG("chan %p pchan %p", chan, pchan);
-- 
2.4.3


  parent reply	other threads:[~2015-10-06 10:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 10:03 [PATCH 0/6] Bluetooth: 6lowpan cleanups Johan Hedberg
2015-10-06 10:03 ` [PATCH 1/6] Bluetooth: 6lowpan: Fix imtu & omtu values Johan Hedberg
2015-10-06 10:03 ` [PATCH 2/6] Bluetooth: 6lowpan: Remove redundant (and incorrect) MPS assignments Johan Hedberg
2015-10-06 10:03 ` [PATCH 3/6] Bluetooth: 6lowpan: Remove redundant BT_CONNECTED assignment Johan Hedberg
2015-10-06 10:03 ` Johan Hedberg [this message]
2015-10-06 10:03 ` [PATCH 5/6] Bluetooth: 6lowpan: Rename confusing 'pchan' variables Johan Hedberg
2015-10-06 10:03 ` [PATCH 6/6] Bluetooth: 6lowpan: Remove unnecessary chan_get() function Johan Hedberg
2015-10-06 10:25 ` [PATCH 0/6] Bluetooth: 6lowpan cleanups Jukka Rissanen
2015-10-08  8:46 ` 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=1444125804-15577-5-git-send-email-johan.hedberg@gmail.com \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.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 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).