Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[PATCH] Remove __must_check for device_for_each_child()

Eliminate more __must_check madness.

The return code from device_for_each_child() depends on the values
which the helper function returns. If the helper function always
returns zero, it's utterly pointless to check the return code from
device_for_each_child().

The only code which knows if the return value should be checked is
the caller itself, so forcing the return code to always be checked
is silly. Hence, remove the __must_check annotation.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Russell King and committed by
Linus Torvalds
04fed361 dee6515b

+1 -1
+1 -1
include/linux/device.h
··· 393 393 extern void device_initialize(struct device * dev); 394 394 extern int __must_check device_add(struct device * dev); 395 395 extern void device_del(struct device * dev); 396 - extern int __must_check device_for_each_child(struct device *, void *, 396 + extern int device_for_each_child(struct device *, void *, 397 397 int (*fn)(struct device *, void *)); 398 398 extern int device_rename(struct device *dev, char *new_name); 399 399