All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rtl8188eu: Refine if condition
@ 2015-02-27 17:58 Vatika Harlalka
  2015-03-02  0:21 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Vatika Harlalka @ 2015-02-27 17:58 UTC (permalink / raw)
  To: outreachy-kernel

Variable bound takes maximum value 8 so the if condition
for odd i is made more compact.

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 6af72a4..3d0e447 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -1038,7 +1038,7 @@ static bool simularity_compare(struct adapter *adapt, s32 resulta[][8],
 		bound = 4;
 
 	for (i = 0; i < bound; i++) {
-		if ((i == 1) || (i == 3) || (i == 5) || (i == 7)) {
+		if (i%2 == 1) {
 			if ((resulta[c1][i] & 0x00000200) != 0)
 				tmp1 = resulta[c1][i] | 0xFFFFFC00;
 			else
-- 
1.9.1



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

end of thread, other threads:[~2015-03-02 17:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-27 17:58 [PATCH] Staging: rtl8188eu: Refine if condition Vatika Harlalka
2015-03-02  0:21 ` [Outreachy kernel] " Greg KH
2015-03-02 17:30   ` Jes Sorensen

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.