* [PATCH 1/2] serial: sh-sci: Fix cast warning
@ 2014-02-04 6:55 Jingoo Han
2014-02-04 6:58 ` [PATCH 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n Jingoo Han
2014-02-04 22:09 ` [PATCH 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
0 siblings, 2 replies; 5+ messages in thread
From: Jingoo Han @ 2014-02-04 6:55 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>
---
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..61729d4 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 *)(unsigned long)port->mapbase;
}
return 0;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n
2014-02-04 6:55 [PATCH 1/2] serial: sh-sci: Fix cast warning Jingoo Han
@ 2014-02-04 6:58 ` Jingoo Han
2014-02-05 18:12 ` Darren Hart
2014-02-04 22:09 ` [PATCH 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
1 sibling, 1 reply; 5+ messages in thread
From: Jingoo Han @ 2014-02-04 6: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>
---
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] 5+ messages in thread
* Re: [PATCH 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n
2014-02-04 6:58 ` [PATCH 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n Jingoo Han
@ 2014-02-05 18:12 ` Darren Hart
0 siblings, 0 replies; 5+ messages in thread
From: Darren Hart @ 2014-02-05 18:12 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Greg Kroah-Hartman', linux-serial,
'Johan Hovold'
On Tue, 2014-02-04 at 15:58 +0900, Jingoo Han wrote:
> 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>
Acked-by: Darren Hart <dvhart@linux.intel.com>
> ---
> 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;
--
Darren Hart
Yocto Project - Linux Kernel
Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] serial: sh-sci: Fix cast warning
2014-02-04 6:55 [PATCH 1/2] serial: sh-sci: Fix cast warning Jingoo Han
2014-02-04 6:58 ` [PATCH 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n Jingoo Han
@ 2014-02-04 22:09 ` Laurent Pinchart
2014-02-05 0:42 ` Jingoo Han
1 sibling, 1 reply; 5+ messages in thread
From: Laurent Pinchart @ 2014-02-04 22:09 UTC (permalink / raw)
To: Jingoo Han
Cc: 'Greg Kroah-Hartman', linux-serial,
'Laurent Pinchart', 'Simon Horman'
Hi Jingoo,
Thank you for the patch.
On Tuesday 04 February 2014 15:55:41 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>
> ---
> 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..61729d4 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 *)(unsigned long)port->mapbase;
What about casting to uintptr_t instead of unsigned long ?
> }
>
> return 0;
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] serial: sh-sci: Fix cast warning
2014-02-04 22:09 ` [PATCH 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
@ 2014-02-05 0:42 ` Jingoo Han
0 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2014-02-05 0:42 UTC (permalink / raw)
To: 'Laurent Pinchart'
Cc: 'Greg Kroah-Hartman', linux-serial,
'Laurent Pinchart', 'Simon Horman',
'Jingoo Han'
On Wednesday, February 05, 2014 7:09 AM, Laurent Pinchart wrote:
>
> Hi Jingoo,
>
> Thank you for the patch.
>
> On Tuesday 04 February 2014 15:55:41 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>
> > ---
> > 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..61729d4 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 *)(unsigned long)port->mapbase;
>
> What about casting to uintptr_t instead of unsigned long ?
OK, I see.
I will use it and send v2 patch, soon.
I really appreciate your comment. :-)
Thank you.
Best regards,
Jingoo Han
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-02-05 18:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-04 6:55 [PATCH 1/2] serial: sh-sci: Fix cast warning Jingoo Han
2014-02-04 6:58 ` [PATCH 2/2] serial: pch_uart: Fix build warning when CONFIG_DEBUG_FS=n Jingoo Han
2014-02-05 18:12 ` Darren Hart
2014-02-04 22:09 ` [PATCH 1/2] serial: sh-sci: Fix cast warning Laurent Pinchart
2014-02-05 0:42 ` Jingoo Han
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).