Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1174741 > unrolled thread

Re: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style

Started byArnd Bergmann <arnd@arndb.de>
First post2015-06-30 22:30 +0200
Last post2015-07-02 15:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style Arnd Bergmann <arnd@arndb.de> - 2015-06-30 22:30 +0200
    Re: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to  fit coding style Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2015-07-01 00:00 +0200
    Re: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to  fit coding style Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2015-07-02 15:40 +0200

#1174741 — Re: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style

FromArnd Bergmann <arnd@arndb.de>
Date2015-06-30 22:30 +0200
SubjectRe: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style
Message-ID<pHakj-4aX-23@gated-at.bofh.it>
On Tuesday 30 June 2015 16:05:15 Cyrille Pitchen wrote:
> +#define UART_PUT_CR(port, v)   __raw_writel(v, (port)->membase + ATMEL_US_CR)
> +#define UART_GET_MR(port)      __raw_readl((port)->membase + ATMEL_US_MR)
> +#define UART_PUT_MR(port, v)   __raw_writel(v, (port)->membase + ATMEL_US_MR)
> +#define UART_PUT_IER(port, v)  __raw_writel(v, (port)->membase + ATMEL_US_IER)
> 

How about removing these macros entirely? I'm not aware of other drivers
doing it like this, and it does not seem to add any value?

At the same time, you could use readl_relaxed() to make the driver
endian-safe.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1174794 — Re: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style

FromAlexandre Belloni <alexandre.belloni@free-electrons.com>
Date2015-07-01 00:00 +0200
SubjectRe: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style
Message-ID<pHbJo-675-17@gated-at.bofh.it>
In reply to#1174741
On 30/06/2015 at 22:28:42 +0200, Arnd Bergmann wrote :
> On Tuesday 30 June 2015 16:05:15 Cyrille Pitchen wrote:
> > +#define UART_PUT_CR(port, v)   __raw_writel(v, (port)->membase + ATMEL_US_CR)
> > +#define UART_GET_MR(port)      __raw_readl((port)->membase + ATMEL_US_MR)
> > +#define UART_PUT_MR(port, v)   __raw_writel(v, (port)->membase + ATMEL_US_MR)
> > +#define UART_PUT_IER(port, v)  __raw_writel(v, (port)->membase + ATMEL_US_IER)
> > 
> 
> How about removing these macros entirely? I'm not aware of other drivers
> doing it like this, and it does not seem to add any value?
> 
> At the same time, you could use readl_relaxed() to make the driver
> endian-safe.
> 

I think using readl_relaxed() would break avr32.

-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1175989 — Re: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style

FromCyrille Pitchen <cyrille.pitchen@atmel.com>
Date2015-07-02 15:40 +0200
SubjectRe: [PATCH v3 2/4] tty/serial: at91: fix some macro definitions to fit coding style
Message-ID<pHMSD-3hM-57@gated-at.bofh.it>
In reply to#1174741
Hi Arnd,

I've just sent a new series of patches to remove all those macros.
By the way, the patch dedicated to this update was created using coccinelle.
Based on Alexandre comment, I leave __raw_writel() and __raw_readl() for now.

Best Regards,

Cyrille

Le 30/06/2015 22:28, Arnd Bergmann a écrit :
> On Tuesday 30 June 2015 16:05:15 Cyrille Pitchen wrote:
>> +#define UART_PUT_CR(port, v)   __raw_writel(v, (port)->membase + ATMEL_US_CR)
>> +#define UART_GET_MR(port)      __raw_readl((port)->membase + ATMEL_US_MR)
>> +#define UART_PUT_MR(port, v)   __raw_writel(v, (port)->membase + ATMEL_US_MR)
>> +#define UART_PUT_IER(port, v)  __raw_writel(v, (port)->membase + ATMEL_US_IER)
>>
> 
> How about removing these macros entirely? I'm not aware of other drivers
> doing it like this, and it does not seem to add any value?
> 
> At the same time, you could use readl_relaxed() to make the driver
> endian-safe.
> 
> 	Arnd
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web