Skip to content

Commit b9d4e71

Browse files
committed
driver core: remove __must_check from device_create_file
With the conversion of the sysdev to a real struct device, more drivers are calling device_create_file, and some of them don't check the return value, which isn't wise. But as they happen to be in parts of the kernel where a warning is considered an error (i.e. powerpc), this breaks the build. So for now, remove the marking on the function, which fixes the build problems. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent 3b85e4a commit b9d4e71

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎include/linux/device.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,8 @@ ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
510510
struct dev_ext_attribute dev_attr_##_name = \
511511
{ __ATTR(_name, _mode, device_show_ulong, device_store_ulong), &(_var) }
512512

513-
extern int __must_check device_create_file(struct device *device,
514-
const struct device_attribute *entry);
513+
extern int device_create_file(struct device *device,
514+
const struct device_attribute *entry);
515515
extern void device_remove_file(struct device *dev,
516516
const struct device_attribute *attr);
517517
extern int __must_check device_create_bin_file(struct device *dev,

0 commit comments

Comments
 (0)