lkml.org 
[lkml]   [2017]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] Staging: rtl8712: ieee80211: fixed camelcase coding style issue
From
Date
On Mon, 2017-05-08 at 00:45 +0530, Jaya Durga wrote:
> Fixed coding style issue

Please list the various renames you are doing.

BeaconPeriod -> beacon_period
DSConfig -> ds_config
ATIMWindow -> atim_window

etc...

And it's generally better to do these while avoiding
changing line breaks.


There are maintainers that also would want these
renames done in individual separate patches.

> diff --git a/drivers/staging/rtl8712/ieee80211.c b/drivers/staging/rtl8712/ieee80211.c
[]
> @@ -174,7 +174,8 @@ int r8712_generate_ie(struct registry_priv *pregistrypriv)
> sz += 8;
> ie += sz;
> /*beacon interval : 2bytes*/
> - *(__le16 *)ie = cpu_to_le16((u16)pdev_network->Configuration.BeaconPeriod);
> + *(__le16 *)ie = cpu_to_le16(
> + (u16)pdev_network->configuration.beacon_period);

It's also frequently better to use a temporary pointer
and convert these relatively long indirections to
something simpler like:

<whatever_type> *cfg = &pdev_network->configuration;

*(__le16 *)ie = cpu_to_le16(cfg->beacon_period);

etc...

in separate patches.


\
 
 \ /
  Last update: 2017-05-08 01:08    [W:0.043 / U:0.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site