Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp650006ybk; Fri, 15 May 2020 09:58:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeVOKJi4jYj+AQixDxP5xiu2Uh+P7GcxnUK9on7ZMv8aRUInchzcnGKWpCIyeDDh2gtfqX X-Received: by 2002:a17:906:ae18:: with SMTP id le24mr3777049ejb.155.1589561936157; Fri, 15 May 2020 09:58:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589561936; cv=none; d=google.com; s=arc-20160816; b=JwU55O5Zs+hwjzeDVYuXByqXQp1EOvQyq1uKI3/zD7Ip/etBZic0bbhu3UtUnyn6vg KbHpoINM3PTN1YZcq8HxIoM+G5mHZUdCY1Cp0MnW3BWvD52ML6mSMY//ZJxMaKB+xxhc 4SldZNycuBHJYl39dA+GGje0tUAECRfdvLMAXhzQxvmAv/+OkVaJ2Ug0CrEWjouIb9Vo TJZ8SnzOksYi/Lu7Kh/qMuzYElCjI1MMxZxSJ86P1ePIYpI8Drg/eJ+skIm47r6wOaDJ oc6EGKZSKUrkDlkrZgcNQSkYcUaIPL5wnFYMxTn6vVdC0a1YawaZ8vAV3WmonhQdpY7K vREw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=YcaP7sGMEIiwunol8+vLg+3QDdGJav3OTc6sFJpDkeQ=; b=jFHJCyiullS0xkuDyneOosXkPB/jy8UQZ2MmcNWRxbVlah67Jb9RI9uovjwOVblNvl vM9J8UO/IdAPN6yrI/I6577Ohfq61L9EJVJHoVvAzco9MTkuQCpPoVf9S4PKWdu8JmaW 1ph6skL13/dXHiyHmT3QqIXcx89eOBqT0uGBwHexrFfBYqguqzyqXXF7gfZo4htBIkfZ Lk6Ci9E1rPl9ptkknLPRmilHR+fvdS8P+TQWyMYK/zU4v+JQfw2cMIkXIwztPuim0IyY pHFhxfCW5q1Xqyj92qpph69rbHQ3Qm7HHybzxB2FfsW2KXQc9epnUoWP/XyApyauWtSK NBog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z21si1452686edq.21.2020.05.15.09.58.33; Fri, 15 May 2020 09:58:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726252AbgEOQ4x (ORCPT + 99 others); Fri, 15 May 2020 12:56:53 -0400 Received: from mailomta4-sa.btinternet.com ([213.120.69.10]:23050 "EHLO sa-prd-fep-049.btinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726023AbgEOQ4w (ORCPT ); Fri, 15 May 2020 12:56:52 -0400 Received: from sa-prd-rgout-001.btmx-prd.synchronoss.net ([10.2.38.4]) by sa-prd-fep-049.btinternet.com with ESMTP id <20200515165650.IJDJ4342.sa-prd-fep-049.btinternet.com@sa-prd-rgout-001.btmx-prd.synchronoss.net>; Fri, 15 May 2020 17:56:50 +0100 Authentication-Results: btinternet.com; auth=pass (LOGIN) smtp.auth=j.oldman998@btinternet.com X-Originating-IP: [31.53.141.224] X-OWM-Source-IP: 31.53.141.224 (GB) X-OWM-Env-Sender: j.oldman998@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgeduhedrleekgddutdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuueftkffvkffujffvgffngfevqffopdfqfgfvnecuuegrihhlohhuthemuceftddunecunecujfgurhephffvufffkffosedttdertdertddtnecuhfhrohhmpeflohhhnhcuqfhlughmrghnuceojhhohhhnrdholhgumhgrnhesphholhgvhhhilhhlrdgtohdruhhkqeenucggtffrrghtthgvrhhnpeegfedthfefueeihffgkeefteehuddttdefudetveelveefvdefhfejieejhffggfenucfkphepfedurdehfedrudeguddrvddvgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehhvghnrhihrdhhohhmvgdpihhnvghtpeefuddrheefrddugedurddvvdegpdhmrghilhhfrhhomhepoehjohhhnhdrohhlughmrghnsehpohhlvghhihhllhdrtghordhukheqpdhrtghpthhtohepoeguvghvvghlsegurhhivhgvrhguvghvrdhoshhuohhslhdrohhrgheqpdhrtghpthhtohepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhrgheqpdhrtghpthhtohepoehjohhhnhdrohhlughmrghnsehpohhlvghhihhllhdrtghordhukheqpdhrtghpthhtohepoehkrghirdhhvghnghdrfhgvnhhgsegtrghnohhnihgtrghlrdgtohhmqedprhgtphhtthhopeeolhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgqe X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from henry.home (31.53.141.224) by sa-prd-rgout-001.btmx-prd.synchronoss.net (5.8.340) (authenticated as j.oldman998@btinternet.com) id 5E3A241110D90CCF; Fri, 15 May 2020 17:56:50 +0100 From: John Oldman To: gregkh@linuxfoundation.org Cc: kai.heng.feng@canonical.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, John Oldman Subject: [PATCH V2] Staging: rtl8723bs: os_de: if-else coding style issue Date: Fri, 15 May 2020 17:56:46 +0100 Message-Id: <20200515165646.12867-1-john.oldman@polehill.co.uk> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Coding style issues: This patch clears the checkpatch.pl "braces {} are not necessary for single statement blocks" and "else_should_follow_close_brace" warnings. Signed-off-by: John Oldman --- v1: First attempt v2: Followed The rule is that "if one side of the if else statement has curly braces then all sides get curly braces even if they're just one line long." drivers/staging/rtl8723bs/os_dep/os_intfs.c | 33 ++++++++------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/drivers/staging/rtl8723bs/os_dep/os_intfs.c b/drivers/staging/rtl8723bs/os_dep/os_intfs.c index d29f59bbb613..50a3c2c3a8d2 100644 --- a/drivers/staging/rtl8723bs/os_dep/os_intfs.c +++ b/drivers/staging/rtl8723bs/os_dep/os_intfs.c @@ -1057,9 +1057,9 @@ static int pm_netdev_open(struct net_device *pnetdev, u8 bnormal) status = _netdev_open(pnetdev); mutex_unlock(&(adapter_to_dvobj(padapter)->hw_init_mutex)); } - } - else + } else { status = (_SUCCESS == ips_netdrv_open(padapter)) ? (0) : (-1); + } return status; } @@ -1192,8 +1192,7 @@ void rtw_dev_unload(struct adapter *padapter) padapter->bup = false; DBG_871X("<=== %s\n", __func__); - } - else { + } else { RT_TRACE(_module_hci_intfs_c_, _drv_notice_, ("%s: bup ==false\n", __func__)); DBG_871X("%s: bup ==false\n", __func__); } @@ -1223,8 +1222,7 @@ static int rtw_suspend_free_assoc_resource(struct adapter *padapter) rtw_disassoc_cmd(padapter, 0, false); /* s2-2. indicate disconnect to os */ rtw_indicate_disconnect(padapter); - } - else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { + } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { rtw_sta_flush(padapter); } @@ -1270,9 +1268,8 @@ void rtw_suspend_wow(struct adapter *padapter) padapter->bDriverStopped = false; /* for 32k command */ /* 2. disable interrupt */ - if (padapter->intf_stop) { + if (padapter->intf_stop) padapter->intf_stop(padapter); - } /* 2.1 clean interrupt */ if (padapter->HalFunc.clear_interrupt) @@ -1448,14 +1445,13 @@ int rtw_suspend_common(struct adapter *padapter) if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true) { #ifdef CONFIG_WOWLAN - if (check_fwstate(pmlmepriv, _FW_LINKED)) { + if (check_fwstate(pmlmepriv, _FW_LINKED)) pwrpriv->wowlan_mode = true; - } else if (pwrpriv->wowlan_pno_enable == true) { + else if (pwrpriv->wowlan_pno_enable == true) pwrpriv->wowlan_mode |= pwrpriv->wowlan_pno_enable; - } if (pwrpriv->wowlan_mode == true) - rtw_suspend_wow(padapter); + rtw_suspend_wow(padapter); else rtw_suspend_normal(padapter); @@ -1522,9 +1518,8 @@ int rtw_resume_process_wow(struct adapter *padapter) pwrpriv->bFwCurrentInPSMode = false; - if (padapter->intf_stop) { + if (padapter->intf_stop) padapter->intf_stop(padapter); - } if (padapter->HalFunc.clear_interrupt) padapter->HalFunc.clear_interrupt(padapter); @@ -1541,18 +1536,15 @@ int rtw_resume_process_wow(struct adapter *padapter) padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_WOWLAN, (u8 *)&poidparam); psta = rtw_get_stainfo(&padapter->stapriv, get_bssid(&padapter->mlmepriv)); - if (psta) { + if (psta) set_sta_rate(padapter, psta); - } - padapter->bDriverStopped = false; DBG_871X("%s: wowmode resuming, DriverStopped:%d\n", __func__, padapter->bDriverStopped); rtw_start_drv_threads(padapter); - if (padapter->intf_start) { + if (padapter->intf_start) padapter->intf_start(padapter); - } /* start netif queue */ if (pnetdev) { @@ -1656,9 +1648,8 @@ int rtw_resume_process_ap_wow(struct adapter *padapter) DBG_871X("%s: wowmode resuming, DriverStopped:%d\n", __func__, padapter->bDriverStopped); rtw_start_drv_threads(padapter); - if (padapter->intf_start) { + if (padapter->intf_start) padapter->intf_start(padapter); - } /* start netif queue */ if (pnetdev) { -- 2.17.1