* [PATCH] staging: rtl8723bs: os_dep: ioctl_cfg80211: fixed code styl issues
@ 2020-06-18 14:10 Shihab Rashed
2020-06-18 14:40 ` Dan Carpenter
0 siblings, 1 reply; 2+ messages in thread
From: Shihab Rashed @ 2020-06-18 14:10 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Shihab Rashed
Fixed two brace coding style issues and one comment style issue found by
checkpatch.
Signed-off-by: Shihab Rashed <shihab.rashed97@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
index 2fb80b6eb51d..3b06b60cdfd1 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
@@ -117,15 +117,12 @@ static struct ieee80211_supported_band *rtw_spt_band_alloc(
struct ieee80211_supported_band *spt_band = NULL;
int n_channels, n_bitrates;
- if (band == NL80211_BAND_2GHZ)
- {
+ if (band == NL80211_BAND_2GHZ) {
n_channels = RTW_2G_CHANNELS_NUM;
n_bitrates = RTW_G_RATES_NUM;
- }
- else
- {
+ } else {
goto exit;
- }
+ }
spt_band = rtw_zmalloc(sizeof(struct ieee80211_supported_band) +
sizeof(struct ieee80211_channel) * n_channels +
@@ -203,8 +200,10 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
static int rtw_ieee80211_channel_to_frequency(int chan, int band)
{
- /* see 802.11 17.3.8.3.2 and Annex J
- * there are overlapping channel numbers in 5GHz and 2GHz bands */
+ /*
+ * see 802.11 17.3.8.3.2 and Annex J
+ * there are overlapping channel numbers in 5GHz and 2GHz bands
+ */
if (band == NL80211_BAND_2GHZ) {
if (chan == 14)
return 2484;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] staging: rtl8723bs: os_dep: ioctl_cfg80211: fixed code styl issues
2020-06-18 14:10 [PATCH] staging: rtl8723bs: os_dep: ioctl_cfg80211: fixed code styl issues Shihab Rashed
@ 2020-06-18 14:40 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2020-06-18 14:40 UTC (permalink / raw)
To: Shihab Rashed; +Cc: gregkh, devel, linux-kernel
On Thu, Jun 18, 2020 at 04:10:02PM +0200, Shihab Rashed wrote:
> Fixed two brace coding style issues and one comment style issue found by
> checkpatch.
>
> Signed-off-by: Shihab Rashed <shihab.rashed97@gmail.com>
> ---
> drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> index 2fb80b6eb51d..3b06b60cdfd1 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c
> @@ -117,15 +117,12 @@ static struct ieee80211_supported_band *rtw_spt_band_alloc(
> struct ieee80211_supported_band *spt_band = NULL;
> int n_channels, n_bitrates;
>
> - if (band == NL80211_BAND_2GHZ)
> - {
> + if (band == NL80211_BAND_2GHZ) {
^^
too many spaces.
> n_channels = RTW_2G_CHANNELS_NUM;
> n_bitrates = RTW_G_RATES_NUM;
> - }
> - else
> - {
> + } else {
^^
too many spaces.
> goto exit;
> - }
> + }
^
Indented too far.
>
> spt_band = rtw_zmalloc(sizeof(struct ieee80211_supported_band) +
> sizeof(struct ieee80211_channel) * n_channels +
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-18 14:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 14:10 [PATCH] staging: rtl8723bs: os_dep: ioctl_cfg80211: fixed code styl issues Shihab Rashed
2020-06-18 14:40 ` Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).