From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 15/16] 64bit Resource: convert a few remaining drivers to use resource_size_t where needed
Date: Mon, 12 Jun 2006 17:31:17 -0700 [thread overview]
Message-ID: <11501587303683-git-send-email-greg@kroah.com> (raw)
In-Reply-To: <11501587273612-git-send-email-greg@kroah.com>
From: Greg Kroah-Hartman <gregkh@suse.de>
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ieee1394/ohci1394.c | 2 +-
drivers/isdn/hisax/hfc_pci.c | 2 +-
drivers/net/8139cp.c | 2 +-
drivers/pcmcia/rsrc_nonstatic.c | 14 +++++++-------
drivers/serial/8250_pci.c | 4 ++--
drivers/usb/host/sl811-hcd.c | 10 +++++++---
6 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 744b66c..4ebc530 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -3210,7 +3210,7 @@ static int __devinit ohci1394_pci_probe(
{
struct hpsb_host *host;
struct ti_ohci *ohci; /* shortcut to currently handled device */
- unsigned long ohci_base;
+ resource_size_t ohci_base;
if (pci_enable_device(dev))
FAIL(-ENXIO, "Failed to enable OHCI hardware");
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index 91d25ac..3622720 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -1688,7 +1688,7 @@ #ifdef CONFIG_PCI
printk(KERN_WARNING "HFC-PCI: No IRQ for PCI card found\n");
return (0);
}
- cs->hw.hfcpci.pci_io = (char *) dev_hfcpci->resource[ 1].start;
+ cs->hw.hfcpci.pci_io = (char *)(unsigned long)dev_hfcpci->resource[1].start;
printk(KERN_INFO "HiSax: HFC-PCI card manufacturer: %s card name: %s\n", id_list[i].vendor_name, id_list[i].card_name);
} else {
printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index e74e20a..1eaf0a4 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1668,7 +1668,7 @@ static int cp_init_one (struct pci_dev *
struct cp_private *cp;
int rc;
void __iomem *regs;
- long pciaddr;
+ resource_size_t pciaddr;
unsigned int addr_len, i, pci_using_dac;
u8 pci_rev;
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index cc03130..c3176b1 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -72,7 +72,7 @@ #define MEM_PROBE_HIGH (1 << 1)
======================================================================*/
static struct resource *
-make_resource(unsigned long b, unsigned long n, int flags, char *name)
+make_resource(resource_size_t b, resource_size_t n, int flags, char *name)
{
struct resource *res = kzalloc(sizeof(*res), GFP_KERNEL);
@@ -86,8 +86,8 @@ make_resource(unsigned long b, unsigned
}
static struct resource *
-claim_region(struct pcmcia_socket *s, unsigned long base, unsigned long size,
- int type, char *name)
+claim_region(struct pcmcia_socket *s, resource_size_t base,
+ resource_size_t size, int type, char *name)
{
struct resource *res, *parent;
@@ -519,10 +519,10 @@ struct pcmcia_align_data {
static void
pcmcia_common_align(void *align_data, struct resource *res,
- unsigned long size, unsigned long align)
+ resource_size_t size, resource_size_t align)
{
struct pcmcia_align_data *data = align_data;
- unsigned long start;
+ resource_size_t start;
/*
* Ensure that we have the correct start address
*/
@@ -533,8 +533,8 @@ pcmcia_common_align(void *align_data, st
}
static void
-pcmcia_align(void *align_data, struct resource *res,
- unsigned long size, unsigned long align)
+pcmcia_align(void *align_data, struct resource *res, resource_size_t size,
+ resource_size_t align)
{
struct pcmcia_align_data *data = align_data;
struct resource_map *m;
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
index 94886c0..864ef85 100644
--- a/drivers/serial/8250_pci.c
+++ b/drivers/serial/8250_pci.c
@@ -594,8 +594,8 @@ pci_default_setup(struct serial_private
else
offset += idx * board->uart_offset;
- maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) /
- (8 << board->reg_shift);
+ maxnr = (pci_resource_len(priv->dev, bar) - board->first_offset) >>
+ (board->reg_shift + 3);
if (board->flags & FL_REGION_SZ_CAP && idx >= maxnr)
return 1;
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index a923430..658f570 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1684,9 +1684,13 @@ sl811h_probe(struct platform_device *dev
if (!addr || !data)
return -ENODEV;
ioaddr = 1;
-
- addr_reg = (void __iomem *) addr->start;
- data_reg = (void __iomem *) data->start;
+ /*
+ * NOTE: 64-bit resource->start is getting truncated
+ * to avoid compiler warning, assuming that ->start
+ * is always 32-bit for this case
+ */
+ addr_reg = (void __iomem *) (unsigned long) addr->start;
+ data_reg = (void __iomem *) (unsigned long) data->start;
} else {
addr_reg = ioremap(addr->start, 1);
if (addr_reg == NULL) {
--
1.4.0
next prev parent reply other threads:[~2006-06-13 0:36 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-13 0:30 Reworked 64bit resource patches Greg KH
2006-06-13 0:31 ` [PATCH 01/16] 64bit resource: C99 changes for struct resource declarations Greg KH
2006-06-13 0:31 ` [PATCH 02/16] 64bit resource: fix up printks for resources in sound drivers Greg KH
2006-06-13 0:31 ` [PATCH 03/16] 64bit resource: fix up printks for resources in networks drivers Greg KH
2006-06-13 0:31 ` [PATCH 04/16] 64bit resource: fix up printks for resources in pci core and hotplug drivers Greg KH
2006-06-13 0:31 ` [PATCH 05/16] 64bit resource: fix up printks for resources in mtd drivers Greg KH
2006-06-13 0:31 ` [PATCH 06/16] 64bit resource: fix up printks for resources in ide drivers Greg KH
2006-06-13 0:31 ` [PATCH 07/16] 64bit resource: fix up printks for resources in video drivers Greg KH
2006-06-13 0:31 ` [PATCH 08/16] 64bit resource: fix up printks for resources in pcmcia drivers Greg KH
2006-06-13 0:31 ` [PATCH 09/16] 64bit resource: fix up printks for resources in arch and core code Greg KH
2006-06-13 0:31 ` [PATCH 10/16] 64bit resource: fix up printks for resources in misc drivers Greg KH
2006-06-13 0:31 ` [PATCH 11/16] 64bit resource: introduce resource_size_t for the start and end of struct resource Greg KH
2006-06-13 0:31 ` [PATCH 12/16] 64bit resource: change resource core to use resource_size_t Greg KH
2006-06-13 0:31 ` [PATCH 15/16] 64bit resource: change pci core and arch code " Greg KH
2006-06-13 0:31 ` [PATCH 14/16] 64bit resource: change pnp core " Greg KH
2006-06-13 0:31 ` Greg KH [this message]
2006-06-13 0:31 ` [PATCH 16/16] 64bit Resource: finally enable 64bit resource sizes Greg KH
2006-06-14 12:20 ` Geert Uytterhoeven
2006-06-14 23:35 ` Greg KH
2006-06-15 4:28 ` Vivek Goyal
2006-06-15 11:47 ` Geert Uytterhoeven
2006-06-15 15:56 ` Vivek Goyal
2006-06-16 1:35 ` Greg KH
2006-06-16 20:16 ` Vivek Goyal
2006-06-17 14:34 ` Geert Uytterhoeven
2006-06-18 18:05 ` Vivek Goyal
2006-06-19 8:05 ` Geert Uytterhoeven
2006-06-19 10:17 ` Roman Zippel
2006-06-19 11:08 ` Geert Uytterhoeven
2006-06-19 11:34 ` Roman Zippel
2006-06-19 11:45 ` Geert Uytterhoeven
2006-06-19 13:57 ` Vivek Goyal
2006-06-13 16:24 ` [PATCH 03/16] 64bit resource: fix up printks for resources in networks drivers Jesse Brandeburg
2006-06-13 16:30 ` Greg KH
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=11501587303683-git-send-email-greg@kroah.com \
--to=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.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.