All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8188eu: Move variable assignment
@ 2015-02-27  9:48 Vatika Harlalka
  2015-02-28 21:07 ` [Outreachy kernel] " Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Vatika Harlalka @ 2015-02-27  9:48 UTC (permalink / raw)
  To: outreachy-kernel

Variable path_on is assigned explicitly in the if branch and so
its assignment outside can be moved to the else branch.

Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
 drivers/staging/rtl8188eu/hal/phy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index 56c0bc9..006b723 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -980,11 +980,11 @@ static void path_adda_on(struct adapter *adapt, u32 *adda_reg,
 	u32 path_on;
 	u32 i;
 
-	path_on = is_path_a_on ? 0x04db25a4 : 0x0b1b25a4;
 	if (!is2t) {
 		path_on = 0x0bdb25a0;
 		phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, 0x0b1b25a0);
 	} else {
+		path_on = is_path_a_on ? 0x04db25a4 : 0x0b1b25a4;
 		phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, path_on);
 	}
 
-- 
1.9.1



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

* Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: Move variable assignment
  2015-02-27  9:48 [PATCH] Staging: rtl8188eu: Move variable assignment Vatika Harlalka
@ 2015-02-28 21:07 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-02-28 21:07 UTC (permalink / raw)
  To: Vatika Harlalka; +Cc: outreachy-kernel

On Fri, 27 Feb 2015, Vatika Harlalka wrote:

> Variable path_on is assigned explicitly in the if branch and so
> its assignment outside can be moved to the else branch.

Clever :)

julia

>
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
>  drivers/staging/rtl8188eu/hal/phy.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
> index 56c0bc9..006b723 100644
> --- a/drivers/staging/rtl8188eu/hal/phy.c
> +++ b/drivers/staging/rtl8188eu/hal/phy.c
> @@ -980,11 +980,11 @@ static void path_adda_on(struct adapter *adapt, u32 *adda_reg,
>  	u32 path_on;
>  	u32 i;
>
> -	path_on = is_path_a_on ? 0x04db25a4 : 0x0b1b25a4;
>  	if (!is2t) {
>  		path_on = 0x0bdb25a0;
>  		phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, 0x0b1b25a0);
>  	} else {
> +		path_on = is_path_a_on ? 0x04db25a4 : 0x0b1b25a4;
>  		phy_set_bb_reg(adapt, adda_reg[0], bMaskDWord, path_on);
>  	}
>
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150227094802.GA12516%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>


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

end of thread, other threads:[~2015-02-28 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27  9:48 [PATCH] Staging: rtl8188eu: Move variable assignment Vatika Harlalka
2015-02-28 21:07 ` [Outreachy kernel] " 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.