* [PATCH 2/3] staging: dgnc: remove useless assigned error value in
@ 2016-05-04 5:13 ` Daeseok Youn
0 siblings, 0 replies; 8+ messages in thread
From: Daeseok Youn @ 2016-05-04 5:13 UTC (permalink / raw)
To: lidza.louina
Cc: devel, gregkh, driverdev-devel, kernel-janitors, linux-kernel
the result in dgnc_get_mstat() was initialized with -EIO but
there are no use of EIO as a result in this function.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index d85d005..46ca01d 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1979,7 +1979,7 @@ static void dgnc_tty_send_xchar(struct tty_struct *tty, char c)
static inline int dgnc_get_mstat(struct channel_t *ch)
{
unsigned char mstat;
- int result = -EIO;
+ int result = 0;
unsigned long flags;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
@@ -1991,8 +1991,6 @@ static inline int dgnc_get_mstat(struct channel_t *ch)
spin_unlock_irqrestore(&ch->ch_lock, flags);
- result = 0;
-
if (mstat & UART_MCR_DTR)
result |= TIOCM_DTR;
if (mstat & UART_MCR_RTS)
--
2.8.2
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/3] staging: dgnc: remove useless assigned error value in
@ 2016-05-04 5:13 ` Daeseok Youn
0 siblings, 0 replies; 8+ messages in thread
From: Daeseok Youn @ 2016-05-04 5:13 UTC (permalink / raw)
To: lidza.louina
Cc: markh, gregkh, driverdev-devel, devel, linux-kernel,
kernel-janitors
the result in dgnc_get_mstat() was initialized with -EIO but
there are no use of EIO as a result in this function.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index d85d005..46ca01d 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1979,7 +1979,7 @@ static void dgnc_tty_send_xchar(struct tty_struct *tty, char c)
static inline int dgnc_get_mstat(struct channel_t *ch)
{
unsigned char mstat;
- int result = -EIO;
+ int result = 0;
unsigned long flags;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
@@ -1991,8 +1991,6 @@ static inline int dgnc_get_mstat(struct channel_t *ch)
spin_unlock_irqrestore(&ch->ch_lock, flags);
- result = 0;
-
if (mstat & UART_MCR_DTR)
result |= TIOCM_DTR;
if (mstat & UART_MCR_RTS)
--
2.8.2
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/3] staging: dgnc: remove useless assigned error value in
2016-05-04 5:13 ` Daeseok Youn
@ 2016-05-09 12:09 ` Greg KH
-1 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2016-05-09 12:09 UTC (permalink / raw)
To: Daeseok Youn
Cc: devel, lidza.louina, driverdev-devel, kernel-janitors,
linux-kernel
On Wed, May 04, 2016 at 02:13:26PM +0900, Daeseok Youn wrote:
> the result in dgnc_get_mstat() was initialized with -EIO but
> there are no use of EIO as a result in this function.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_tty.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Same Subject: problem here too, it doesn't make sense.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] staging: dgnc: remove useless assigned error value in
@ 2016-05-09 12:09 ` Greg KH
0 siblings, 0 replies; 8+ messages in thread
From: Greg KH @ 2016-05-09 12:09 UTC (permalink / raw)
To: Daeseok Youn
Cc: lidza.louina, devel, driverdev-devel, kernel-janitors,
linux-kernel
On Wed, May 04, 2016 at 02:13:26PM +0900, Daeseok Youn wrote:
> the result in dgnc_get_mstat() was initialized with -EIO but
> there are no use of EIO as a result in this function.
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
> ---
> drivers/staging/dgnc/dgnc_tty.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
Same Subject: problem here too, it doesn't make sense.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] staging: dgnc: remove useless assigned error value in
2016-05-09 12:09 ` Greg KH
@ 2016-05-10 1:17 ` DaeSeok Youn
-1 siblings, 0 replies; 8+ messages in thread
From: DaeSeok Youn @ 2016-05-10 1:17 UTC (permalink / raw)
To: Greg KH
Cc: devel, Lidza Louina, driverdev-devel@linuxdriverproject.org,
kernel-janitors, linux-kernel
2016-05-09 21:09 GMT+09:00 Greg KH <gregkh@linuxfoundation.org>:
> On Wed, May 04, 2016 at 02:13:26PM +0900, Daeseok Youn wrote:
>> the result in dgnc_get_mstat() was initialized with -EIO but
>> there are no use of EIO as a result in this function.
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>> drivers/staging/dgnc/dgnc_tty.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> Same Subject: problem here too, it doesn't make sense.
OK. I will resend this.
thanks
regards,
Daeseok.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/3] staging: dgnc: remove useless assigned error value in
@ 2016-05-10 1:17 ` DaeSeok Youn
0 siblings, 0 replies; 8+ messages in thread
From: DaeSeok Youn @ 2016-05-10 1:17 UTC (permalink / raw)
To: Greg KH
Cc: Lidza Louina, devel, driverdev-devel@linuxdriverproject.org,
kernel-janitors, linux-kernel
2016-05-09 21:09 GMT+09:00 Greg KH <gregkh@linuxfoundation.org>:
> On Wed, May 04, 2016 at 02:13:26PM +0900, Daeseok Youn wrote:
>> the result in dgnc_get_mstat() was initialized with -EIO but
>> there are no use of EIO as a result in this function.
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>> ---
>> drivers/staging/dgnc/dgnc_tty.c | 4 +---
>> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> Same Subject: problem here too, it doesn't make sense.
OK. I will resend this.
thanks
regards,
Daeseok.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/3] staging: dgnc: remove useless switch-case statements
@ 2017-03-12 14:46 ` Daeseok Youn
0 siblings, 0 replies; 8+ messages in thread
From: Daeseok Youn @ 2017-03-12 14:46 UTC (permalink / raw)
To: lidza.louina
Cc: devel, gregkh, driverdev-devel, kernel-janitors, linux-kernel
The dgnc_tty_send_break() has a switch-case condition for msec.
It is no use except case -1.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index c563ee3..7133d2c 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1786,16 +1786,8 @@ static int dgnc_tty_send_break(struct tty_struct *tty, int msec)
if (!bd || bd->magic != DGNC_BOARD_MAGIC)
return ret;
- switch (msec) {
- case -1:
+ if (msec < 0)
msec = 0xFFFF;
- break;
- case 0:
- msec = 0;
- break;
- default:
- break;
- }
spin_lock_irqsave(&ch->ch_lock, flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/3] staging: dgnc: remove useless switch-case statements
@ 2017-03-12 14:46 ` Daeseok Youn
0 siblings, 0 replies; 8+ messages in thread
From: Daeseok Youn @ 2017-03-12 14:46 UTC (permalink / raw)
To: lidza.louina
Cc: markh, gregkh, driverdev-devel, devel, linux-kernel,
kernel-janitors
The dgnc_tty_send_break() has a switch-case condition for msec.
It is no use except case -1.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index c563ee3..7133d2c 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1786,16 +1786,8 @@ static int dgnc_tty_send_break(struct tty_struct *tty, int msec)
if (!bd || bd->magic != DGNC_BOARD_MAGIC)
return ret;
- switch (msec) {
- case -1:
+ if (msec < 0)
msec = 0xFFFF;
- break;
- case 0:
- msec = 0;
- break;
- default:
- break;
- }
spin_lock_irqsave(&ch->ch_lock, flags);
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2017-03-12 14:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 5:13 [PATCH 2/3] staging: dgnc: remove useless assigned error value in Daeseok Youn
2016-05-04 5:13 ` Daeseok Youn
2016-05-09 12:09 ` Greg KH
2016-05-09 12:09 ` Greg KH
2016-05-10 1:17 ` DaeSeok Youn
2016-05-10 1:17 ` DaeSeok Youn
2017-03-12 14:46 ` [PATCH 2/3] staging: dgnc: remove useless switch-case statements Daeseok Youn
2017-03-12 14:46 ` Daeseok Youn
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.