From: "tip-bot2 for Stephen Rothwell" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: kernel test robot <lkp@intel.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: locking/core] iio: magnetometer: fix if () scoped_guard() formatting
Date: Mon, 11 Nov 2024 10:58:01 -0000 [thread overview]
Message-ID: <173132268163.32228.9504803007436629008.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20241108154258.21411-1-przemyslaw.kitszel@intel.com>
The following commit has been merged into the locking/core branch of tip:
Commit-ID: 9a884bdb6e9560c6da44052d5248e89d78c983a6
Gitweb: https://git.kernel.org/tip/9a884bdb6e9560c6da44052d5248e89d78c983a6
Author: Stephen Rothwell <sfr@canb.auug.org.au>
AuthorDate: Fri, 08 Nov 2024 16:41:27 +01:00
Committer: Peter Zijlstra <peterz@infradead.org>
CommitterDate: Mon, 11 Nov 2024 11:49:47 +01:00
iio: magnetometer: fix if () scoped_guard() formatting
Add mising braces after an if condition that contains scoped_guard().
This style is both preferred and necessary here, to fix warning after
scoped_guard() change in commit fcc22ac5baf0 ("cleanup: Adjust
scoped_guard() macros to avoid potential warning") to have if-else inside
of the macro. Current (no braces) use in af8133j_set_scale() yields
the following warnings:
af8133j.c:315:12: warning: suggest explicit braces to avoid ambiguous 'else' [-Wdangling-else]
af8133j.c:316:3: warning: add explicit braces to avoid dangling else [-Wdangling-else]
Fixes: fcc22ac5baf0 ("cleanup: Adjust scoped_guard() macros to avoid potential warning")
Closes: https://lore.kernel.org/oe-kbuild-all/202409270848.tTpyEAR7-lkp@intel.com/
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20241108154258.21411-1-przemyslaw.kitszel@intel.com
---
drivers/iio/magnetometer/af8133j.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iio/magnetometer/af8133j.c b/drivers/iio/magnetometer/af8133j.c
index d81d89a..acd291f 100644
--- a/drivers/iio/magnetometer/af8133j.c
+++ b/drivers/iio/magnetometer/af8133j.c
@@ -312,10 +312,11 @@ static int af8133j_set_scale(struct af8133j_data *data,
* When suspended, just store the new range to data->range to be
* applied later during power up.
*/
- if (!pm_runtime_status_suspended(dev))
+ if (!pm_runtime_status_suspended(dev)) {
scoped_guard(mutex, &data->mutex)
ret = regmap_write(data->regmap,
AF8133J_REG_RANGE, range);
+ }
pm_runtime_enable(dev);
prev parent reply other threads:[~2024-11-11 10:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 15:41 [PATCH] " Przemek Kitszel
2024-11-08 18:02 ` Jonathan Cameron
2024-11-09 11:27 ` Jonathan Cameron
2024-11-11 9:16 ` Peter Zijlstra
2024-11-09 17:15 ` Markus Elfring
2024-11-11 10:58 ` tip-bot2 for Stephen Rothwell [this message]
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=173132268163.32228.9504803007436629008.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=Jonathan.Cameron@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=lkp@intel.com \
--cc=peterz@infradead.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sfr@canb.auug.org.au \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®