Skip to contentSkip to conversation

pcmcia: fix sign extension on 64bit machines

PATCH New One Thousand Gnomes 1 participant 1 message Oct 14, 2014 Pcmcia

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pcmcia: fix sign extension on 64bit machines

If you try and run pcmcia on a 64bit box the upper 32bits of the resource flags all end up set due to a sign extension bug in the PCMCIA core

drivers/pcmcia/cs_internal.h +1 -1
diff -u --new-file --recursive --exclude-from ac/.gitignore next/drivers/pcmcia/cs_internal.h ac/drivers/pcmcia/cs_internal.h
@@ -82,7 +82,7 @@
 extern int static_init(struct pcmcia_socket *s);
 extern struct resource *pcmcia_make_resource(unsigned long start,
 					unsigned long end,
-					int flags, const char *name);
+					unsigned long flags, const char *name);
 
 /*
  * Stuff internal to module "pcmcia_core":
drivers/pcmcia/rsrc_mgr.c +1 -1
diff -u --new-file --recursive --exclude-from ac/.gitignore next/drivers/pcmcia/rsrc_mgr.c ac/drivers/pcmcia/rsrc_mgr.c
@@ -31,7 +31,7 @@
 }
 
 struct resource *pcmcia_make_resource(unsigned long start, unsigned long end,
-				int flags, const char *name)
+				unsigned long flags, const char *name)
 {
 	struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);