All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes.sorensen@gmail.com>
To: Vatika Harlalka <vatikaharlalka@gmail.com>,
	 outreachy-kernel@googlegroups.com
Subject: Re: [Outreachy kernel] [PATCH v3] Staging: rtl8188eu: Reindent code to reduce line size
Date: Mon, 23 Feb 2015 15:10:32 -0500	[thread overview]
Message-ID: <54EB8938.1030000@gmail.com> (raw)
In-Reply-To: <20150223094426.GA4689@gmail.com>

On 02/23/15 04:44, Vatika Harlalka wrote:
> Reindent code to reduce line size and increase readability.
> 
> Signed-off-by: Vatika Harlalka <vatikaharlalka@gmail.com>
> ---
> Changes in v3: Fixed spelling error in commit message.
> Changes in v2: Changed subject line to imperative form ( "Reindented" to "Reindent" ).
> 
>  drivers/staging/rtl8188eu/hal/bb_cfg.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8188eu/hal/bb_cfg.c b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> index e1b5437..5ad080a 100644
> --- a/drivers/staging/rtl8188eu/hal/bb_cfg.c
> +++ b/drivers/staging/rtl8188eu/hal/bb_cfg.c
> @@ -508,7 +508,8 @@ static u32 array_phy_reg_pg_8188e[] = {
>  
>  };
>  
> -static void store_pwrindex_offset(struct adapter *Adapter, u32 regaddr, u32 bitmask, u32 data)
> +static void store_pwrindex_offset(struct adapter *Adapter,
> +				u32 regaddr, u32 bitmask, u32 data)
>  {
>  	struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
>  	 u8 pwrGrpCnt = hal_data->pwrGroupCnt;

It looks like you already started addressing the follow-on issue that I
wanted to raise, but you didn't specify that this patch should go on top
of another patch.

You shouldn't really use u8 for an index, it is better to use int, and
if you pick a shorter name it will help breaking down the lines in the
follow-on code. I would recommend doing something like this:

	int idx = hal_data->pwrGroupCnt;

	if (regaddr == rTxAGC_A_Rate18_06)
		hal_data->MCSTxPowerLevelOriginalOffset[idx][0] = data;
..... do this for all users of hal_data->pwrGroupCnt in this function.

Cheers,
Jes

> @@ -553,7 +554,8 @@ static void store_pwrindex_offset(struct adapter *Adapter, u32 regaddr, u32 bitm
>  	}
>  }
>  
> -static void rtl_addr_delay(struct adapter *adapt, u32 addr, u32 bit_mask, u32 data)
> +static void rtl_addr_delay(struct adapter *adapt,
> +			u32 addr, u32 bit_mask, u32 data)
>  {
>  	if (addr == 0xfe)
>  		msleep(50);
> 



  parent reply	other threads:[~2015-02-23 20:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23  9:44 [PATCH v3] Staging: rtl8188eu: Reindent code to reduce line size Vatika Harlalka
2015-02-23 20:07 ` [Outreachy kernel] " Jes Sorensen
2015-02-23 20:10 ` Jes Sorensen [this message]
2015-02-26 12:53   ` Vatika Harlalka

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=54EB8938.1030000@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.