All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonas Bonn <jonas@southpole.se>
To: ofono@ofono.org
Subject: [RFC PATCH 13/30] qmi: assume version_list is up to date
Date: Wed, 28 Mar 2018 20:59:59 +0200	[thread overview]
Message-ID: <20180328190016.28509-14-jonas@southpole.se> (raw)
In-Reply-To: <20180328190016.28509-1-jonas@southpole.se>

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

The way things are currently coded, the gobi plugin calls
qmi_device_discover and does nothing else until it succeeds.  As such,
we can safely assume that the version_list is set up when we go to
create a service.
---
 drivers/qmimodem/qmi.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/drivers/qmimodem/qmi.c b/drivers/qmimodem/qmi.c
index e11e05b1..3eb9e8c3 100644
--- a/drivers/qmimodem/qmi.c
+++ b/drivers/qmimodem/qmi.c
@@ -2016,20 +2016,9 @@ static bool service_create(struct qmi_device *device, bool shared,
 	data->user_data = user_data;
 	data->destroy = destroy;
 
-	if (device->version_list) {
-		service_create_discover(device->version_count,
-						device->version_list, data);
-		goto done;
-	}
-
-	if (qmi_device_discover(device, service_create_discover, data, NULL))
-		goto done;
+	service_create_discover(device->version_count,
+					device->version_list, data);
 
-	g_free(data);
-
-	return false;
-
-done:
 	data->timeout = g_timeout_add_seconds(8, service_create_reply, data);
 	__qmi_device_discovery_started(device, &data->super);
 
-- 
2.15.1


  parent reply	other threads:[~2018-03-28 18:59 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 18:59 [RFC PATCH 00/30] QMI rework Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 01/30] qmi: remove unused fields of service_send_data Jonas Bonn
2018-03-28 19:53   ` Denis Kenzior
2018-03-28 21:09     ` Jonas Bonn
2018-03-28 21:18       ` Denis Kenzior
2018-03-29 10:46     ` Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 02/30] qmi: remove headroom parameter from req_alloc Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 03/30] qmi: unify common request header setup Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 04/30] qmi: request_alloc has no meaningful failure path Jonas Bonn
2018-03-28 19:59   ` Denis Kenzior
2018-03-28 20:51     ` Jonas Bonn
2018-03-28 21:12       ` Denis Kenzior
2018-03-28 18:59 ` [RFC PATCH 05/30] qmi: push request_submit into request_alloc Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 06/30] qmi: rename request_alloc to request_submit Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 07/30] qmi: figure out request id without accessing header Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 08/30] qmi: make qmi_service_send return result Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 09/30] qmi: drop 'head' pointer from request_submit Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 10/30] qmi: remove unused qmi_service_cancel Jonas Bonn
2018-03-28 21:07   ` Denis Kenzior
2018-03-28 18:59 ` [RFC PATCH 11/30] qmi: remove unused qmi_service_unregister Jonas Bonn
2018-03-28 18:59 ` [RFC PATCH 12/30] qmi: replace GQueues for requests Jonas Bonn
2018-03-28 20:16   ` Denis Kenzior
2018-03-28 21:06     ` Jonas Bonn
2018-03-28 21:24       ` Denis Kenzior
2018-03-28 18:59 ` Jonas Bonn [this message]
2018-03-28 19:00 ` [RFC PATCH 14/30] qmi: absorb service_create_discover into service_create Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 15/30] qmi: drop discovery_queue Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 16/30] qmi: make services always shared Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 17/30] qmi: switch service_list to list_head type Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 18/30] qmi: switch notify_list " Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 19/30] qmi: drop unused struct field Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 20/30] qmi: reference version_info from device in services Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 21/30] qmi: make version_list private Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 22/30] qmi: move client_id to qmi_version Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 23/30] qmi: use standard endian macros Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 24/30] qmi: convert version_list to struct list head Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 25/30] qmi: move service device to service_info Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 26/30] qmi: make all services unique instances backed by common description Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 27/30] qmi: drop qmi_service_ref function Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 28/30] qmi: rename qmi_service_create/unref to open/close Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 29/30] qmi: pass service directly to request_submit Jonas Bonn
2018-03-28 19:00 ` [RFC PATCH 30/30] qmi: add requests to service queue Jonas Bonn
2018-03-28 21:51 ` [RFC PATCH 00/30] QMI rework Denis Kenzior
2018-03-29 10:31   ` Jonas Bonn
2018-03-29 15:55     ` Denis Kenzior
2018-03-29 16:43       ` Jonas Bonn
2018-03-29 18:08         ` Denis Kenzior

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=20180328190016.28509-14-jonas@southpole.se \
    --to=jonas@southpole.se \
    --cc=ofono@ofono.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.