8250 - sparse error fixes
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.
Signed-off-by Ben Dooks <[email protected]>
include/linux/serial.h +1 -1
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 ;