Skip to contentSkip to conversation

(replacement) kobject: fix gfp flags type

PATCH New Randy.Dunlap 1 participant 1 message Oct 4, 2005

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

PATCH 1/1 (replacement) kobject: fix gfp flags type

From: Randy Dunlap <[email protected]>

Fix implicit nocast warnings in kobject_uevent code, including __nocast:
lib/kobject_uevent.c:78:37: warning: implicit cast to nocast type lib/kobject_uevent.c:97:51: warning: implicit cast to nocast type lib/kobject_uevent.c:120:27: warning: implicit cast to nocast type

---

 include/linux/kobject.h |    2 +-
 lib/kobject.c           |    2 +-
 lib/kobject_uevent.c    |    6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff -Naurp linux-2614-rc2-git6/drivers/base/class.c~kobject_gfpmask linux-2614-rc2-git6/drivers/base/class.c

include/linux/kobject.h renamed from include/linux/kobject.h~kobject_gfpmask +1 -1
diff -Naurp linux-2614-rc2-git6/include/linux/kobject.h~kobject_gfpmask linux-2614-rc2-git6/include/linux/kobject.h
@@ -65,7 +65,7 @@ extern void kobject_unregister(struct ko
 extern struct kobject * kobject_get(struct kobject *);
 extern void kobject_put(struct kobject *);
 
-extern char * kobject_get_path(struct kobject *, int);
+extern char * kobject_get_path(struct kobject *, unsigned int __nocast);
 
 struct kobj_type {
 	void (*release)(struct kobject *);
lib/kobject_uevent.c renamed from lib/kobject_uevent.c~kobject_gfpmask +3 -3
diff -Naurp linux-2614-rc2-git6/lib/kobject_uevent.c~kobject_gfpmask linux-2614-rc2-git6/lib/kobject_uevent.c
@@ -62,7 +62,7 @@ static struct sock *uevent_sock;
  * @gfp_mask:
  */
 static int send_uevent(const char *signal, const char *obj,
-		       char **envp, int gfp_mask)
+		       char **envp, unsigned int __nocast gfp_mask)
 {
 	struct sk_buff *skb;
 	char *pos;
@@ -98,7 +98,7 @@ static int send_uevent(const char *signa
 }
 
 static int do_kobject_uevent(struct kobject *kobj, enum kobject_action action, 
-			     struct attribute *attr, int gfp_mask)
+			struct attribute *attr, unsigned int __nocast gfp_mask)
 {
 	char *path;
 	char *attrpath;
@@ -170,7 +170,7 @@ postcore_initcall(kobject_uevent_init);
 
 #else
 static inline int send_uevent(const char *signal, const char *obj,
-			      char **envp, int gfp_mask)
+			      char **envp, unsigned int __nocast gfp_mask)
 {
 	return 0;
 }
lib/kobject.c renamed from lib/kobject.c~kobject_gfpmask +1 -1
diff -Naurp linux-2614-rc2-git6/lib/kobject.c~kobject_gfpmask linux-2614-rc2-git6/lib/kobject.c
@@ -100,7 +100,7 @@ static void fill_kobj_path(struct kobjec
  * @kobj:	kobject in question, with which to build the path
  * @gfp_mask:	the allocation type used to allocate the path
  */
-char *kobject_get_path(struct kobject *kobj, int gfp_mask)
+char *kobject_get_path(struct kobject *kobj, unsigned int __nocast gfp_mask)
 {
 	char *path;
 	int len;

---

_______________________________________________
Kernel-janitors mailing list
[email protected]
https://lists.osdl.org/mailman/listinfo/kernel-janitors