From: David Herrmann <dh.herrmann@googlemail.com>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, gustavo@padovan.org,
David Herrmann <dh.herrmann@googlemail.com>
Subject: [PATCH 3/3] Bluetooth: Remove batostr()
Date: Tue, 8 May 2012 15:28:26 +0200 [thread overview]
Message-ID: <1336483706-1533-3-git-send-email-dh.herrmann@googlemail.com> (raw)
In-Reply-To: <1336483706-1533-1-git-send-email-dh.herrmann@googlemail.com>
batostr() is not used anywhere and I don't see any reason why we should
keep it. Use ba2str() instead.
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
---
include/net/bluetooth/bluetooth.h | 1 -
net/bluetooth/lib.c | 14 --------------
2 files changed, 15 deletions(-)
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 9b22536..fe9d5d1 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -182,7 +182,6 @@ static inline void bacpy(bdaddr_t *dst, bdaddr_t *src)
}
void baswap(bdaddr_t *dst, bdaddr_t *src);
-char *batostr(bdaddr_t *ba);
#define BDADDR_STRLEN 18
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index 6dcb788..6304863 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -48,20 +48,6 @@ void baswap(bdaddr_t *dst, bdaddr_t *src)
}
EXPORT_SYMBOL(baswap);
-char *batostr(bdaddr_t *ba)
-{
- static char str[2][18];
- static int i = 1;
-
- i ^= 1;
- sprintf(str[i], "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
- ba->b[5], ba->b[4], ba->b[3],
- ba->b[2], ba->b[1], ba->b[0]);
-
- return str[i];
-}
-EXPORT_SYMBOL(batostr);
-
char *ba2str(bdaddr_t *ba, char buf[BDADDR_STRLEN])
{
sprintf(buf, "%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
--
1.7.10.1
next prev parent reply other threads:[~2012-05-08 13:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-08 13:28 [PATCH 1/3] Bluetooth: Introduce ba2str() David Herrmann
2012-05-08 13:28 ` [PATCH 2/3] Bluetooth: Replace unsafe batostr() calls with ba2str() David Herrmann
2012-05-08 13:49 ` Andrei Emeltchenko
2012-05-08 14:02 ` David Herrmann
2012-05-08 14:34 ` Andrei Emeltchenko
2012-05-08 13:28 ` David Herrmann [this message]
2012-05-08 14:30 ` [PATCH 3/3] Bluetooth: Remove batostr() Ulisses Furquim
2012-05-08 14:54 ` Marcel Holtmann
2012-05-08 18:11 ` Ulisses Furquim
2012-05-09 9:02 ` Andrei Emeltchenko
2012-05-09 11:17 ` Ulisses Furquim
2012-05-09 13:10 ` Gustavo 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=1336483706-1533-3-git-send-email-dh.herrmann@googlemail.com \
--to=dh.herrmann@googlemail.com \
--cc=gustavo@padovan.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.