]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Aug 2023 10:02:24 +0000 (12:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Aug 2023 10:02:24 +0000 (12:02 +0200)
added patches:
revert-driver-core-annotate-dev_err_probe-with-__must_check.patch

queue-5.4/revert-driver-core-annotate-dev_err_probe-with-__must_check.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/revert-driver-core-annotate-dev_err_probe-with-__must_check.patch b/queue-5.4/revert-driver-core-annotate-dev_err_probe-with-__must_check.patch
new file mode 100644 (file)
index 0000000..3038a0e
--- /dev/null
@@ -0,0 +1,40 @@
+From f601e8f37c2c1c52f2923fffc48204a7f7dc023d Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Date: Wed, 9 Sep 2020 09:37:40 +0200
+Subject: Revert "driver core: Annotate dev_err_probe() with __must_check"
+
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+commit f601e8f37c2c1c52f2923fffc48204a7f7dc023d upstream.
+
+This reverts commit e1f82a0dcf388d98bcc7ad195c03bd812405e6b2 as it's
+already starting to cause build warnings in linux-next for things that
+are "obviously correct".
+
+It's up to driver authors do "do the right thing" here with this
+function, and if they don't want to call it as the last line of a
+function, that's up to them, otherwise code that looks like:
+       ret = dev_err_probe(..., ret, ...);
+does look really "odd".
+
+Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
+Fixes: e1f82a0dcf38 ("driver core: Annotate dev_err_probe() with __must_check")
+Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/device.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/device.h
++++ b/include/linux/device.h
+@@ -1872,7 +1872,7 @@ do {                                                                     \
+                       dev_driver_string(dev), dev_name(dev), ## arg)
+ extern __printf(3, 4)
+-int __must_check dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
++int dev_err_probe(const struct device *dev, int err, const char *fmt, ...);
+ /* Create alias, so I can be autoloaded. */
+ #define MODULE_ALIAS_CHARDEV(major,minor) \
index 5d6e72ad4876040811510a3b6dce35851adb8989..9929f12ab708fb5aee7f098f94699f2a9e6ee1cc 100644 (file)
@@ -151,3 +151,4 @@ arm-dts-nxp-imx6sll-fix-wrong-property-name-in-usbph.patch
 driver-core-annotate-dev_err_probe-with-__must_check.patch
 driver-code-print-symbolic-error-code.patch
 drivers-core-fix-kernel-doc-markup-for-dev_err_probe.patch
+revert-driver-core-annotate-dev_err_probe-with-__must_check.patch