All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sarangdhar Joshi <spjoshi@codeaurora.org>
To: Ohad Ben-Cohen <ohad@wizery.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Loic Pallardy <loic.pallardy@st.com>,
	Santosh Shilimkar <ssantosh@kernel.org>
Cc: Sarangdhar Joshi <spjoshi@codeaurora.org>,
	linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, Dave Gerlach <d-gerlach@ti.com>,
	Suman Anna <s-anna@ti.com>, Stephen Boyd <sboyd@codeaurora.org>,
	Trilok Soni <tsoni@codeaurora.org>
Subject: [PATCH 2/2] remoteproc: Modify the function names
Date: Tue, 24 Jan 2017 15:13:01 -0800	[thread overview]
Message-ID: <1485299581-30476-2-git-send-email-spjoshi@codeaurora.org> (raw)
In-Reply-To: <1485299581-30476-1-git-send-email-spjoshi@codeaurora.org>

The functions rproc_add_virtio_devices() and
rproc_fw_config_virtio() are reduced to trigger auto-boot
only. Modify these function names and related comments to
reflect their current state.

This patch does not add any functional change.

Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
---
 drivers/remoteproc/remoteproc_core.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 16242b0..c6b1d4a 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -959,14 +959,14 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
 }
 
 /*
- * take a firmware and look for virtio devices to register.
+ * take a firmware and boot it up.
  *
  * Note: this function is called asynchronously upon registration of the
  * remote processor (so we must wait until it completes before we try
  * to unregister the device. one other option is just to use kref here,
  * that might be cleaner).
  */
-static void rproc_fw_config_virtio(const struct firmware *fw, void *context)
+static void rproc_auto_boot_callback(const struct firmware *fw, void *context)
 {
 	struct rproc *rproc = context;
 
@@ -975,21 +975,17 @@ static void rproc_fw_config_virtio(const struct firmware *fw, void *context)
 	release_firmware(fw);
 }
 
-static int rproc_add_virtio_devices(struct rproc *rproc)
+static int rproc_trigger_auto_boot(struct rproc *rproc)
 {
 	int ret;
 
 	/*
-	 * We must retrieve early virtio configuration info from
-	 * the firmware (e.g. whether to register a virtio device,
-	 * what virtio features does it support, ...).
-	 *
 	 * We're initiating an asynchronous firmware loading, so we can
 	 * be built-in kernel code, without hanging the boot process.
 	 */
 	ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
 				      rproc->firmware, &rproc->dev, GFP_KERNEL,
-				      rproc, rproc_fw_config_virtio);
+				      rproc, rproc_auto_boot_callback);
 	if (ret < 0)
 		dev_err(&rproc->dev, "request_firmware_nowait err: %d\n", ret);
 
@@ -1287,7 +1283,7 @@ int rproc_add(struct rproc *rproc)
 
 	/* if rproc is marked always-on, request it to boot */
 	if (rproc->auto_boot) {
-		ret = rproc_add_virtio_devices(rproc);
+		ret = rproc_trigger_auto_boot(rproc);
 		if (ret < 0)
 			return ret;
 	}
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: spjoshi@codeaurora.org (Sarangdhar Joshi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] remoteproc: Modify the function names
Date: Tue, 24 Jan 2017 15:13:01 -0800	[thread overview]
Message-ID: <1485299581-30476-2-git-send-email-spjoshi@codeaurora.org> (raw)
In-Reply-To: <1485299581-30476-1-git-send-email-spjoshi@codeaurora.org>

The functions rproc_add_virtio_devices() and
rproc_fw_config_virtio() are reduced to trigger auto-boot
only. Modify these function names and related comments to
reflect their current state.

This patch does not add any functional change.

Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org>
---
 drivers/remoteproc/remoteproc_core.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index 16242b0..c6b1d4a 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -959,14 +959,14 @@ static int rproc_fw_boot(struct rproc *rproc, const struct firmware *fw)
 }
 
 /*
- * take a firmware and look for virtio devices to register.
+ * take a firmware and boot it up.
  *
  * Note: this function is called asynchronously upon registration of the
  * remote processor (so we must wait until it completes before we try
  * to unregister the device. one other option is just to use kref here,
  * that might be cleaner).
  */
-static void rproc_fw_config_virtio(const struct firmware *fw, void *context)
+static void rproc_auto_boot_callback(const struct firmware *fw, void *context)
 {
 	struct rproc *rproc = context;
 
@@ -975,21 +975,17 @@ static void rproc_fw_config_virtio(const struct firmware *fw, void *context)
 	release_firmware(fw);
 }
 
-static int rproc_add_virtio_devices(struct rproc *rproc)
+static int rproc_trigger_auto_boot(struct rproc *rproc)
 {
 	int ret;
 
 	/*
-	 * We must retrieve early virtio configuration info from
-	 * the firmware (e.g. whether to register a virtio device,
-	 * what virtio features does it support, ...).
-	 *
 	 * We're initiating an asynchronous firmware loading, so we can
 	 * be built-in kernel code, without hanging the boot process.
 	 */
 	ret = request_firmware_nowait(THIS_MODULE, FW_ACTION_HOTPLUG,
 				      rproc->firmware, &rproc->dev, GFP_KERNEL,
-				      rproc, rproc_fw_config_virtio);
+				      rproc, rproc_auto_boot_callback);
 	if (ret < 0)
 		dev_err(&rproc->dev, "request_firmware_nowait err: %d\n", ret);
 
@@ -1287,7 +1283,7 @@ int rproc_add(struct rproc *rproc)
 
 	/* if rproc is marked always-on, request it to boot */
 	if (rproc->auto_boot) {
-		ret = rproc_add_virtio_devices(rproc);
+		ret = rproc_trigger_auto_boot(rproc);
 		if (ret < 0)
 			return ret;
 	}
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2017-01-24 23:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 23:13 [RFC][PATCH 1/2] remoteproc: Reduce asynchronous request_firmware to auto-boot only Sarangdhar Joshi
2017-01-24 23:13 ` Sarangdhar Joshi
2017-01-24 23:13 ` Sarangdhar Joshi [this message]
2017-01-24 23:13   ` [PATCH 2/2] remoteproc: Modify the function names Sarangdhar Joshi
2017-02-06 21:08 ` [RFC][PATCH 1/2] remoteproc: Reduce asynchronous request_firmware to auto-boot only Bjorn Andersson
2017-02-06 21:08   ` Bjorn Andersson
2017-02-07 18:55   ` Sarangdhar Joshi
2017-02-07 18:55     ` Sarangdhar Joshi
2017-02-07 18:55     ` Sarangdhar Joshi

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=1485299581-30476-2-git-send-email-spjoshi@codeaurora.org \
    --to=spjoshi@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=d-gerlach@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=ohad@wizery.com \
    --cc=s-anna@ti.com \
    --cc=sboyd@codeaurora.org \
    --cc=ssantosh@kernel.org \
    --cc=tsoni@codeaurora.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.