All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Outreachy kernel] [PATCH] staging: dgap: Merge two separate if conditions
  2016-02-09 17:17 [PATCH] staging: dgap: Merge two separate if conditions Janani Ravichandran
@ 2016-02-09 12:22 ` Sudip Mukherjee
  2016-02-09 12:25   ` Julia Lawall
  0 siblings, 1 reply; 3+ messages in thread
From: Sudip Mukherjee @ 2016-02-09 12:22 UTC (permalink / raw)
  To: Janani Ravichandran; +Cc: outreachy-kernel

On Tue, Feb 09, 2016 at 12:17:35PM -0500, Janani Ravichandran wrote:
> Merge two if conditions with the same statements to avoid code
> duplication.
> 
> Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
> ---
>  drivers/staging/dgap/dgap.c | 6 +-----

dgap is no longer in staging tree. Which tree are you using?

regards
sudip


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

* Re: [Outreachy kernel] [PATCH] staging: dgap: Merge two separate if conditions
  2016-02-09 12:22 ` [Outreachy kernel] " Sudip Mukherjee
@ 2016-02-09 12:25   ` Julia Lawall
  0 siblings, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2016-02-09 12:25 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: Janani Ravichandran, outreachy-kernel

On Tue, 9 Feb 2016, Sudip Mukherjee wrote:

> On Tue, Feb 09, 2016 at 12:17:35PM -0500, Janani Ravichandran wrote:
> > Merge two if conditions with the same statements to avoid code
> > duplication.
> >
> > Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
> > ---
> >  drivers/staging/dgap/dgap.c | 6 +-----
>
> dgap is no longer in staging tree. Which tree are you using?

Even if the patch is not useful any more, you could use Coccinelle to see
if there are other occurrences of the same situation.

julia


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

* [PATCH] staging: dgap: Merge two separate if conditions
@ 2016-02-09 17:17 Janani Ravichandran
  2016-02-09 12:22 ` [Outreachy kernel] " Sudip Mukherjee
  0 siblings, 1 reply; 3+ messages in thread
From: Janani Ravichandran @ 2016-02-09 17:17 UTC (permalink / raw)
  To: outreachy-kernel

Merge two if conditions with the same statements to avoid code
duplication.

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
---
 drivers/staging/dgap/dgap.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index bad3551..d7eb879 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -2014,11 +2014,7 @@ static void dgap_poll_tasklet(unsigned long data)
 	if (bd->state == BOARD_READY) {
 		struct ev_t __iomem *eaddr;
 
-		if (!bd->re_map_membase) {
-			spin_unlock_irqrestore(&bd->bd_lock, lock_flags);
-			return;
-		}
-		if (!bd->re_map_port) {
+		if (!bd->re_map_membase || !bd->re_map_port) {
 			spin_unlock_irqrestore(&bd->bd_lock, lock_flags);
 			return;
 		}
-- 
2.5.0



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

end of thread, other threads:[~2016-02-09 12:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-09 17:17 [PATCH] staging: dgap: Merge two separate if conditions Janani Ravichandran
2016-02-09 12:22 ` [Outreachy kernel] " Sudip Mukherjee
2016-02-09 12:25   ` Julia Lawall

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.