Re: [PATCH 3/3] nl80211: Various checkpatch.pl fixes

2016-05-29 Thread Julian Calaby
Hi Kirtika,

On Mon, May 30, 2016 at 10:44 AM, Kirtika Ruchandani
 wrote:
>>> There's too much stuff here to quickly review, it'd be nice if you
>>> could split this up into patches that do the following:
>
> Is it preferable to resend the whole patch-set or just patch 3/3 in
> this one as a separate set?

Re-send the entire set, make sure you mark it as v2, include a
changelog in the cover letter or below the "---" in the patches
themselves, and don't forget to include the reviewed-bys for any
unchanged patches.

Thanks,

-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/


Re: [PATCH 3/3] nl80211: Various checkpatch.pl fixes

2016-05-29 Thread Kirtika Ruchandani
>> There's too much stuff here to quickly review, it'd be nice if you
>> could split this up into patches that do the following:

Is it preferable to resend the whole patch-set or just patch 3/3 in
this one as a separate set?


Re: [PATCH 3/3] nl80211: Various checkpatch.pl fixes

2016-05-29 Thread Kirtika Ruchandani
> There's too much stuff here to quickly review, it'd be nice if you
> could split this up into patches that do the following:

Thanks, I will send out a v2 with the split you suggested.


Re: [PATCH 3/3] nl80211: Various checkpatch.pl fixes

2016-05-29 Thread Julian Calaby
Hi Kirtika,

On Sun, May 29, 2016 at 1:31 PM, Kirtika Ruchandani
 wrote:
> This patch fixes the following checkpatch.pl issues -

There's too much stuff here to quickly review, it'd be nice if you
could split this up into patches that do the following:

Space issues:
> - space preferred around that 
> - no space needed after cast.
> - Alignment should match open parenthesis
> - suspect code indent for conditional statements
> - Statements should start on a tabstop

Braces:
> - braces {} should be used on all arms of this statement

Multiple assignments:
> - multiple assignments should be avoided

ether_addr_copy:
> - prefer ether_addr_copy over memcpy

Spelling:
> - correct spelling - 'implementation'

NULL comparisons:
> - comparison to NULL could be written as !foo

kcalloc vs kzalloc:
> - prefer kcalloc over kzalloc with multiply

Thanks,

-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/


[PATCH 3/3] nl80211: Various checkpatch.pl fixes

2016-05-28 Thread Kirtika Ruchandani
This patch fixes the following checkpatch.pl issues -
- space preferred around that 
- no space needed after cast.
- braces {} should be used on all arms of this statement
- Alignment should match open parenthesis
- suspect code indent for conditional statements
- Statements should start on a tabstop
- multiple assignments should be avoided
- prefer ether_addr_copy over memcpy
- correct spelling - 'implementation'
- comparison to NULL could be written as !foo
- prefer kcalloc over kzalloc with multiply

Signed-off-by: Kirtika Ruchandani 
---
 net/wireless/nl80211.c | 152 ++---
 1 file changed, 82 insertions(+), 70 deletions(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index cd422bd..9f7eb16 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -39,10 +39,10 @@ static void nl80211_post_doit(const struct genl_ops *ops, 
struct sk_buff *skb,
 
 /* the netlink family */
 static struct genl_family nl80211_fam = {
-   .id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
-   .name = NL80211_GENL_NAME,  /* have users key off the name instead 
*/
-   .hdrsize = 0,   /* no private header */
-   .version = 1,   /* no particular meaning now */
+   .id = GENL_ID_GENERATE, /* don't bother with a hardcoded ID */
+   .name = NL80211_GENL_NAME,  /* have users key off the name instead */
+   .hdrsize = 0,   /* no private header */
+   .version = 1,   /* no particular meaning now */
.maxattr = NL80211_ATTR_MAX,
.netnsok = true,
.pre_doit = nl80211_pre_doit,
@@ -213,7 +213,7 @@ cfg80211_get_dev_from_info(struct net *netns, struct 
genl_info *info)
 static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = {
[NL80211_ATTR_WIPHY] = { .type = NLA_U32 },
[NL80211_ATTR_WIPHY_NAME] = { .type = NLA_NUL_STRING,
- .len = 20-1 },
+ .len = 20 - 1 },
[NL80211_ATTR_WIPHY_TXQ_PARAMS] = { .type = NLA_NESTED },
 
[NL80211_ATTR_WIPHY_FREQ] = { .type = NLA_U32 },
@@ -231,7 +231,7 @@ static const struct nla_policy 
nl80211_policy[NUM_NL80211_ATTR] = {
 
[NL80211_ATTR_IFTYPE] = { .type = NLA_U32 },
[NL80211_ATTR_IFINDEX] = { .type = NLA_U32 },
-   [NL80211_ATTR_IFNAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ-1 },
+   [NL80211_ATTR_IFNAME] = { .type = NLA_NUL_STRING, .len = IFNAMSIZ - 1 },
 
[NL80211_ATTR_MAC] = { .len = ETH_ALEN },
[NL80211_ATTR_PREV_BSSID] = { .len = ETH_ALEN },
@@ -870,8 +870,9 @@ nl80211_parse_connkeys(struct cfg80211_registered_device 
*rdev,
result->def = parse.idx;
if (!parse.def_uni || !parse.def_multi)
goto error;
-   } else if (parse.defmgmt)
+   } else if (parse.defmgmt) {
goto error;
+   }
err = cfg80211_validate_key_settings(rdev, ,
 parse.idx, false, NULL);
if (err)
@@ -927,7 +928,7 @@ static struct ieee80211_channel 
*nl80211_get_valid_chan(struct wiphy *wiphy,
 {
struct ieee80211_channel *chan;
 
-   if (tb == NULL)
+   if (!tb)
return NULL;
chan = ieee80211_get_channel(wiphy, nla_get_u32(tb));
if (!chan || chan->flags & IEEE80211_CHAN_DISABLED)
@@ -966,7 +967,7 @@ static int nl80211_put_iface_combinations(struct wiphy 
*wiphy,
int i, j;
 
nl_combis = nla_nest_start(msg,
-   NL80211_ATTR_INTERFACE_COMBINATIONS);
+  NL80211_ATTR_INTERFACE_COMBINATIONS);
if (!nl_combis)
goto nla_put_failure;
 
@@ -1011,9 +1012,9 @@ static int nl80211_put_iface_combinations(struct wiphy 
*wiphy,
goto nla_put_failure;
if (large &&
(nla_put_u32(msg, NL80211_IFACE_COMB_RADAR_DETECT_WIDTHS,
-   c->radar_detect_widths) ||
+c->radar_detect_widths) ||
 nla_put_u32(msg, NL80211_IFACE_COMB_RADAR_DETECT_REGIONS,
-   c->radar_detect_regions)))
+c->radar_detect_regions)))
goto nla_put_failure;
 
nla_nest_end(msg, nl_combi);
@@ -1401,8 +1402,9 @@ static int nl80211_send_wiphy(struct 
cfg80211_registered_device *rdev,
break;
case 2:
if (nl80211_put_iftypes(msg, NL80211_ATTR_SUPPORTED_IFTYPES,
-   rdev->wiphy.interface_modes))
-   goto nla_put_failure;
+   rdev->wiphy.interface_modes)) {
+