All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <semen.protsenko@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>,
	"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tty: serial: samsung: Improve naming for common macro
Date: Tue, 5 Oct 2021 12:56:59 +0300	[thread overview]
Message-ID: <CAPLW+4nJ6yumqRC8YqUSVaWJSWrfj+fjWRTe0Opc1qa2L=F6+A@mail.gmail.com> (raw)
In-Reply-To: <6efec37b-4392-dffe-1bda-d4f7aac6643f@canonical.com>

On Wed, 15 Sept 2021 at 10:28, Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
>
> On 14/09/2021 16:23, Sam Protsenko wrote:
> > Having "_USI" suffix in EXYNOS_COMMON_SERIAL_DRV_DATA_USI() macro is
> > confusing. Rename it to just EXYNOS_COMMON_SERIAL_DRV_DATA() and provide
> > USI registers availability for all Exynos variants instead.
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> > ---
> >  drivers/tty/serial/samsung_tty.c | 11 ++++-------
> >  1 file changed, 4 insertions(+), 7 deletions(-)>
> > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> > index e2f49863e9c2..542b7e2b99dc 100644
> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> > @@ -2780,7 +2780,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
> >  #endif
> >
> >  #if defined(CONFIG_ARCH_EXYNOS)
> > -#define EXYNOS_COMMON_SERIAL_DRV_DATA_USI(_has_usi)          \
> > +#define EXYNOS_COMMON_SERIAL_DRV_DATA(_has_usi)                      \
> >       .info = &(struct s3c24xx_uart_info) {                   \
> >               .name           = "Samsung Exynos UART",        \
> >               .type           = TYPE_S3C6400,                 \
> > @@ -2804,21 +2804,18 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
> >               .has_fracval    = 1,                            \
> >       }                                                       \
> >
> > -#define EXYNOS_COMMON_SERIAL_DRV_DATA                                \
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA_USI(0)
> > -
> >  static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = {
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA,
> > +     EXYNOS_COMMON_SERIAL_DRV_DATA(0),
> >       .fifosize = { 256, 64, 16, 16 },
> >  };
> >
> >  static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = {
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA,
> > +     EXYNOS_COMMON_SERIAL_DRV_DATA(0),
> >       .fifosize = { 64, 256, 16, 256 },
> >  };
> >
> >  static struct s3c24xx_serial_drv_data exynos850_serial_drv_data = {
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA_USI(1),
>
> Makes sense, although I would prefer to have here true or false. More
> obvious. Otherwise "1" looks like counter/number for some property.
>
> The has_usi field in struct could be then also converted to bool.
>

No problem, will send v2 shortly.

>
> Best regards,
> Krzysztof

WARNING: multiple messages have this Message-ID (diff)
From: Sam Protsenko <semen.protsenko@linaro.org>
To: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	 linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
	 Linux Samsung SOC <linux-samsung-soc@vger.kernel.org>,
	 "open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tty: serial: samsung: Improve naming for common macro
Date: Tue, 5 Oct 2021 12:56:59 +0300	[thread overview]
Message-ID: <CAPLW+4nJ6yumqRC8YqUSVaWJSWrfj+fjWRTe0Opc1qa2L=F6+A@mail.gmail.com> (raw)
In-Reply-To: <6efec37b-4392-dffe-1bda-d4f7aac6643f@canonical.com>

On Wed, 15 Sept 2021 at 10:28, Krzysztof Kozlowski
<krzysztof.kozlowski@canonical.com> wrote:
>
> On 14/09/2021 16:23, Sam Protsenko wrote:
> > Having "_USI" suffix in EXYNOS_COMMON_SERIAL_DRV_DATA_USI() macro is
> > confusing. Rename it to just EXYNOS_COMMON_SERIAL_DRV_DATA() and provide
> > USI registers availability for all Exynos variants instead.
> >
> > Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> > ---
> >  drivers/tty/serial/samsung_tty.c | 11 ++++-------
> >  1 file changed, 4 insertions(+), 7 deletions(-)>
> > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> > index e2f49863e9c2..542b7e2b99dc 100644
> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> > @@ -2780,7 +2780,7 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
> >  #endif
> >
> >  #if defined(CONFIG_ARCH_EXYNOS)
> > -#define EXYNOS_COMMON_SERIAL_DRV_DATA_USI(_has_usi)          \
> > +#define EXYNOS_COMMON_SERIAL_DRV_DATA(_has_usi)                      \
> >       .info = &(struct s3c24xx_uart_info) {                   \
> >               .name           = "Samsung Exynos UART",        \
> >               .type           = TYPE_S3C6400,                 \
> > @@ -2804,21 +2804,18 @@ static struct s3c24xx_serial_drv_data s5pv210_serial_drv_data = {
> >               .has_fracval    = 1,                            \
> >       }                                                       \
> >
> > -#define EXYNOS_COMMON_SERIAL_DRV_DATA                                \
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA_USI(0)
> > -
> >  static struct s3c24xx_serial_drv_data exynos4210_serial_drv_data = {
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA,
> > +     EXYNOS_COMMON_SERIAL_DRV_DATA(0),
> >       .fifosize = { 256, 64, 16, 16 },
> >  };
> >
> >  static struct s3c24xx_serial_drv_data exynos5433_serial_drv_data = {
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA,
> > +     EXYNOS_COMMON_SERIAL_DRV_DATA(0),
> >       .fifosize = { 64, 256, 16, 256 },
> >  };
> >
> >  static struct s3c24xx_serial_drv_data exynos850_serial_drv_data = {
> > -     EXYNOS_COMMON_SERIAL_DRV_DATA_USI(1),
>
> Makes sense, although I would prefer to have here true or false. More
> obvious. Otherwise "1" looks like counter/number for some property.
>
> The has_usi field in struct could be then also converted to bool.
>

No problem, will send v2 shortly.

>
> Best regards,
> Krzysztof

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-10-05  9:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14 14:23 [PATCH] tty: serial: samsung: Improve naming for common macro Sam Protsenko
2021-09-14 14:23 ` Sam Protsenko
2021-09-15  7:28 ` Krzysztof Kozlowski
2021-09-15  7:28   ` Krzysztof Kozlowski
2021-10-05  9:56   ` Sam Protsenko [this message]
2021-10-05  9:56     ` Sam Protsenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPLW+4nJ6yumqRC8YqUSVaWJSWrfj+fjWRTe0Opc1qa2L=F6+A@mail.gmail.com' \
    --to=semen.protsenko@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=krzysztof.kozlowski@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.