From: johan.hedberg@gmail.com
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 4/4] Bluetooth: mgmt: Use more consistent error variable names
Date: Fri, 17 Feb 2012 01:22:58 +0200 [thread overview]
Message-ID: <1329434578-5928-4-git-send-email-johan.hedberg@gmail.com> (raw)
In-Reply-To: <1329434578-5928-1-git-send-email-johan.hedberg@gmail.com>
From: Johan Hedberg <johan.hedberg@intel.com>
For simple integer errors the variable name "err" is more consistent
with the existing code base than "ret".
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
---
net/bluetooth/mgmt.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index ecfb747..86a7a5c 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2696,7 +2696,7 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
{
struct cmd_lookup match = { NULL, hdev };
__le32 ev;
- int ret;
+ int err;
mgmt_pending_foreach(MGMT_OP_SET_POWERED, hdev, settings_rsp, &match);
@@ -2707,50 +2707,50 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
ev = cpu_to_le32(get_current_settings(hdev));
- ret = mgmt_event(MGMT_EV_NEW_SETTINGS, hdev, &ev, sizeof(ev),
+ err = mgmt_event(MGMT_EV_NEW_SETTINGS, hdev, &ev, sizeof(ev),
match.sk);
if (match.sk)
sock_put(match.sk);
- return ret;
+ return err;
}
int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable)
{
struct cmd_lookup match = { NULL, hdev };
__le32 ev;
- int ret;
+ int err;
mgmt_pending_foreach(MGMT_OP_SET_DISCOVERABLE, hdev, settings_rsp, &match);
ev = cpu_to_le32(get_current_settings(hdev));
- ret = mgmt_event(MGMT_EV_NEW_SETTINGS, hdev, &ev, sizeof(ev),
+ err = mgmt_event(MGMT_EV_NEW_SETTINGS, hdev, &ev, sizeof(ev),
match.sk);
if (match.sk)
sock_put(match.sk);
- return ret;
+ return err;
}
int mgmt_connectable(struct hci_dev *hdev, u8 connectable)
{
__le32 ev;
struct cmd_lookup match = { NULL, hdev };
- int ret;
+ int err;
mgmt_pending_foreach(MGMT_OP_SET_CONNECTABLE, hdev, settings_rsp,
&match);
ev = cpu_to_le32(get_current_settings(hdev));
- ret = mgmt_event(MGMT_EV_NEW_SETTINGS, hdev, &ev, sizeof(ev), match.sk);
+ err = mgmt_event(MGMT_EV_NEW_SETTINGS, hdev, &ev, sizeof(ev), match.sk);
if (match.sk)
sock_put(match.sk);
- return ret;
+ return err;
}
int mgmt_write_scan_failed(struct hci_dev *hdev, u8 scan, u8 status)
--
1.7.9
next prev parent reply other threads:[~2012-02-16 23:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-16 23:22 [PATCH 1/4] Bluetooth: Remove unused member from cmd_lookup struct johan.hedberg
2012-02-16 23:22 ` [PATCH 2/4] Bluetooth: mgmt: Add support for Set Link Security command johan.hedberg
2012-02-16 23:39 ` Johan Hedberg
2012-02-17 8:33 ` Marcel Holtmann
2012-02-16 23:22 ` [PATCH 3/4] Bluetooth: mgmt: Implement Set SSP command johan.hedberg
2012-02-17 8:33 ` Marcel Holtmann
2012-02-16 23:22 ` johan.hedberg [this message]
2012-02-17 8:33 ` [PATCH 4/4] Bluetooth: mgmt: Use more consistent error variable names Marcel Holtmann
2012-02-17 8:33 ` [PATCH 1/4] Bluetooth: Remove unused member from cmd_lookup struct 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=1329434578-5928-4-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).