{tty: serial, nand: onenand}: remove variable 'ufstat' set but not used
Subsystems (2)
PATCH 1/1 {tty: serial, nand: onenand}: remove variable 'ufstat' set but not used
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]
--- drivers/tty/serial/samsung_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/samsung_tty.c +2 -2
@@ -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);
Signature · 1 line
2.7.4
Greg KH
maintainerQuoted 6 lines · Chen Wandun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/tty/serial/samsung_tty.c: In functions3c24xx_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 <[email protected]>
Your subject line is really odd, can you please fix that up and resend?
thanks,
greg k-h
Quoted 9 lines · Greg KH
Quoted 6 lines · Chen Wandun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/tty/serial/samsung_tty.c: In functions3c24xx_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 <[email protected]>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
Quoted 7 lines
thanks,
greg k-h
.
Greg KH
maintainerQuoted 9 lines · Chen Wandun
Quoted 6 lines · Greg KH
Quoted 5 lines · Chen Wandun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/tty/serial/samsung_tty.c: In functions3c24xx_serial_rx_chars_dma:drivers/tty/serial/samsung_tty.c:549:24: warning: variable ufstat set but not used [-Wunused-but-set-variable]
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Chen Wandun <[email protected]>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 usedIs 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
PATCH v2 1/1 tty: serial: samsung: remove variable 'ufstat' set but not used
In reply to Chen WandunFixes 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]
--- drivers/tty/serial/samsung_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/samsung_tty.c +2 -2
@@ -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);
Signature · 1 line
2.7.4
Re: [PATCH v2] tty: serial: samsung: remove variable 'ufstat' set but not used
Quoted 24 lines · Chen Wandun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/tty/serial/samsung_tty.c: In functions3c24xx_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 <[email protected]>--- drivers/tty/serial/samsung_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/tty/serial/samsung_tty.c +1
-1@@ -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;
drivers/tty/serial/samsung_tty.c static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id) · line 559
Quoted 5 lines
drivers/tty/serial/samsung_tty.c +1
-1@@ -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,
Signature · 2 lines
js suse labs
Re: [PATCH v2] tty: serial: samsung: remove variable 'ufstat' set but not used
Hi Jiri,
Quoted 27 lines · Jiri Slaby
Quoted 26 lines · Chen Wandun
Fixes gcc '-Wunused-but-set-variable' warning:
drivers/tty/serial/samsung_tty.c: In functions3c24xx_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 <[email protected]>--- drivers/tty/serial/samsung_tty.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/tty/serial/samsung_tty.c +1
-1@@ -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;
Quoted 5 lines
drivers/tty/serial/samsung_tty.c static irqreturn_t s3c24xx_serial_rx_chars_dma(void *dev_id) · line 559
Quoted 3 lines
drivers/tty/serial/samsung_tty.c +1
-1utrstat =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
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland