From mboxrd@z Thu Jan 1 00:00:00 1970 From: akpm@linux-foundation.org Subject: + pcmcia-convert-some-internal-only-ioaddr_t-to-unsigned-int.patch added to -mm tree Date: Wed, 31 Oct 2007 14:37:18 -0700 Message-ID: <200710312137.l9VLbIC7029956@imap1.linux-foundation.org> Reply-To: linux-kernel@vger.kernel.org Return-path: Received: from smtp2.linux-foundation.org ([207.189.120.14]:34057 "EHLO smtp2.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755173AbXJaVjv (ORCPT ); Wed, 31 Oct 2007 17:39:51 -0400 Sender: mm-commits-owner@vger.kernel.org List-Id: mm-commits@vger.kernel.org To: mm-commits@vger.kernel.org Cc: olof@lixom.net, alan@lxorguk.ukuu.org.uk, benh@kernel.crashing.org, hch@lst.de, linux@dominikbrodowski.net, linville@tuxdriver.com, marcel@holtmann.org, matthew@wil.cx, takata@linux-m32r.org The patch titled pcmcia: convert some internal-only ioaddr_t to unsigned int has been added to the -mm tree. Its filename is pcmcia-convert-some-internal-only-ioaddr_t-to-unsigned-int.patch *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: pcmcia: convert some internal-only ioaddr_t to unsigned int From: Olof Johansson Convert the io_req_t members to unsigned int, to allow use on machines with more than 16 bits worth of IO ports (i.e. secondary busses on ppc64, etc). There was only a couple of places in drivers where a change was needed. I left printk formats alone (there are lots of %04x-style formats in there), mostly to not change the format on the platforms that only have 16-bit io addresses, but also because the padding doesn't really add all that much value most of the time. I found only one sprintf of an address, and upsized the string accordingly (I doubt anyone will have anywhere near INT_MAX as irq value, but at least there's room for it now). Signed-off-by: Olof Johansson Cc: Christoph Hellwig Cc: Matthew Wilcox Cc: Alan Cox Cc: Dominik Brodowski Cc: Benjamin Herrenschmidt Cc: "John W. Linville" Cc: Marcel Holtmann Cc: Hirokazu Takata Signed-off-by: Andrew Morton --- drivers/char/pcmcia/cm4000_cs.c | 16 ++++++++-------- drivers/pcmcia/pcmcia_resource.c | 14 +++++++------- drivers/scsi/pcmcia/fdomain_stub.c | 2 +- include/pcmcia/cs.h | 8 ++++---- 4 files changed, 20 insertions(+), 20 deletions(-) diff -puN drivers/char/pcmcia/cm4000_cs.c~pcmcia-convert-some-internal-only-ioaddr_t-to-unsigned-int drivers/char/pcmcia/cm4000_cs.c --- a/drivers/char/pcmcia/cm4000_cs.c~pcmcia-convert-some-internal-only-ioaddr_t-to-unsigned-int +++ a/drivers/char/pcmcia/cm4000_cs.c @@ -308,7 +308,7 @@ static unsigned int calc_baudv(unsigned return (wcrcf / wbrcf); } -static unsigned short io_read_num_rec_bytes(ioaddr_t iobase, unsigned short *s) +static unsigned short io_read_num_rec_bytes(unsigned int iobase, unsigned short *s) { unsigned short tmp; @@ -426,7 +426,7 @@ static struct card_fixup card_fixups[] = static void set_cardparameter(struct cm4000_dev *dev) { int i; - ioaddr_t iobase = dev->p_dev->io.BasePort1; + unsigned int iobase = dev->p_dev->io.BasePort1; u_int8_t stopbits = 0x02; /* ISO default */ DEBUGP(3, dev, "-> set_cardparameter\n"); @@ -459,7 +459,7 @@ static int set_protocol(struct cm4000_de unsigned short num_bytes_read; unsigned char pts_reply[4]; ssize_t rc; - ioaddr_t iobase = dev->p_dev->io.BasePort1; + unsigned int iobase = dev->p_dev->io.BasePort1; rc = 0; @@ -610,7 +610,7 @@ exit_setprotocol: return rc; } -static int io_detect_cm4000(ioaddr_t iobase, struct cm4000_dev *dev) +static int io_detect_cm4000(unsigned int iobase, struct cm4000_dev *dev) { /* note: statemachine is assumed to be reset */ @@ -671,7 +671,7 @@ static void terminate_monitor(struct cm4 static void monitor_card(unsigned long p) { struct cm4000_dev *dev = (struct cm4000_dev *) p; - ioaddr_t iobase = dev->p_dev->io.BasePort1; + unsigned int iobase = dev->p_dev->io.BasePort1; unsigned short s; struct ptsreq ptsreq; int i, atrc; @@ -933,7 +933,7 @@ static ssize_t cmm_read(struct file *fil loff_t *ppos) { struct cm4000_dev *dev = filp->private_data; - ioaddr_t iobase = dev->p_dev->io.BasePort1; + unsigned int iobase = dev->p_dev->io.BasePort1; ssize_t rc; int i, j, k; @@ -1054,7 +1054,7 @@ static ssize_t cmm_write(struct file *fi size_t count, loff_t *ppos) { struct cm4000_dev *dev = (struct cm4000_dev *) filp->private_data; - ioaddr_t iobase = dev->p_dev->io.BasePort1; + unsigned int iobase = dev->p_dev->io.BasePort1; unsigned short s; unsigned char tmp; unsigned char infolen; @@ -1408,7 +1408,7 @@ static int cmm_ioctl(struct inode *inode unsigned long arg) { struct cm4000_dev *dev = filp->private_data; - ioaddr_t iobase = dev->p_dev->io.BasePort1; + unsigned int iobase = dev->p_dev->io.BasePort1; struct pcmcia_device *link; int size; int rc; diff -puN drivers/pcmcia/pcmcia_resource.c~pcmcia-convert-some-internal-only-ioaddr_t-to-unsigned-int drivers/pcmcia/pcmcia_resource.c --- a/drivers/pcmcia/pcmcia_resource.c~pcmcia-convert-some-internal-only-ioaddr_t-to-unsigned-int +++ a/drivers/pcmcia/pcmcia_resource.c @@ -65,23 +65,23 @@ extern int ds_pc_debug; * Special stuff for managing IO windows, because they are scarce */ -static int alloc_io_space(struct pcmcia_socket *s, u_int attr, ioaddr_t *base, - ioaddr_t num, u_int lines) +static int alloc_io_space(struct pcmcia_socket *s, u_int attr, + unsigned int *base, unsigned int num, u_int lines) { int i; - kio_addr_t try, align; + unsigned int try, align; align = (*base) ? (lines ? 1<