* [PATCH] {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used
@ 2019-11-22 11:12 Chen Wandun
2019-11-22 11:14 ` Greg KH
2019-11-22 12:04 ` [PATCH v2] tty: serial: samsung: " Chen Wandun
0 siblings, 2 replies; 7+ messages in thread
From: Chen Wandun @ 2019-11-22 11:12 UTC (permalink / raw)
To: gregkh, jslaby, linux-serial, linux-kernel; +Cc: chenwandun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma:
drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
---
drivers/tty/serial/samsung_tty.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 83fd516..ab3c7d1 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -546,7 +546,7 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport);
static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
{
- unsigned int utrstat, ufstat, received;
+ unsigned int utrstat, received;
struct s3c24xx_uart_port *ourport = dev_id;
struct uart_port *port = &ourport->port;
struct s3c24xx_uart_dma *dma = ourport->dma;
@@ -556,7 +556,7 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
struct dma_tx_state state;
utrstat = rd_regl(port, S3C2410_UTRSTAT);
- ufstat = rd_regl(port, S3C2410_UFSTAT);
+ rd_regl(port, S3C2410_UFSTAT);
spin_lock_irqsave(&port->lock, flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used
2019-11-22 11:12 [PATCH] {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used Chen Wandun
@ 2019-11-22 11:14 ` Greg KH
2019-11-22 11:33 ` Chen Wandun
2019-11-22 12:04 ` [PATCH v2] tty: serial: samsung: " Chen Wandun
1 sibling, 1 reply; 7+ messages in thread
From: Greg KH @ 2019-11-22 11:14 UTC (permalink / raw)
To: Chen Wandun; +Cc: jslaby, linux-serial, linux-kernel
On Fri, Nov 22, 2019 at 07:12:39PM +0800, Chen Wandun wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma:
> drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
Your subject line is really odd, can you please fix that up and resend?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used
2019-11-22 11:14 ` Greg KH
@ 2019-11-22 11:33 ` Chen Wandun
2019-11-22 11:38 ` Greg KH
0 siblings, 1 reply; 7+ messages in thread
From: Chen Wandun @ 2019-11-22 11:33 UTC (permalink / raw)
To: Greg KH; +Cc: jslaby, linux-serial, linux-kernel
On 2019/11/22 19:14, Greg KH wrote:
> On Fri, Nov 22, 2019 at 07:12:39PM +0800, Chen Wandun wrote:
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma:
>> drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
>>
>> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
>
> Your subject line is really odd, can you please fix that up and resend?
I check the git log of drivers/tty/serial/samsung_tty.c,
it seem like the subject line should be:
{tty: serial, nand: onenand}: samsung: remove variable 'ufstat' set but not used
Is that OK?
Thanks
Chen Wandun
>
> thanks,
>
> greg k-h
>
> .
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used
2019-11-22 11:33 ` Chen Wandun
@ 2019-11-22 11:38 ` Greg KH
0 siblings, 0 replies; 7+ messages in thread
From: Greg KH @ 2019-11-22 11:38 UTC (permalink / raw)
To: Chen Wandun; +Cc: jslaby, linux-serial, linux-kernel
On Fri, Nov 22, 2019 at 07:33:47PM +0800, Chen Wandun wrote:
>
>
> On 2019/11/22 19:14, Greg KH wrote:
> > On Fri, Nov 22, 2019 at 07:12:39PM +0800, Chen Wandun wrote:
> > > Fixes gcc '-Wunused-but-set-variable' warning:
> > >
> > > drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma:
> > > drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
> > >
> > > Signed-off-by: Chen Wandun <chenwandun@huawei.com>
> >
> > Your subject line is really odd, can you please fix that up and resend?
> I check the git log of drivers/tty/serial/samsung_tty.c,
> it seem like the subject line should be:
> {tty: serial, nand: onenand}: samsung: remove variable 'ufstat' set but not used
>
> Is that OK?
No. What does this patch have to do with nand?
That was from a previous patch that modified two drivers at once. You
are not touching the nand driver.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2] tty: serial: samsung: remove variable 'ufstat' set but not used
2019-11-22 11:12 [PATCH] {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used Chen Wandun
2019-11-22 11:14 ` Greg KH
@ 2019-11-22 12:04 ` Chen Wandun
2019-11-22 12:08 ` Jiri Slaby
1 sibling, 1 reply; 7+ messages in thread
From: Chen Wandun @ 2019-11-22 12:04 UTC (permalink / raw)
To: gregkh, jslaby, linux-serial, linux-kernel; +Cc: chenwandun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma:
drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
Signed-off-by: Chen Wandun <chenwandun@huawei.com>
---
drivers/tty/serial/samsung_tty.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 83fd516..ab3c7d1 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -546,7 +546,7 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport);
static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
{
- unsigned int utrstat, ufstat, received;
+ unsigned int utrstat, received;
struct s3c24xx_uart_port *ourport = dev_id;
struct uart_port *port = &ourport->port;
struct s3c24xx_uart_dma *dma = ourport->dma;
@@ -556,7 +556,7 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
struct dma_tx_state state;
utrstat = rd_regl(port, S3C2410_UTRSTAT);
- ufstat = rd_regl(port, S3C2410_UFSTAT);
+ rd_regl(port, S3C2410_UFSTAT);
spin_lock_irqsave(&port->lock, flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tty: serial: samsung: remove variable 'ufstat' set but not used
2019-11-22 12:04 ` [PATCH v2] tty: serial: samsung: " Chen Wandun
@ 2019-11-22 12:08 ` Jiri Slaby
2019-11-22 14:13 ` Marek Szyprowski
0 siblings, 1 reply; 7+ messages in thread
From: Jiri Slaby @ 2019-11-22 12:08 UTC (permalink / raw)
To: Chen Wandun, gregkh, linux-serial, linux-kernel,
Marek Szyprowski, beomho.seo, sw0312.kim, youngmin.nam
On 22. 11. 19, 13:04, Chen Wandun wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma:
> drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
> ---
> drivers/tty/serial/samsung_tty.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 83fd516..ab3c7d1 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -546,7 +546,7 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport);
>
> static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
> {
> - unsigned int utrstat, ufstat, received;
> + unsigned int utrstat, received;
> struct s3c24xx_uart_port *ourport = dev_id;
> struct uart_port *port = &ourport->port;
> struct s3c24xx_uart_dma *dma = ourport->dma;
> @@ -556,7 +556,7 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
> struct dma_tx_state state;
>
> utrstat = rd_regl(port, S3C2410_UTRSTAT);
> - ufstat = rd_regl(port, S3C2410_UFSTAT);
> + rd_regl(port, S3C2410_UFSTAT);
The question (CCed some samsung people) is whether we have to spend the
cycles reading the register at all? Does it have side-effects?
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2] tty: serial: samsung: remove variable 'ufstat' set but not used
2019-11-22 12:08 ` Jiri Slaby
@ 2019-11-22 14:13 ` Marek Szyprowski
0 siblings, 0 replies; 7+ messages in thread
From: Marek Szyprowski @ 2019-11-22 14:13 UTC (permalink / raw)
To: Jiri Slaby, Chen Wandun, gregkh, linux-serial, linux-kernel,
beomho.seo, sw0312.kim, youngmin.nam
Hi Jiri,
On 22.11.2019 13:08, Jiri Slaby wrote:
> On 22. 11. 19, 13:04, Chen Wandun wrote:
>> Fixes gcc '-Wunused-but-set-variable' warning:
>>
>> drivers/tty/serial/samsung_tty.c: In function s3c24xx_serial_rx_chars_dma:
>> drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
>>
>> Signed-off-by: Chen Wandun <chenwandun@huawei.com>
>> ---
>> drivers/tty/serial/samsung_tty.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
>> index 83fd516..ab3c7d1 100644
>> --- a/drivers/tty/serial/samsung_tty.c
>> +++ b/drivers/tty/serial/samsung_tty.c
>> @@ -546,7 +546,7 @@ static void s3c24xx_serial_rx_drain_fifo(struct s3c24xx_uart_port *ourport);
>>
>> static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
>> {
>> - unsigned int utrstat, ufstat, received;
>> + unsigned int utrstat, received;
>> struct s3c24xx_uart_port *ourport = dev_id;
>> struct uart_port *port = &ourport->port;
>> struct s3c24xx_uart_dma *dma = ourport->dma;
>> @@ -556,7 +556,7 @@ static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id)
>> struct dma_tx_state state;
>>
>> utrstat = rd_regl(port, S3C2410_UTRSTAT);
>> - ufstat = rd_regl(port, S3C2410_UFSTAT);
>> + rd_regl(port, S3C2410_UFSTAT);
> The question (CCed some samsung people) is whether we have to spend the
> cycles reading the register at all? Does it have side-effects?
Reading this register doesn't have any side effects, so it is safe to
remove rd_regl(port, S3C2410_UFSTAT) at all in this function. Tested on
Exynos5422-based OdroidXU3 board.
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-11-22 14:14 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-22 11:12 [PATCH] {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used Chen Wandun
2019-11-22 11:14 ` Greg KH
2019-11-22 11:33 ` Chen Wandun
2019-11-22 11:38 ` Greg KH
2019-11-22 12:04 ` [PATCH v2] tty: serial: samsung: " Chen Wandun
2019-11-22 12:08 ` Jiri Slaby
2019-11-22 14:13 ` Marek Szyprowski
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).