mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Marcel Holtmann <marcel@holtmann.org>,
	"Gustavo F. Padovan" <padovan@profusion.mobi>
Cc: "David S. Miller" <davem@davemloft.net>,
	linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] bluetooth: Rename function bt_err to bt_to_errno
Date: Wed, 29 Jun 2011 18:18:29 -0700	[thread overview]
Message-ID: <895bc01e49b93b9498ca05cfa1bd9cf58cf30df8.1309396408.git.joe@perches.com> (raw)
In-Reply-To: <cover.1309396408.git.joe@perches.com>

Make it easier to use more normal logging styles later.

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/net/bluetooth/bluetooth.h |    2 +-
 net/bluetooth/hci_core.c          |    2 +-
 net/bluetooth/l2cap_core.c        |    4 ++--
 net/bluetooth/lib.c               |    4 ++--
 net/bluetooth/sco.c               |    4 ++--
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index 7bccaf9..7d77545f 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -204,7 +204,7 @@ out:
 	return NULL;
 }
 
-int bt_err(__u16 code);
+int bt_to_errno(__u16 code);
 
 extern int hci_sock_init(void);
 extern void hci_sock_cleanup(void);
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index b18db56..ec34c5a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -148,7 +148,7 @@ static int __hci_request(struct hci_dev *hdev, void (*req)(struct hci_dev *hdev,
 
 	switch (hdev->req_status) {
 	case HCI_REQ_DONE:
-		err = -bt_err(hdev->req_result);
+		err = -bt_to_errno(hdev->req_result);
 		break;
 
 	case HCI_REQ_CANCELED:
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 9ec9c8c..2a27428 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4107,7 +4107,7 @@ static int l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
 		if (conn)
 			l2cap_conn_ready(conn);
 	} else
-		l2cap_conn_del(hcon, bt_err(status));
+		l2cap_conn_del(hcon, bt_to_errno(status));
 
 	return 0;
 }
@@ -4131,7 +4131,7 @@ static int l2cap_disconn_cfm(struct hci_conn *hcon, u8 reason)
 	if (!(hcon->type == ACL_LINK || hcon->type == LE_LINK))
 		return -EINVAL;
 
-	l2cap_conn_del(hcon, bt_err(reason));
+	l2cap_conn_del(hcon, bt_to_errno(reason));
 
 	return 0;
 }
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index b826d1b..4e7cf8b 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -59,7 +59,7 @@ char *batostr(bdaddr_t *ba)
 EXPORT_SYMBOL(batostr);
 
 /* Bluetooth error codes to Unix errno mapping */
-int bt_err(__u16 code)
+int bt_to_errno(__u16 code)
 {
 	switch (code) {
 	case 0:
@@ -149,4 +149,4 @@ int bt_err(__u16 code)
 		return ENOSYS;
 	}
 }
-EXPORT_SYMBOL(bt_err);
+EXPORT_SYMBOL(bt_to_errno);
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c
index cb4fb78..4c3621b 100644
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -932,7 +932,7 @@ static int sco_connect_cfm(struct hci_conn *hcon, __u8 status)
 		if (conn)
 			sco_conn_ready(conn);
 	} else
-		sco_conn_del(hcon, bt_err(status));
+		sco_conn_del(hcon, bt_to_errno(status));
 
 	return 0;
 }
@@ -944,7 +944,7 @@ static int sco_disconn_cfm(struct hci_conn *hcon, __u8 reason)
 	if (hcon->type != SCO_LINK && hcon->type != ESCO_LINK)
 		return -EINVAL;
 
-	sco_conn_del(hcon, bt_err(reason));
+	sco_conn_del(hcon, bt_to_errno(reason));
 
 	return 0;
 }
-- 
1.7.6.rc1


  reply	other threads:[~2011-06-30  1:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1309285246-8495-1-git-send-email-aloisio.almeida@openbossa.org>
     [not found] ` <1309285246-8495-2-git-send-email-aloisio.almeida@openbossa.org>
     [not found]   ` <1309292325.29598.9.camel@Joe-Laptop>
     [not found]     ` <1309311096.2208.33.camel@aeonflux>
     [not found]       ` <1309312164.29598.53.camel@Joe-Laptop>
     [not found]         ` <1309370457.2208.48.camel@aeonflux>
2011-06-30  1:18           ` [PATCH 0/2] bluetooth: Use current logging styles Joe Perches
2011-06-30  1:18             ` Joe Perches [this message]
2011-07-01 19:04               ` [PATCH 1/2] bluetooth: Rename function bt_err to bt_to_errno Gustavo F. Padovan
2011-06-30  1:18             ` [PATCH 2/2] bluetooth: Add bt_printk, convert logging macros to lower case Joe Perches
2011-06-30  3:31               ` Gustavo F. Padovan
2011-06-30  3:47                 ` Joe Perches
2011-06-30  7:19                 ` [PATCH] bluetooth: Add bt_printk Joe Perches
2011-07-01 19:03                   ` Gustavo F. Padovan
2011-07-01 19:36                     ` Gustavo F. Padovan
     [not found]           ` <BANLkTinospg_dhTC8Tcok3kqk9gOryG6eA@mail.gmail.com>
     [not found]             ` <1309391163.29598.92.camel@Joe-Laptop>
     [not found]               ` <CAEsZsEgfKPtsXKGiAV3QuH=YESyS+GHnsNjauVZV==AN94fxug@mail.gmail.com>
2011-06-30  4:49                 ` RFC: Add __dynamic_dev_dbg Joe Perches
2011-06-30 16:32                   ` Jason Baron
2011-06-30 18:14                     ` [PATCH 0/4] dynamic_debug Joe Perches
2011-06-30 18:14                       ` [PATCH 1/4] dynamic_debug: Add __dynamic_dev_dbg Joe Perches
2011-06-30 18:14                       ` [PATCH 2/4] dynamic_debug: Consolidate prefix output to single routine Joe Perches
2011-06-30 18:14                       ` [PATCH 3/4] dynamic_debug: Remove uses of KERN_CONT in dynamic_emit_prefix Joe Perches
2011-06-30 18:14                       ` [PATCH 4/4] dynamic_debug: Convert printks to pr_<level> Joe Perches
2011-06-30 19:51                       ` [PATCH 0/4] dynamic_debug Jason Baron

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=895bc01e49b93b9498ca05cfa1bd9cf58cf30df8.1309396408.git.joe@perches.com \
    --to=joe@perches.com \
    --cc=davem@davemloft.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.org \
    --cc=netdev@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®