[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024082021-service-handsaw-407b@gregkh>
Date: Tue, 20 Aug 2024 21:31:15 +0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Heiner Kallweit <hkallweit1@...il.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] driver core: drop __must_check from
driver_for_each_device
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
Powered by blists - more mailing lists