mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 02:04:05 +08:00
Driver core: Drop __must_check from bus_for_each_drv()
There is little rationale for marking bus_for_each_drv() __must_check. It is more of an iteration helper than a real function. You don't know in advance which callback it will be used on, so you have no clue how important it can be to check the returned value. In practice, this helper function can be used for best-effort tasks. As a matter of fact, bus_for_each_dev() is not marked __must_check. So remove it from bus_for_each_drv() as well. This is the same that was done back in October 2006 by Russell King for device_for_each_child(), for exactly the same reasons. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
ed1d218c95
commit
cc7447a5fa
@ -84,9 +84,8 @@ struct device *bus_find_device_by_name(struct bus_type *bus,
|
||||
struct device *start,
|
||||
const char *name);
|
||||
|
||||
int __must_check bus_for_each_drv(struct bus_type *bus,
|
||||
struct device_driver *start, void *data,
|
||||
int (*fn)(struct device_driver *, void *));
|
||||
int bus_for_each_drv(struct bus_type *bus, struct device_driver *start,
|
||||
void *data, int (*fn)(struct device_driver *, void *));
|
||||
|
||||
void bus_sort_breadthfirst(struct bus_type *bus,
|
||||
int (*compare)(const struct device *a,
|
||||
|
Loading…
Reference in New Issue
Block a user