serial: sh-sci: Fix cast warning
PATCH v2 1/2 serial: sh-sci: Fix cast warning
Fix the following compile warning about cast to pointer from integer of different size.
drivers/tty/serial/sh-sci.c:2021:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
---
Changes since V1:
- Use uintptr_t instead of unsigned long per Laurent Pinchart
drivers/tty/serial/sh-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/sh-sci.c +1 -1
@@ -2018,7 +2018,7 @@ static int sci_remap_port(struct uart_port *port)* need to do any remapping, just cast the cookie * directly. */ - port->membase = (void __iomem *)port->mapbase; + port->membase = (void __iomem *)(uintptr_t )port->mapbase; }return 0 ;
Signature · 1 line
1.7.10.4
PATCH v2 2/2 serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n
Add CONFIG_DEBUG_FS to 'char name' in order to fix the following build warning, because 'char name' is used only when CONFIG_DEBUG_FS is enabled.
drivers/tty/serial/pch_uart.c:1765:7: warning: unused variable 'name' [-Wunused-variable]
---
No Changes since V1.
drivers/tty/serial/pch_uart.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/tty/serial/pch_uart.c +2 -0
@@ -1762,7 +1762,9 @@ static struct eg20t_port *pch_uart_init_port(struct pci_dev *pdev,int fifosize;int port_type;struct pch_uart_driver_data *board; +#ifdef CONFIG_DEBUG_FS char name[32 ];/* for debugfs file name */ +#endif board = &drv_dat[id->driver_data]; port_type = board->port_type;
Signature · 1 line
1.7.10.4
Hi Jingoo,
Thank you for the patch.
Quoted 7 lines · On Wednesday 05 February 2014 09:56:37 Jingoo Han wrote:
Fix the following compile warning about cast to pointer from integer of different size.
drivers/tty/serial/sh-sci.c:2021:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]Signed-off-by Jingoo Han <[email protected]>
Simon, Greg, how do you plan to handle sh-sci patches for v3.15 ?
Quoted 20 lines
---
Changes since V1:
- Useuintptr_tinstead of unsigned long per Laurent Pinchartdrivers/tty/serial/sh-sci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/tty/serial/sh-sci.c +1
-1@@ -2018,7 +2018,7 @@ static int sci_remap_port(struct uart_port *port)* need to do any remapping, just cast the cookie * directly. */ - port->membase = (void __iomem *)port->mapbase; + port->membase = (void __iomem *)(uintptr_t )port->mapbase; }return 0 ;
Signature · 3 lines
Regards, Laurent Pinchart
'Greg Kroah-Hartman'
maintainerQuoted 8 lines · Laurent Pinchart
Hi Jingoo,
Thank you for the patch.
Quoted 3 lines · On Wednesday 05 February 2014 09:56:37 Jingoo Han wrote:
Fix the following compile warning about cast to pointer from integer of different size.
Quoted 8 lines
Quoted 4 lines
drivers/tty/serial/sh-sci.c:2021:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]Signed-off-by Jingoo Han <[email protected]>Acked-by Laurent Pinchart <[email protected]>Simon, Greg, how do you plan to handle sh-sci patches for v3.15 ?
This is just a serial driver patch, I'll take it.
thanks,
greg k-h