pcmcia: correct types
authorAlan Cox <alan@linux.intel.com>
Wed, 10 Dec 2014 15:05:38 +0000 (15:05 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jan 2015 13:04:12 +0000 (05:04 -0800)
We should be using resource_size_t and unsigned types correctly, otherwise
we sign extend the flags on a 64bit box, which is not what we want.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pcmcia/cs_internal.h
drivers/pcmcia/rsrc_mgr.c

index 7f1953f78b12b906421a4c8f130d4094e49c6d74..e86cd6b31773ba7fdc9d9b3662bc4fc97b0c4d00 100644 (file)
@@ -80,9 +80,9 @@ struct pccard_resource_ops {
  * Stuff internal to module "pcmcia_rsrc":
  */
 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);
+extern struct resource *pcmcia_make_resource(resource_size_t start,
+                                       resource_size_t end,
+                                       unsigned long flags, const char *name);
 
 /*
  * Stuff internal to module "pcmcia_core":
index aa628ed0e9f48178ca3ac9b1fbba39a370877228..df2cb70aef5b6791ad5b9989af76805f64346722 100644 (file)
@@ -30,8 +30,9 @@ int static_init(struct pcmcia_socket *s)
        return 0;
 }
 
-struct resource *pcmcia_make_resource(unsigned long start, unsigned long end,
-                               int flags, const char *name)
+struct resource *pcmcia_make_resource(resource_size_t start,
+                                       resource_size_t end,
+                                       unsigned long flags, const char *name)
 {
        struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);