Skip to contentSkip to conversation

8250 - sparse error fixes

PATCH Ben Dooks 1 participant 1 message Mar 17, 2005 TTY layer and serial drivers

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

Ensure __iomem on the correct bits of the serial_struct and other definitions.

Remove the attempts to size zero length arrays, which causes problems from sparse.

include/linux/serial.h +1 -1
diff -urN -X ../dontdiff linux-2.6.11.3-bk3/include/linux/serial.h linux-2.6.11.3-bk3-fix1/include/linux/serial.h
@@ -45,7 +45,7 @@
 	int	hub6;
 	unsigned short	closing_wait; /* time to wait before closing */
 	unsigned short	closing_wait2; /* no longer used... */
-	unsigned char	*iomem_base;
+	unsigned char __iomem *iomem_base;
 	unsigned short	iomem_reg_shift;
 	unsigned int	port_high;
 	unsigned long	iomap_base;	/* cookie passed into ioremap */
drivers/serial/8250.c +32 -18

75 lines not on this page · raw message

drivers/serial/8250.h +1 -1
diff -urN -X ../dontdiff linux-2.6.11.3-bk3/drivers/serial/8250.h linux-2.6.11.3-bk3-fix1/drivers/serial/8250.h
@@ -30,7 +30,7 @@
 	unsigned int flags;
 	unsigned char hub6;
 	unsigned char io_type;
-	unsigned char *iomem_base;
+	unsigned char __iomem *iomem_base;
 	unsigned short iomem_reg_shift;
 };
 
drivers/serial/serial_core.c +1 -1
diff -urN -X ../dontdiff linux-2.6.11.3-bk3/drivers/serial/serial_core.c linux-2.6.11.3-bk3-fix1/drivers/serial/serial_core.c
@@ -592,7 +592,7 @@
 	tmp.hub6	    = port->hub6;
 	tmp.io_type         = port->iotype;
 	tmp.iomem_reg_shift = port->regshift;
-	tmp.iomem_base      = (void *)port->mapbase;
+	tmp.iomem_base      = (void __iomem *)port->mapbase;
 
 	if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
 		return -EFAULT;
include/linux/serial.h +1 -1
diff -urN -X ../dontdiff linux-2.6.11.3-bk3/include/linux/serial.h linux-2.6.11.3-bk3-fix1/include/linux/serial.h
@@ -45,7 +45,7 @@
 	int	hub6;
 	unsigned short	closing_wait; /* time to wait before closing */
 	unsigned short	closing_wait2; /* no longer used... */
-	unsigned char	*iomem_base;
+	unsigned char __iomem *iomem_base;
 	unsigned short	iomem_reg_shift;
 	unsigned int	port_high;
 	unsigned long	iomap_base;	/* cookie passed into ioremap */
drivers/serial/8250.c +32 -18

75 lines not on this page · raw message

drivers/serial/8250.h +1 -1
diff -urN -X ../dontdiff linux-2.6.11.3-bk3/drivers/serial/8250.h linux-2.6.11.3-bk3-fix1/drivers/serial/8250.h
@@ -30,7 +30,7 @@
 	unsigned int flags;
 	unsigned char hub6;
 	unsigned char io_type;
-	unsigned char *iomem_base;
+	unsigned char __iomem *iomem_base;
 	unsigned short iomem_reg_shift;
 };
 
drivers/serial/serial_core.c +1 -1
diff -urN -X ../dontdiff linux-2.6.11.3-bk3/drivers/serial/serial_core.c linux-2.6.11.3-bk3-fix1/drivers/serial/serial_core.c
@@ -592,7 +592,7 @@
 	tmp.hub6	    = port->hub6;
 	tmp.io_type         = port->iotype;
 	tmp.iomem_reg_shift = port->regshift;
-	tmp.iomem_base      = (void *)port->mapbase;
+	tmp.iomem_base      = (void __iomem *)port->mapbase;
 
 	if (copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
 		return -EFAULT;