From: Jes Sorensen <jes.sorensen@gmail.com>
To: Vatika Harlalka <vatikaharlalka@gmail.com>,
outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v2] Staging: rtl8188eu: Remove unused variable
Date: Mon, 23 Feb 2015 14:41:24 -0500 [thread overview]
Message-ID: <54EB8264.8070506@gmail.com> (raw)
In-Reply-To: <20150223094130.GA4668@gmail.com>
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);
> }
>
>
prev parent reply other threads:[~2015-02-23 19:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54EB8264.8070506@gmail.com \
--to=jes.sorensen@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=vatikaharlalka@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.