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

On Tue, Aug 20, 2024 at 11:00:29AM +0200, Heiner Kallweit wrote:
> 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.

No, that code looks correct, the only "odd" thing is that it's a
notifier callback and so it requires a different translation of an error
message.

Personally, attempting for a driver to iterate over all devices assigned
to it just to print out a kernel log message seems like the big abuse
here, why is any of that needed at all?  Ah, that's a side affect of the
dca api there.  Ok, still looks correct, I don't see a problem.

Ignoring error values is not a good idea, let's not make it simple to do
so.

thanks,

greg k-h

  reply	other threads:[~2024-08-20 13:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-20  9:00 [PATCH] driver core: drop __must_check from driver_for_each_device Heiner Kallweit
2024-08-20 13:31 ` Greg Kroah-Hartman [this message]
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=2024082021-service-handsaw-407b@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --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