* [PATCH 1/3] staging: dgnc: remove redundant NULL check in
@ 2016-05-04 5:13 Daeseok Youn
2016-05-09 12:08 ` Greg KH
2016-05-12 11:11 ` [PATCH 1/3] staging: dgnc: remove redundant local variable for Daeseok Youn
0 siblings, 2 replies; 4+ 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
tty and ch are already checked for NULL
before calling dgnc_block_til_ready().
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 2cecdb0..d85d005 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -1172,17 +1172,12 @@ static int dgnc_block_til_ready(struct tty_struct *tty,
struct channel_t *ch)
{
int retval = 0;
- struct un_t *un = NULL;
+ struct un_t *un = tty->driver_data;
unsigned long flags;
uint old_flags = 0;
int sleep_on_un_flags = 0;
- if (!tty || tty->magic != TTY_MAGIC || !file || !ch ||
- ch->magic != DGNC_CHANNEL_MAGIC)
- return -ENXIO;
-
- un = tty->driver_data;
- if (!un || un->magic != DGNC_UNIT_MAGIC)
+ if (!file)
return -ENXIO;
spin_lock_irqsave(&ch->ch_lock, flags);
--
2.8.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] staging: dgnc: remove redundant NULL check in
2016-05-04 5:13 [PATCH 1/3] staging: dgnc: remove redundant NULL check in Daeseok Youn
@ 2016-05-09 12:08 ` Greg KH
2016-05-10 1:17 ` DaeSeok Youn
2016-05-12 11:11 ` [PATCH 1/3] staging: dgnc: remove redundant local variable for Daeseok Youn
1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2016-05-09 12:08 UTC (permalink / raw)
To: Daeseok Youn
Cc: devel, lidza.louina, driverdev-devel, kernel-janitors,
linux-kernel
On Wed, May 04, 2016 at 02:13:04PM +0900, Daeseok Youn wrote:
> tty and ch are already checked for NULL
> before calling dgnc_block_til_ready().
>
> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Your subject line doesn't make sense, please fix it up and resend.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/3] staging: dgnc: remove redundant NULL check in
2016-05-09 12:08 ` Greg KH
@ 2016-05-10 1:17 ` DaeSeok Youn
0 siblings, 0 replies; 4+ 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:08 GMT+09:00 Greg KH <gregkh@linuxfoundation.org>:
> On Wed, May 04, 2016 at 02:13:04PM +0900, Daeseok Youn wrote:
>> tty and ch are already checked for NULL
>> before calling dgnc_block_til_ready().
>>
>> Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
>
> Your subject line doesn't make sense, please fix it up and resend.
OK. I will resend this.
thanks
regards,
Daeseok.
>
> thanks,
>
> greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] staging: dgnc: remove redundant local variable for
2016-05-04 5:13 [PATCH 1/3] staging: dgnc: remove redundant NULL check in Daeseok Youn
2016-05-09 12:08 ` Greg KH
@ 2016-05-12 11:11 ` Daeseok Youn
1 sibling, 0 replies; 4+ messages in thread
From: Daeseok Youn @ 2016-05-12 11:11 UTC (permalink / raw)
To: lidza.louina
Cc: devel, gregkh, driverdev-devel, kernel-janitors, linux-kernel
The local variable "bd" was not used in dgnc_carrier() function.
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index a505775..52a1613 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -640,19 +640,12 @@ exit_unlock:
************************************************************************/
void dgnc_carrier(struct channel_t *ch)
{
- struct dgnc_board *bd;
-
int virt_carrier = 0;
int phys_carrier = 0;
if (!ch || ch->magic != DGNC_CHANNEL_MAGIC)
return;
- bd = ch->ch_bd;
-
- if (!bd || bd->magic != DGNC_BOARD_MAGIC)
- return;
-
if (ch->ch_mistat & UART_MSR_DCD)
phys_carrier = 1;
--
2.8.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-12 11:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 5:13 [PATCH 1/3] staging: dgnc: remove redundant NULL check in Daeseok Youn
2016-05-09 12:08 ` Greg KH
2016-05-10 1:17 ` DaeSeok Youn
2016-05-12 11:11 ` [PATCH 1/3] staging: dgnc: remove redundant local variable for Daeseok Youn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox