All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grzegorz Kolodziejczyk <grzegorz.kolodziejczyk@tieto.com>
To: linux-bluetooth@vger.kernel.org
Subject: [PATCH 08/12] profiles/network: Shortening service name argument to srv
Date: Thu, 26 Feb 2015 12:53:30 +0100	[thread overview]
Message-ID: <1424951614-8527-8-git-send-email-grzegorz.kolodziejczyk@tieto.com> (raw)
In-Reply-To: <1424951614-8527-1-git-send-email-grzegorz.kolodziejczyk@tieto.com>

Current argument naming is long and it can be simplified to srv.
---
 profiles/network/connection.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/profiles/network/connection.c b/profiles/network/connection.c
index cc73989..19a0d8d 100644
--- a/profiles/network/connection.c
+++ b/profiles/network/connection.c
@@ -78,9 +78,9 @@ struct network_conn {
 
 static GSList *peers = NULL;
 
-static uint16_t get_service_id(struct btd_service *service)
+static uint16_t get_service_id(struct btd_service *srv)
 {
-	return bnep_service_id(btd_service_get_profile(service)->remote_uuid);
+	return bnep_service_id(btd_service_get_profile(srv)->remote_uuid);
 }
 
 static struct network_peer *find_peer(GSList *list, struct btd_device *device)
@@ -308,11 +308,11 @@ static DBusMessage *local_connect(DBusConnection *conn,
 }
 
 /* Connect and initiate BNEP session */
-int connection_connect(struct btd_service *service)
+int connection_connect(struct btd_service *srv)
 {
-	struct network_conn *nc = btd_service_get_user_data(service);
+	struct network_conn *nc = btd_service_get_user_data(srv);
 	struct network_peer *peer = nc->peer;
-	uint16_t id = get_service_id(service);
+	uint16_t id = get_service_id(srv);
 	GError *err = NULL;
 	const bdaddr_t *src;
 	const bdaddr_t *dst;
@@ -342,9 +342,9 @@ int connection_connect(struct btd_service *service)
 	return 0;
 }
 
-int connection_disconnect(struct btd_service *service)
+int connection_disconnect(struct btd_service *srv)
 {
-	struct network_conn *nc = btd_service_get_user_data(service);
+	struct network_conn *nc = btd_service_get_user_data(srv);
 
 	if (nc->state == DISCONNECTED)
 		return 0;
@@ -496,12 +496,12 @@ static const GDBusPropertyTable connection_properties[] = {
 	{ }
 };
 
-void connection_unregister(struct btd_service *service)
+void connection_unregister(struct btd_service *srv)
 {
-	struct btd_device *device = btd_service_get_device(service);
-	struct network_conn *conn = btd_service_get_user_data(service);
+	struct btd_device *device = btd_service_get_device(srv);
+	struct network_conn *conn = btd_service_get_user_data(srv);
 	struct network_peer *peer = conn->peer;
-	uint16_t id = get_service_id(service);
+	uint16_t id = get_service_id(srv);
 
 	DBG("%s id %u", device_get_path(device), id);
 
@@ -543,12 +543,12 @@ static struct network_peer *create_peer(struct btd_device *device)
 	return peer;
 }
 
-int connection_register(struct btd_service *service)
+int connection_register(struct btd_service *srv)
 {
-	struct btd_device *device = btd_service_get_device(service);
+	struct btd_device *device = btd_service_get_device(srv);
 	struct network_peer *peer;
 	struct network_conn *nc;
-	uint16_t id = get_service_id(service);
+	uint16_t id = get_service_id(srv);
 
 	DBG("%s id %u", device_get_path(device), id);
 
@@ -562,11 +562,11 @@ int connection_register(struct btd_service *service)
 
 	nc = g_new0(struct network_conn, 1);
 	nc->id = id;
-	nc->service = btd_service_ref(service);
+	nc->service = btd_service_ref(srv);
 	nc->state = DISCONNECTED;
 	nc->peer = peer;
 
-	btd_service_set_user_data(service, nc);
+	btd_service_set_user_data(srv, nc);
 
 	DBG("id %u registered", id);
 
-- 
2.1.0


  parent reply	other threads:[~2015-02-26 11:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-26 11:53 [PATCH 01/12] profiles/network: Minor style fix Grzegorz Kolodziejczyk
2015-02-26 11:53 ` [PATCH 02/12] profiles/network: Simplify id and bridge of server checking Grzegorz Kolodziejczyk
2015-02-26 11:53 ` [PATCH 03/12] profiles/network: Integrate get and check bnep setup services roles Grzegorz Kolodziejczyk
2015-02-26 11:53 ` [PATCH 04/12] profiles/network: Move bnep connection setup logic to bnep Grzegorz Kolodziejczyk
2015-03-02 11:59   ` Szymon Janc
2015-02-26 11:53 ` [PATCH 05/12] profiles/network: Handle ctrl rsp after conn setup by bnep Grzegorz Kolodziejczyk
2015-03-02 12:06   ` Szymon Janc
2015-02-26 11:53 ` [PATCH 06/12] profiles/network: Fix sending command responses Grzegorz Kolodziejczyk
2015-03-02 10:12   ` Szymon Janc
2015-02-26 11:53 ` [PATCH 07/12] profiles/network: Keep interface arguments naming consistent Grzegorz Kolodziejczyk
2015-02-26 11:53 ` Grzegorz Kolodziejczyk [this message]
2015-02-26 11:53 ` [PATCH 09/12] profiles/network: Make get_service_id connections private method Grzegorz Kolodziejczyk
2015-02-26 11:53 ` [PATCH 10/12] profiles/network: Remove unneded bnep_uuid function from bnep code Grzegorz Kolodziejczyk
2015-02-26 11:53 ` [PATCH 11/12] profiles/network: Remove not needed get name by bnep id function Grzegorz Kolodziejczyk
2015-02-26 11:53 ` [PATCH 12/12] profiles/network: Move disconn cb setting to bnep connect method Grzegorz Kolodziejczyk
2015-03-02 12:12 ` [PATCH 01/12] profiles/network: Minor style fix Szymon Janc

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=1424951614-8527-8-git-send-email-grzegorz.kolodziejczyk@tieto.com \
    --to=grzegorz.kolodziejczyk@tieto.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 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.