From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Johan Hovold <johan@kernel.org>, Alex Elder <elder@kernel.org>,
Mitchell Tasman <tasman@leaflabs.com>,
Dan Carpenter <dan.carpenter@oracle.com>,
greybus-dev@lists.linaro.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] greybus: svc: clean up link configuration hack at hello
Date: Wed, 2 Feb 2022 12:33:47 +0100 [thread overview]
Message-ID: <20220202113347.1288-4-johan@kernel.org> (raw)
In-Reply-To: <20220202113347.1288-1-johan@kernel.org>
Commit ee2f2074fdb2 ("greybus: svc: reconfig APBridgeA-Switch link to
handle required load") added a temporary hack which reconfigures the
link at HELLO by abusing the deferred request processing mechanism.
Restructure the HELLO request processing so that the link-configuration
work is queued before creating the debugfs files and add a comment
explaining why it's there.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/greybus/svc.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/greybus/svc.c b/drivers/greybus/svc.c
index 4f93d6b2f4ed..56d2b44d6fef 100644
--- a/drivers/greybus/svc.c
+++ b/drivers/greybus/svc.c
@@ -864,16 +864,19 @@ static int gb_svc_hello(struct gb_operation *op)
goto err_deregister_svc;
}
- gb_svc_debugfs_init(svc);
-
+ /*
+ * FIXME: This is a temporary hack to reconfigure the link at HELLO
+ * (which abuses the deferred request processing mechanism).
+ */
ret = gb_svc_queue_deferred_request(op);
if (ret)
- goto err_remove_debugfs;
+ goto err_destroy_watchdog;
+
+ gb_svc_debugfs_init(svc);
return 0;
-err_remove_debugfs:
- gb_svc_debugfs_exit(svc);
+err_destroy_watchdog:
gb_svc_watchdog_destroy(svc);
err_deregister_svc:
device_del(&svc->dev);
--
2.34.1
next prev parent reply other threads:[~2022-02-02 11:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-02 11:33 [PATCH 0/3] greybus: svc: fix hello processing Johan Hovold
2022-02-02 11:33 ` [PATCH 1/3] greybus: svc: fix an error handling bug in gb_svc_hello() Johan Hovold
2022-02-02 11:33 ` [PATCH 2/3] greybus: svc: clean up hello error path Johan Hovold
2022-02-02 11:33 ` Johan Hovold [this message]
2022-02-02 11:48 ` [PATCH 0/3] greybus: svc: fix hello processing Dan Carpenter
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=20220202113347.1288-4-johan@kernel.org \
--to=johan@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=elder@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=greybus-dev@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tasman@leaflabs.com \
/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