Skip to contentSkip to conversation

samsung-laptop: cleanup return type: mode_t vs umode_t

PATCH In review Dan Carpenter 2 participants 2 messages Mar 15, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 samsung-laptop: cleanup return type: mode_t vs umode_t

This function returns a umode_t (unsigned short) instead of mode_t which is an unsigned int on some architectures. Cleaning this up silences a compile warning:

drivers/platform/x86/samsung-laptop.c:1108:2: warning: initialization
from incompatible pointer type [enabled by default]

drivers/platform/x86/samsung-laptop.c +1 -1
index 7d7109f..0550bc5 100644
@@ -1086,7 +1086,7 @@ static int __init samsung_backlight_init(struct samsung_laptop *samsung)
 	return 0;
 }
 
-static mode_t samsung_sysfs_is_visible(struct kobject *kobj,
+static umode_t samsung_sysfs_is_visible(struct kobject *kobj,
 				       struct attribute *attr, int idx)
 {
 	struct device *dev = container_of(kobj, struct device, kobj);
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 14 lines · Dan Carpenter

This function returns a umode_t (unsigned short) instead of mode_t which is an unsigned int on some architectures.  Cleaning this up silences a compile warning:

drivers/platform/x86/samsung-laptop.c:1108:2: warning: initialization from incompatible pointer type [enabled by default]

drivers/platform/x86/samsung-laptop.c +0 -0
index 7d7109f..0550bc5 100644

drivers/platform/x86/samsung-laptop.c static int __init samsung_backlight_init(struct samsung_laptop *samsung) · line 1092

Quoted 8 lines
drivers/platform/x86/samsung-laptop.c +1 -1
@@ -1086,7 +1086,7 @@ static int __init samsung_backlight_init(struct samsung_laptop *samsung)
        return 0;
  }
 
-static mode_t samsung_sysfs_is_visible(struct kobject *kobj,
+static umode_t samsung_sysfs_is_visible(struct kobject *kobj,
                                       struct attribute *attr, int idx)
  {
        struct device *dev = container_of(kobj, struct device, kobj);

Thanks for the patch.

Matthew, could you grab that one too ?
Thanks,

Signature · 2 lines
Corentin Chary
http://xf.iksaif.net