All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tty: serial: jsm: remove redundant pointer ts
@ 2017-11-07 11:41 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-11-07 11:41 UTC (permalink / raw)
  To: Guilherme G . Piccoli, Greg Kroah-Hartman, Jiri Slaby, linux-serial
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer ts is assigned a value that is never read, ts is therefore
redundant and can be removed. Cleans up clang warning:

drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/tty/serial/jsm/jsm_tty.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index e69227cc3827..5ecd878669b8 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -275,14 +275,12 @@ static int jsm_tty_open(struct uart_port *port)
 static void jsm_tty_close(struct uart_port *port)
 {
 	struct jsm_board *bd;
-	struct ktermios *ts;
 	struct jsm_channel *channel =
 		container_of(port, struct jsm_channel, uart_port);
 
 	jsm_dbg(CLOSE, &channel->ch_bd->pci_dev, "start\n");
 
 	bd = channel->ch_bd;
-	ts = &port->state->port.tty->termios;
 
 	channel->ch_flags &= ~(CH_STOPI);
 
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] tty: serial: jsm: remove redundant pointer ts
@ 2017-11-07 11:41 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2017-11-07 11:41 UTC (permalink / raw)
  To: Guilherme G . Piccoli, Greg Kroah-Hartman, Jiri Slaby, linux-serial
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer ts is assigned a value that is never read, ts is therefore
redundant and can be removed. Cleans up clang warning:

drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts'
is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/tty/serial/jsm/jsm_tty.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index e69227cc3827..5ecd878669b8 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -275,14 +275,12 @@ static int jsm_tty_open(struct uart_port *port)
 static void jsm_tty_close(struct uart_port *port)
 {
 	struct jsm_board *bd;
-	struct ktermios *ts;
 	struct jsm_channel *channel  		container_of(port, struct jsm_channel, uart_port);
 
 	jsm_dbg(CLOSE, &channel->ch_bd->pci_dev, "start\n");
 
 	bd = channel->ch_bd;
-	ts = &port->state->port.tty->termios;
 
 	channel->ch_flags &= ~(CH_STOPI);
 
-- 
2.14.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] tty: serial: jsm: remove redundant pointer ts
  2017-11-07 11:41 ` Colin King
@ 2017-11-07 12:53   ` Guilherme G. Piccoli
  -1 siblings, 0 replies; 6+ messages in thread
From: Guilherme G. Piccoli @ 2017-11-07 12:53 UTC (permalink / raw)
  To: Colin King
  Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, kernel-janitors,
	linux-kernel

On 11/07/2017 09:41 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer ts is assigned a value that is never read, ts is therefore
> redundant and can be removed. Cleans up clang warning:
> 
> drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts'
> is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks Colin!

Acked-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>


> ---
>  drivers/tty/serial/jsm/jsm_tty.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
> index e69227cc3827..5ecd878669b8 100644
> --- a/drivers/tty/serial/jsm/jsm_tty.c
> +++ b/drivers/tty/serial/jsm/jsm_tty.c
> @@ -275,14 +275,12 @@ static int jsm_tty_open(struct uart_port *port)
>  static void jsm_tty_close(struct uart_port *port)
>  {
>  	struct jsm_board *bd;
> -	struct ktermios *ts;
>  	struct jsm_channel *channel =
>  		container_of(port, struct jsm_channel, uart_port);
> 
>  	jsm_dbg(CLOSE, &channel->ch_bd->pci_dev, "start\n");
> 
>  	bd = channel->ch_bd;
> -	ts = &port->state->port.tty->termios;
> 
>  	channel->ch_flags &= ~(CH_STOPI);
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] tty: serial: jsm: remove redundant pointer ts
@ 2017-11-07 12:53   ` Guilherme G. Piccoli
  0 siblings, 0 replies; 6+ messages in thread
From: Guilherme G. Piccoli @ 2017-11-07 12:53 UTC (permalink / raw)
  To: Colin King
  Cc: Greg Kroah-Hartman, Jiri Slaby, linux-serial, kernel-janitors,
	linux-kernel

On 11/07/2017 09:41 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer ts is assigned a value that is never read, ts is therefore
> redundant and can be removed. Cleans up clang warning:
> 
> drivers/tty/serial/jsm/jsm_tty.c:285:2: warning: Value stored to 'ts'
> is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks Colin!

Acked-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>


> ---
>  drivers/tty/serial/jsm/jsm_tty.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
> index e69227cc3827..5ecd878669b8 100644
> --- a/drivers/tty/serial/jsm/jsm_tty.c
> +++ b/drivers/tty/serial/jsm/jsm_tty.c
> @@ -275,14 +275,12 @@ static int jsm_tty_open(struct uart_port *port)
>  static void jsm_tty_close(struct uart_port *port)
>  {
>  	struct jsm_board *bd;
> -	struct ktermios *ts;
>  	struct jsm_channel *channel >  		container_of(port, struct jsm_channel, uart_port);
> 
>  	jsm_dbg(CLOSE, &channel->ch_bd->pci_dev, "start\n");
> 
>  	bd = channel->ch_bd;
> -	ts = &port->state->port.tty->termios;
> 
>  	channel->ch_flags &= ~(CH_STOPI);
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] tty: serial: jsm: remove redundant pointer ch
  2017-11-07 11:41 ` Colin King
