From: dyoung@redhat.com Date: Thu, 16 May 2013 06:31:30 +0000 (+0800) Subject: driver core: print sysfs attribute name when warning about bogus permissions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=97521978c5ea80857d4f4f74d4e1fc93721482cf;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git driver core: print sysfs attribute name when warning about bogus permissions Make it obvious to see what attribute is using bogus permissions. Signed-off-by: Dave Young Acked-by: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/core.c b/drivers/base/core.c index 016312437577..2499cefdcdf2 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -572,9 +572,11 @@ int device_create_file(struct device *dev, if (dev) { WARN(((attr->attr.mode & S_IWUGO) && !attr->store), - "Write permission without 'store'\n"); + "Attribute %s: write permission without 'store'\n", + attr->attr.name); WARN(((attr->attr.mode & S_IRUGO) && !attr->show), - "Read permission without 'show'\n"); + "Attribute %s: read permission without 'show'\n", + attr->attr.name); error = sysfs_create_file(&dev->kobj, &attr->attr); }