Skip to content

Commit

Permalink
pcmcia: correct types
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jan 12, 2015
1 parent c4277e9 commit a6c6193
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/pcmcia/cs_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down
5 changes: 3 additions & 2 deletions drivers/pcmcia/rsrc_mgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a6c6193

Please sign in to comment.