From: trix@redhat.com
To: sudeep.holla@arm.com, cristian.marussi@arm.com
Cc: linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Tom Rix <trix@redhat.com>
Subject: [PATCH] firmware: arm_scmi: replace resevered identifiers in macros
Date: Wed, 22 Dec 2021 09:25:19 -0800 [thread overview]
Message-ID: <20211222172519.3209478-1-trix@redhat.com> (raw)
From: Tom Rix <trix@redhat.com>
Identifiers starting with __ are resevered. Replace __X with X.
The arguments to these macros are pointers. The macros only reads
values. There is no need to make copies of the pointers, use them
directly.
Fixes: a287126c31ab ("firmware: arm_scmi: Add configurable polling mode for transports")
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/firmware/arm_scmi/driver.c | 31 ++++++++----------------------
1 file changed, 8 insertions(+), 23 deletions(-)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index b4bbfe89368df..d2fcfa9da931c 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -36,29 +36,14 @@
#define CREATE_TRACE_POINTS
#include <trace/events/scmi.h>
-#define IS_POLLING_REQUIRED(__c, __i) \
- ((__c)->no_completion_irq || (__i)->desc->force_polling) \
-
-#define IS_TRANSPORT_POLLING_CAPABLE(__i) \
-({ \
- bool __ret; \
- typeof(__i) i_ = __i; \
- \
- __ret = ((i_)->desc->ops->poll_done || \
- (i_)->desc->sync_cmds_completed_on_ret); \
- __ret; \
-})
-
-#define IS_POLLING_ENABLED(__c, __i) \
-({ \
- bool __ret; \
- typeof(__c) c_ = __c; \
- typeof(__i) i_ = __i; \
- \
- __ret = (IS_POLLING_REQUIRED(c_, i_) && \
- IS_TRANSPORT_POLLING_CAPABLE(i_)); \
- __ret; \
-})
+#define IS_POLLING_REQUIRED(c, i) \
+ ((c)->no_completion_irq || (i)->desc->force_polling)
+
+#define IS_TRANSPORT_POLLING_CAPABLE(i) \
+ ((i)->desc->ops->poll_done || (i)->desc->sync_cmds_completed_on_ret)
+
+#define IS_POLLING_ENABLED(c, i) \
+ (IS_POLLING_REQUIRED(c, i) && IS_TRANSPORT_POLLING_CAPABLE(i))
enum scmi_error_codes {
SCMI_SUCCESS = 0, /* Success */
--
2.26.3
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-12-22 17:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 17:25 trix [this message]
2021-12-22 18:15 ` [PATCH] firmware: arm_scmi: replace resevered identifiers in macros Sudeep Holla
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=20211222172519.3209478-1-trix@redhat.com \
--to=trix@redhat.com \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@arm.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