* [PATCH] Staging: rtl8188eu: rf_cfg: Remove useless cast
@ 2015-10-14 18:51 Shivani Bhardwaj
2015-10-14 19:15 ` [Outreachy kernel] " Daniel Baluta
0 siblings, 1 reply; 2+ messages in thread
From: Shivani Bhardwaj @ 2015-10-14 18:51 UTC (permalink / raw)
To: outreachy-kernel
Type conversion of variables can be done by compiler implicitly so,
explicit conversions should be removed.
Semantic patch used:
@@
type T;
T e;
identifier x;
@@
* T x = (T)e;
Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
---
drivers/staging/rtl8188eu/hal/rf_cfg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/rtl8188eu/hal/rf_cfg.c b/drivers/staging/rtl8188eu/hal/rf_cfg.c
index 954cade..067649a 100644
--- a/drivers/staging/rtl8188eu/hal/rf_cfg.c
+++ b/drivers/staging/rtl8188eu/hal/rf_cfg.c
@@ -188,7 +188,7 @@ static void rtl8188e_config_rf_reg(struct adapter *adapt,
u32 addr, u32 data)
{
u32 content = 0x1000; /*RF Content: radio_a_txt*/
- u32 maskforphyset = (u32)(content & 0xE000);
+ u32 maskforphyset = content & 0xE000;
rtl_rfreg_delay(adapt, RF90_PATH_A, addr | maskforphyset,
RFREG_OFFSET_MASK,
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Outreachy kernel] [PATCH] Staging: rtl8188eu: rf_cfg: Remove useless cast
2015-10-14 18:51 [PATCH] Staging: rtl8188eu: rf_cfg: Remove useless cast Shivani Bhardwaj
@ 2015-10-14 19:15 ` Daniel Baluta
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Baluta @ 2015-10-14 19:15 UTC (permalink / raw)
To: Shivani Bhardwaj; +Cc: outreachy-kernel
On Wed, Oct 14, 2015 at 9:51 PM, Shivani Bhardwaj <shivanib134@gmail.com> wrote:
> Type conversion of variables can be done by compiler implicitly so,
> explicit conversions should be removed.
> Semantic patch used:
> @@
> type T;
> T e;
> identifier x;
> @@
>
> * T x = (T)e;
>
> Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
> ---
> drivers/staging/rtl8188eu/hal/rf_cfg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/rtl8188eu/hal/rf_cfg.c b/drivers/staging/rtl8188eu/hal/rf_cfg.c
> index 954cade..067649a 100644
> --- a/drivers/staging/rtl8188eu/hal/rf_cfg.c
> +++ b/drivers/staging/rtl8188eu/hal/rf_cfg.c
> @@ -188,7 +188,7 @@ static void rtl8188e_config_rf_reg(struct adapter *adapt,
> u32 addr, u32 data)
> {
> u32 content = 0x1000; /*RF Content: radio_a_txt*/
> - u32 maskforphyset = (u32)(content & 0xE000);
> + u32 maskforphyset = content & 0xE000;
>
> rtl_rfreg_delay(adapt, RF90_PATH_A, addr | maskforphyset,
> RFREG_OFFSET_MASK,
> --
> 2.1.0
>
> --
> 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/20151014185111.GA29205%40ubuntu.
> 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-10-14 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-14 18:51 [PATCH] Staging: rtl8188eu: rf_cfg: Remove useless cast Shivani Bhardwaj
2015-10-14 19:15 ` [Outreachy kernel] " Daniel Baluta
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.