public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] driver core: drop __must_check from driver_for_each_device
Date: Tue, 20 Aug 2024 11:00:29 +0200	[thread overview]
Message-ID: <bd5221cf-2071-4be0-97b1-00a681482a5b@gmail.com> (raw)

There are several users of driver_for_each_device where the worker
function doesn't actually have a return value. One example is
__igb_notify_dca(). This results in dead code just to make __must_check
happy. So drop this annotation.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 include/linux/device/driver.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h
index 1fc8b6878..aed40242f 100644
--- a/include/linux/device/driver.h
+++ b/include/linux/device/driver.h
@@ -153,8 +153,8 @@ void driver_remove_file(const struct device_driver *driver,
 
 int driver_set_override(struct device *dev, const char **override,
 			const char *s, size_t len);
-int __must_check driver_for_each_device(struct device_driver *drv, struct device *start,
-					void *data, int (*fn)(struct device *dev, void *));
+int driver_for_each_device(struct device_driver *drv, struct device *start,
+			   void *data, int (*fn)(struct device *dev, void *));
 struct device *driver_find_device(const struct device_driver *drv,
 				  struct device *start, const void *data,
 				  int (*match)(struct device *dev, const void *data));
-- 
2.46.0


             reply	other threads:[~2024-08-20  9:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  9:00 Heiner Kallweit [this message]
2024-08-20 13:31 ` [PATCH] driver core: drop __must_check from driver_for_each_device Greg Kroah-Hartman
2024-08-20 15:24   ` Heiner Kallweit

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=bd5221cf-2071-4be0-97b1-00a681482a5b@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@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