public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/2] serial: sh-sci: Fix cast warning
@ 2014-02-05  0:56 Jingoo Han
  2014-02-05  0:58 ` [PATCH V2 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n Jingoo Han
  2014-02-10 13:15 ` [PATCH V2 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
  0 siblings, 2 replies; 4+ messages in thread
From: Jingoo Han @ 2014-02-05  0:56 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: linux-serial, 'Laurent Pinchart', 'Simon Horman',
	'Jingoo Han'

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 <jg1.han@samsung.com>
---
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(-)

diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index be33d2b..1668523 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -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;
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH V2 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n
  2014-02-05  0:56 [PATCH V2 1/2] serial: sh-sci: Fix cast warning Jingoo Han
@ 2014-02-05  0:58 ` Jingoo Han
  2014-02-10 13:15 ` [PATCH V2 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
  1 sibling, 0 replies; 4+ messages in thread
From: Jingoo Han @ 2014-02-05  0:58 UTC (permalink / raw)
  To: 'Greg Kroah-Hartman'
  Cc: linux-serial, 'Johan Hovold', 'Darren Hart',
	'Jingoo Han'

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]

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
No Changes since V1.

 drivers/tty/serial/pch_uart.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/serial/pch_uart.c b/drivers/tty/serial/pch_uart.c
index 8fa1134..0931b3f 100644
--- a/drivers/tty/serial/pch_uart.c
+++ b/drivers/tty/serial/pch_uart.c
@@ -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;
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/2] serial: sh-sci: Fix cast warning
  2014-02-05  0:56 [PATCH V2 1/2] serial: sh-sci: Fix cast warning Jingoo Han
  2014-02-05  0:58 ` [PATCH V2 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n Jingoo Han
@ 2014-02-10 13:15 ` Laurent Pinchart
  2014-02-13 17:15   ` 'Greg Kroah-Hartman'
  1 sibling, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2014-02-10 13:15 UTC (permalink / raw)
  To: Jingoo Han, 'Simon Horman'
  Cc: 'Greg Kroah-Hartman', linux-serial

Hi Jingoo,

Thank you for the patch.

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 <jg1.han@samsung.com>

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Simon, Greg, how do you plan to handle sh-sci patches for v3.15 ?

> ---
> 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(-)
> 
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
> index be33d2b..1668523 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -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;

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH V2 1/2] serial: sh-sci: Fix cast warning
  2014-02-10 13:15 ` [PATCH V2 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
@ 2014-02-13 17:15   ` 'Greg Kroah-Hartman'
  0 siblings, 0 replies; 4+ messages in thread
From: 'Greg Kroah-Hartman' @ 2014-02-13 17:15 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: Jingoo Han, 'Simon Horman', linux-serial

On Mon, Feb 10, 2014 at 02:15:23PM +0100, Laurent Pinchart wrote:
> Hi Jingoo,
> 
> Thank you for the patch.
> 
> 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 <jg1.han@samsung.com>
> 
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-13 17:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-05  0:56 [PATCH V2 1/2] serial: sh-sci: Fix cast warning Jingoo Han
2014-02-05  0:58 ` [PATCH V2 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n Jingoo Han
2014-02-10 13:15 ` [PATCH V2 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
2014-02-13 17:15   ` 'Greg Kroah-Hartman'

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox