All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@linux.intel.com>
To: linux-kernel@vger.kernel.org, linux-pcmica@lists.infradead.org
Subject: [PATCH 1/5] pcmcia: correct types
Date: Thu, 04 Dec 2014 21:28:53 +0000	[thread overview]
Message-ID: <20141204212843.1351.14921.stgit@localhost.localdomain> (raw)
In-Reply-To: <20141204212746.1351.89165.stgit@localhost.localdomain>

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>
---
 drivers/pcmcia/cs_internal.h |    6 +++---
 drivers/pcmcia/rsrc_mgr.c    |    5 +++--
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 7f1953f..e86cd6b 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -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":
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
index aa628ed..df2cb70 100644
--- a/drivers/pcmcia/rsrc_mgr.c
+++ b/drivers/pcmcia/rsrc_mgr.c
@@ -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);
 


  reply	other threads:[~2014-12-04 21:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 21:28 [PATCH 0/5] pcmcia: 64bit fixes, anonymous cards, other bugs Alan Cox
2014-12-04 21:28 ` Alan Cox [this message]
2014-12-04 21:29 ` [PATCH 2/5] pcmcia cis: on an out of range CIS read return 0xff, don't just warn Alan Cox
2014-12-04 21:30 ` [PATCH 3/5] pcmcia: Fix requery Alan Cox
2014-12-04 21:30 ` [PATCH 4/5] pcmcia: handle anonymous cards by generating a fake CIS Alan Cox
2015-06-14 19:52   ` Dominik Brodowski
2015-06-15 12:10     ` Alan Cox
2015-06-16  6:19       ` Dominik Brodowski
2014-12-04 21:31 ` [PATCH 5/5] pcmcia: add a new resource manager for non ISA systems Alan Cox
2015-05-30 14:40   ` Dominik Brodowski
2015-06-01 13:59     ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141204212843.1351.14921.stgit@localhost.localdomain \
    --to=alan@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmica@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.