@ 2018-07-13  9:05 ` Colin King
  -1 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-07-13  9:05 UTC (permalink / raw)
  To: Guilherme G . Piccoli, Greg Kroah-Hartman, Jiri Slaby, linux-serial
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer ch is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'ch' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/tty/serial/jsm/jsm_tty.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index b6bd6e15e07b..689774c073ca 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -430,7 +430,6 @@ int jsm_uart_port_init(struct jsm_board *brd)
 {
 	int i, rc;
 	unsigned int line;
-	struct jsm_channel *ch;
 
 	if (!brd)
 		return -ENXIO;
@@ -444,7 +443,7 @@ int jsm_uart_port_init(struct jsm_board *brd)
 	brd->nasync = brd->maxports;
 
 	/* Set up channel variables */
-	for (i = 0; i < brd->nasync; i++, ch = brd->channels[i]) {
+	for (i = 0; i < brd->nasync; i++) {
 
 		if (!brd->channels[i])
 			continue;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] tty: serial: jsm: remove redundant pointer ch
@ 2018-07-13  9:05 ` Colin King
  0 siblings, 0 replies; 6+ messages in thread
From: Colin King @ 2018-07-13  9:05 UTC (permalink / raw)
  To: Guilherme G . Piccoli, Greg Kroah-Hartman, Jiri Slaby, linux-serial
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

Pointer ch is being assigned but is never used hence it is redundant
and can be removed.

Cleans up clang warning:
warning: variable 'ch' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/tty/serial/jsm/jsm_tty.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c
index b6bd6e15e07b..689774c073ca 100644
--- a/drivers/tty/serial/jsm/jsm_tty.c
+++ b/drivers/tty/serial/jsm/jsm_tty.c
@@ -430,7 +430,6 @@ int jsm_uart_port_init(struct jsm_board *brd)
 {
 	int i, rc;
 	unsigned int line;
-	struct jsm_channel *ch;
 
 	if (!brd)
 		return -ENXIO;
@@ -444,7 +443,7 @@ int jsm_uart_port_init(struct jsm_board *brd)
 	brd->nasync = brd->maxports;
 
 	/* Set up channel variables */
-	for (i = 0; i < brd->nasync; i++, ch = brd->channels[i]) {
+	for (i = 0; i < brd->nasync; i++) {
 
 		if (!brd->channels[i])
 			continue;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-07-13  9:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-13  9:05 [PATCH] tty: serial: jsm: remove redundant pointer ch Colin King
2018-07-13  9:05 ` Colin King
  -- strict thread matches above, loose matches on Subject: below --
2017-11-07 11:41 [PATCH] tty: serial: jsm: remove redundant pointer ts Colin King
2017-11-07 11:41 ` Colin King
2017-11-07 12:53 ` Guilherme G. Piccoli
2017-11-07 12:53   ` Guilherme G. Piccoli

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.