2019-12-10 14:37:59

by Greg Kroah-Hartman

[permalink] [raw]
Subject: [PATCH 02/10] tty: serial: samsung_tty: fix build warning

Fix a build warning on systems that do not have CONFIG_OF enabled.

Cc: Kukjin Kim <[email protected]>
Cc: Krzysztof Kozlowski <[email protected]>
Cc: Hyunki Koo <[email protected]>
Cc: HYUN-KI KOO <[email protected]>
Cc: Shinbeom Choi <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/tty/serial/samsung_tty.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 83fd51607741..67c5a84d0a26 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,

/* Device driver serial port probe */

+#ifdef CONFIG_OF
static const struct of_device_id s3c24xx_uart_dt_match[];
+#endif
+
static int probe_index;

static inline struct s3c24xx_serial_drv_data *s3c24xx_get_driver_data(
--
2.24.0


2019-12-10 14:50:20

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 02/10] tty: serial: samsung_tty: fix build warning

On Tue, Dec 10, 2019 at 03:36:58PM +0100, Greg Kroah-Hartman wrote:
> Fix a build warning on systems that do not have CONFIG_OF enabled.
>

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

Subject: Re: [PATCH 02/10] tty: serial: samsung_tty: fix build warning

On 10.12.19 15:36, Greg Kroah-Hartman wrote:

Hi,

> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 83fd51607741..67c5a84d0a26 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
>
> /* Device driver serial port probe */
>
> +#ifdef CONFIG_OF
> static const struct of_device_id s3c24xx_uart_dt_match[];
> +#endif
> +

By the way: I've got some patch for conditionally declaring of match
tables (including MODULE_DEVICE_TABE() call), so such ifdef's aren't
needed anymore.

Would you like to see it ?
(IIRC already posted it quite some time ago, but probably went
unnoticed)


--mtx

---
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
[email protected] -- +49-151-27565287

2019-12-11 12:14:58

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 02/10] tty: serial: samsung_tty: fix build warning

On Wed, Dec 11, 2019 at 12:01:28PM +0100, Enrico Weigelt, metux IT consult wrote:
> On 10.12.19 15:36, Greg Kroah-Hartman wrote:
>
> Hi,
>
> > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> > index 83fd51607741..67c5a84d0a26 100644
> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> > @@ -1851,7 +1851,10 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
> >
> > /* Device driver serial port probe */
> >
> > +#ifdef CONFIG_OF
> > static const struct of_device_id s3c24xx_uart_dt_match[];
> > +#endif
> > +
>
> By the way: I've got some patch for conditionally declaring of match
> tables (including MODULE_DEVICE_TABE() call), so such ifdef's aren't
> needed anymore.

That's not why this #ifdef is needed.

greg k-h