Re: [PATCH] Staging : wilc1000: Remove unnecessary parentheses

2015-07-29 Thread Dan Carpenter
The original code is fine...  I probably would write it the way you
suggest, but I can also see why people would write it the other way.
This isn't an official CodingStyle rule so I feel like the author gets
to choose.  Part of the reason for CodingStyle is so that we don't run
into madness of changing every single thing all the time.

regards,
dan carpenter


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] Staging : wilc1000: Remove unnecessary parentheses

2015-07-29 Thread Dan Carpenter
The original code is fine...  I probably would write it the way you
suggest, but I can also see why people would write it the other way.
This isn't an official CodingStyle rule so I feel like the author gets
to choose.  Part of the reason for CodingStyle is so that we don't run
into madness of changing every single thing all the time.

regards,
dan carpenter


--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging : wilc1000: Remove unnecessary parentheses

2015-07-28 Thread Shraddha Barke
Remove parentheses around the right hand side of an assignment
as they are not needed

The semantic patch used is :

@@
expression E;
expression f;
constant C;
@@
(
f = (E == C)
|
f =
- (
  E
- )

)

Signed-off-by: Shraddha Barke 
---
 drivers/staging/wilc1000/wilc_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_sdio.c 
b/drivers/staging/wilc1000/wilc_sdio.c
index 897e47e..4b81f17 100644
--- a/drivers/staging/wilc1000/wilc_sdio.c
+++ b/drivers/staging/wilc1000/wilc_sdio.c
@@ -1072,7 +1072,7 @@ static int sdio_clear_int_ext(uint32_t val)
cmd.function = 0;
cmd.raw = 0;
cmd.address = 0xf8;
-   cmd.data = (1 << i);
+   cmd.data = 1 << i;
 
ret = g_sdio.sdio_cmd52();
if (!ret) {
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH] Staging : wilc1000: Remove unnecessary parentheses

2015-07-28 Thread Shraddha Barke
Remove parentheses around the right hand side of an assignment
as they are not needed

The semantic patch used is :

@@
expression E;
expression f;
constant C;
@@
(
f = (E == C)
|
f =
- (
  E
- )

)

Signed-off-by: Shraddha Barke shraddha.6...@gmail.com
---
 drivers/staging/wilc1000/wilc_sdio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_sdio.c 
b/drivers/staging/wilc1000/wilc_sdio.c
index 897e47e..4b81f17 100644
--- a/drivers/staging/wilc1000/wilc_sdio.c
+++ b/drivers/staging/wilc1000/wilc_sdio.c
@@ -1072,7 +1072,7 @@ static int sdio_clear_int_ext(uint32_t val)
cmd.function = 0;
cmd.raw = 0;
cmd.address = 0xf8;
-   cmd.data = (1  i);
+   cmd.data = 1  i;
 
ret = g_sdio.sdio_cmd52(cmd);
if (!ret) {
-- 
2.1.0

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/