]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
6.12-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Dec 2024 09:15:43 +0000 (10:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Dec 2024 09:15:43 +0000 (10:15 +0100)
added patches:
iio-magnetometer-fix-if-scoped_guard-formatting.patch

queue-6.12/iio-magnetometer-fix-if-scoped_guard-formatting.patch [new file with mode: 0644]
queue-6.12/series

diff --git a/queue-6.12/iio-magnetometer-fix-if-scoped_guard-formatting.patch b/queue-6.12/iio-magnetometer-fix-if-scoped_guard-formatting.patch
new file mode 100644 (file)
index 0000000..e1a366e
--- /dev/null
@@ -0,0 +1,47 @@
+From 9a884bdb6e9560c6da44052d5248e89d78c983a6 Mon Sep 17 00:00:00 2001
+From: Stephen Rothwell <sfr@canb.auug.org.au>
+Date: Fri, 8 Nov 2024 16:41:27 +0100
+Subject: iio: magnetometer: fix if () scoped_guard() formatting
+
+From: Stephen Rothwell <sfr@canb.auug.org.au>
+
+commit 9a884bdb6e9560c6da44052d5248e89d78c983a6 upstream.
+
+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
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/iio/magnetometer/af8133j.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/iio/magnetometer/af8133j.c
++++ b/drivers/iio/magnetometer/af8133j.c
+@@ -312,10 +312,11 @@ static int af8133j_set_scale(struct af81
+        * 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);
index c16e77252c3268cdf3d925f7e294bf76b259125d..80b98ff66e45853c2ee15260a7f0ab94466cc629 100644 (file)
@@ -230,6 +230,7 @@ acpi-x86-add-adev-null-check-to-acpi_quirk_skip_serd.patch
 acpi-video-force-native-for-apple-macbookpro11-2-and.patch
 perf-x86-amd-warn-only-on-new-bits-set.patch
 cleanup-adjust-scoped_guard-macros-to-avoid-potentia.patch
+iio-magnetometer-fix-if-scoped_guard-formatting.patch
 timekeeping-always-check-for-negative-motion.patch
 gpio-free-irqs-that-are-still-requested-when-the-chi.patch
 spi-spi-fsl-lpspi-adjust-type-of-scldiv.patch