* [PATCH v2] Staging: rtl8188eu: Remove unused variable
@ 2015-02-23 9:41 Vatika Harlalka
2015-02-23 10:15 ` [Outreachy kernel] " Daniel Baluta
2015-02-23 19:41 ` Jes Sorensen
0 siblings, 2 replies; 3+ messages in thread
From: Vatika Harlalka @ 2015-02-23 9:41 UTC (permalink / raw)
To: outreachy-kernel
We only need the last 8 bits of the offset variable so we can
directly operate on it instead of introducing unneeded
newoffset variable.
Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
---
Changes in v2: Changed commit message to make it more descriptive.
drivers/staging/rtl8188eu/hal/phy.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
index 623fb4f..341f0db 100644
--- a/drivers/staging/rtl8188eu/hal/phy.c
+++ b/drivers/staging/rtl8188eu/hal/phy.c
@@ -117,10 +117,9 @@ static void rf_serial_write(struct adapter *adapt,
u32 data_and_addr = 0;
struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
struct bb_reg_def *phyreg = &hal_data->PHYRegDef[rfpath];
- u32 newoffset;
- newoffset = offset & 0xff;
- data_and_addr = ((newoffset<<20) | (data&0x000fffff)) & 0x0fffffff;
+ offset &= 0xff;
+ data_and_addr = ((offset<<20) | (data&0x000fffff)) & 0x0fffffff;
phy_set_bb_reg(adapt, phyreg->rf3wireOffset, bMaskDWord, data_and_addr);
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] Staging: rtl8188eu: Remove unused variable
2015-02-23 9:41 [PATCH v2] Staging: rtl8188eu: Remove unused variable Vatika Harlalka
@ 2015-02-23 10:15 ` Daniel Baluta
2015-02-23 19:41 ` Jes Sorensen
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Baluta @ 2015-02-23 10:15 UTC (permalink / raw)
To: Vatika Harlalka; +Cc: outreachy-kernel
On Mon, Feb 23, 2015 at 11:41 AM, Vatika Harlalka
<vatikaharlalka@gmail.com> wrote:
> We only need the last 8 bits of the offset variable so we can
> directly operate on it instead of introducing unneeded
> newoffset variable.
>
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
Reviewed-by: Daniel Baluta <daniel.baluta@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH v2] Staging: rtl8188eu: Remove unused variable
2015-02-23 9:41 [PATCH v2] Staging: rtl8188eu: Remove unused variable Vatika Harlalka
2015-02-23 10:15 ` [Outreachy kernel] " Daniel Baluta
@ 2015-02-23 19:41 ` Jes Sorensen
1 sibling, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2015-02-23 19:41 UTC (permalink / raw)
To: Vatika Harlalka, outreachy-kernel
On 02/23/15 04:41, Vatika Harlalka wrote:
> We only need the last 8 bits of the offset variable so we can
> directly operate on it instead of introducing unneeded
> newoffset variable.
>
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
> Changes in v2: Changed commit message to make it more descriptive.
>
> drivers/staging/rtl8188eu/hal/phy.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/hal/phy.c b/drivers/staging/rtl8188eu/hal/phy.c
> index 623fb4f..341f0db 100644
> --- a/drivers/staging/rtl8188eu/hal/phy.c
> +++ b/drivers/staging/rtl8188eu/hal/phy.c
> @@ -117,10 +117,9 @@ static void rf_serial_write(struct adapter *adapt,
> u32 data_and_addr = 0;
> struct hal_data_8188e *hal_data = GET_HAL_DATA(adapt);
> struct bb_reg_def *phyreg = &hal_data->PHYRegDef[rfpath];
> - u32 newoffset;
>
> - newoffset = offset & 0xff;
> - data_and_addr = ((newoffset<<20) | (data&0x000fffff)) & 0x0fffffff;
> + offset &= 0xff;
> + data_and_addr = ((offset<<20) | (data&0x000fffff)) & 0x0fffffff;
Fix is good, but you need to comply with the space rules as well when
you do this. It should say:
data_and_addr = ((offset << 20) | (data & 0x000fffff)) & 0x0fffffff;
Cheers,
Jes
> phy_set_bb_reg(adapt, phyreg->rf3wireOffset, bMaskDWord, data_and_addr);
> }
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-23 19:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-23 9:41 [PATCH v2] Staging: rtl8188eu: Remove unused variable Vatika Harlalka
2015-02-23 10:15 ` [Outreachy kernel] " Daniel Baluta
2015-02-23 19:41 ` 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.