From patchwork Mon May 30 02:52:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirtika Ruchandani X-Patchwork-Id: 9140161 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 48A7360755 for ; Mon, 30 May 2016 02:52:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DB6A20265 for ; Mon, 30 May 2016 02:52:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 324D628183; Mon, 30 May 2016 02:52:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A769D20265 for ; Mon, 30 May 2016 02:52:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753537AbcE3Cwh (ORCPT ); Sun, 29 May 2016 22:52:37 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:36278 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753188AbcE3Cwg (ORCPT ); Sun, 29 May 2016 22:52:36 -0400 Received: by mail-pa0-f65.google.com with SMTP id fg1so19885051pad.3; Sun, 29 May 2016 19:52:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xRbvbjFMBIZO8tmtfeuFCbDRKP3ZNE234Naf3yVwhmY=; b=e75MjAebsXT73zeCR6RLfbAjqmk01rNnQwrdYAi+uwzVsC+mk0ihsJ+UFy4Vc+oX6a A7HUPDZgKGdd4NnoRYao9WsKLdOTrJrFgMtefuKOnh+7iFFjNCoZtUWujit9nHc6tEmv MOFQaaudEf4LZVeCXpWxySl02LA6lAPBScXYGTAyfwgRYq+nMEm673dIPJYc7cfGqdYp ASQTQoxSXs7ztE22JTiOz0OtYiw8tsSHQkZVTjY1bvnSar83is+gsIuU6SsSQ9g8mf5F pITGu5+O9QoaEHnGtyp+yKUV3qjx0ORUE0qzBhrhcMHTA9OmmqobEPhr7UxJPouWlKlo 3hrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xRbvbjFMBIZO8tmtfeuFCbDRKP3ZNE234Naf3yVwhmY=; b=DXcIXKgsRUc64O0zB2zslCnVicNXhjT27zF8ZCXPScMIHz3vmrsJr13hUIlwmYMV11 w5d3yF248VizB92iY7HTCGahRPm8F+yRgZh2VXIqC8EXzoeqs/nJLWrvOdnkqGATEf4E JUkvtz7SS1F0bkCFPi3YbqBJk6TyhJvw0b+wk9vmH9q5uCkjCK9eUHMewrALk5SFFCes /VzEGqHgjI4e8IixigEoz9BlwQCyvPG/nAwsTZKleXoy5AEOdbzAJWHNWrn8CwwifbGd jAhb17HO4iKk4ibqoKFt2Yc00/xFdDDIYYJhi+clE1kdZNfZ711AOambkTBgEVj3sf2/ vhyQ== X-Gm-Message-State: ALyK8tLazJHhEgrcNrdVoalCYGL24A8Y5dHWmAB+vq+q391tBD3HtcJeU/zmxqd9tlLmLg== X-Received: by 10.66.122.196 with SMTP id lu4mr39878919pab.52.1464576755056; Sun, 29 May 2016 19:52:35 -0700 (PDT) Received: from google.com ([2620:0:1000:1301:9988:7148:7bd6:87cc]) by smtp.gmail.com with ESMTPSA id ap3sm4681882pad.33.2016.05.29.19.52.33 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 29 May 2016 19:52:34 -0700 (PDT) Date: Sun, 29 May 2016 19:52:28 -0700 From: Kirtika Ruchandani To: Johannes Berg Cc: linux-wireless@vger.kernel.org, ruchandani.tina@gmail.com, netdev@vger.kernel.org, Julian.Calaby@gmail.com Subject: [PATCH v2 04/10] nl80211: Fix checkpatch.pl warning about braces Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the following checkpatch,pl warning - - braces {} should be used on all arms of this statement. Signed-off-by: Kirtika Ruchandani Reviewed-by: Julian Calaby --- net/wireless/nl80211.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) -- 2.8.0.rc3.226.g39d4020 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 34b8fbe..945405d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -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.p, parse.idx, false, NULL); if (err) @@ -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)) { + goto nla_put_failure; + } state->split_start++; if (state->split) break; @@ -2155,8 +2157,9 @@ static int nl80211_set_wiphy(struct sk_buff *skb, struct genl_info *info) wdev = NULL; netdev = NULL; result = 0; - } else + } else { wdev = netdev->ieee80211_ptr; + } /* end workaround code, by now the rdev is available * and locked, and wdev may or may not be NULL. @@ -3403,8 +3406,9 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) if (!nl80211_valid_auth_type(rdev, params.auth_type, NL80211_CMD_START_AP)) return -EINVAL; - } else + } else { params.auth_type = NL80211_AUTHTYPE_AUTOMATIC; + } err = nl80211_crypto_settings(rdev, info, ¶ms.crypto, NL80211_MAX_NR_CIPHER_SUITES); @@ -3450,8 +3454,9 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info) return err; } else if (wdev->preset_chandef.chan) { params.chandef = wdev->preset_chandef; - } else if (!nl80211_get_ap_channel(rdev, ¶ms)) + } else if (!nl80211_get_ap_channel(rdev, ¶ms)) { return -EINVAL; + } if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, ¶ms.chandef, wdev->iftype)) @@ -7262,8 +7267,9 @@ static int nl80211_crypto_settings(struct cfg80211_registered_device *rdev, return -EINVAL; if (info->attrs[NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT]) settings->control_port_no_encrypt = true; - } else + } else { settings->control_port_ethertype = cpu_to_be16(ETH_P_PAE); + } if (info->attrs[NL80211_ATTR_CIPHER_SUITES_PAIRWISE]) { void *data; @@ -7997,8 +8003,9 @@ static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) if (!nl80211_valid_auth_type(rdev, connect.auth_type, NL80211_CMD_CONNECT)) return -EINVAL; - } else + } else { connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; + } connect.privacy = info->attrs[NL80211_ATTR_PRIVACY];