From: Greg Kroah-Hartman Date: Wed, 9 Aug 2023 10:02:24 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.14.322~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=458617f76e8f8f32277184446527a931d43af1b2;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: revert-driver-core-annotate-dev_err_probe-with-__must_check.patch --- 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 index 00000000000..3038a0e9f03 --- /dev/null +++ b/queue-5.4/revert-driver-core-annotate-dev_err_probe-with-__must_check.patch @@ -0,0 +1,40 @@ +From f601e8f37c2c1c52f2923fffc48204a7f7dc023d Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Wed, 9 Sep 2020 09:37:40 +0200 +Subject: Revert "driver core: Annotate dev_err_probe() with __must_check" + +From: Greg Kroah-Hartman + +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 +Reported-by: Krzysztof Kozlowski +Fixes: e1f82a0dcf38 ("driver core: Annotate dev_err_probe() with __must_check") +Cc: Andy Shevchenko +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Greg Kroah-Hartman +--- + 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) \ diff --git a/queue-5.4/series b/queue-5.4/series index 5d6e72ad487..9929f12ab70 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -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