2024-01-23 10:11:29

by Simon Horman

[permalink] [raw]
Subject: [PATCH] mfd: rave-sp: Avoid unnecessary use of comma operator

Although it does not seem to have any untoward side-effects,
the use of ';' to separate to assignments seems more appropriate than ','.

Flagged by clang-17 -Wcomma

No functional change intended.
Compile tested only.

Signed-off-by: Simon Horman <[email protected]>
---
drivers/mfd/rave-sp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/rave-sp.c b/drivers/mfd/rave-sp.c
index da50eba10014..aca552890553 100644
--- a/drivers/mfd/rave-sp.c
+++ b/drivers/mfd/rave-sp.c
@@ -358,7 +358,7 @@ int rave_sp_exec(struct rave_sp *sp,

ackid = atomic_inc_return(&sp->ackid);
reply.ackid = ackid;
- reply.code = rave_sp_reply_code((u8)command),
+ reply.code = rave_sp_reply_code((u8)command);

mutex_lock(&sp->bus_lock);




2024-01-25 13:39:02

by Lee Jones

[permalink] [raw]
Subject: Re: (subset) [PATCH] mfd: rave-sp: Avoid unnecessary use of comma operator

On Tue, 23 Jan 2024 09:59:48 +0000, Simon Horman wrote:
> Although it does not seem to have any untoward side-effects,
> the use of ';' to separate to assignments seems more appropriate than ','.
>
> Flagged by clang-17 -Wcomma
>
> No functional change intended.
> Compile tested only.
>
> [...]

Applied, thanks!

[1/1] mfd: rave-sp: Avoid unnecessary use of comma operator
commit: 67421634ade0979dafd3e3f21c9b63bc93ef4760

--
Lee Jones [李琼斯]