* [PATCH 1/3] staging: rtl8723bs: os_dep: Remove true and false comparison
2018-10-11 17:42 [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues Mamta Shukla
@ 2018-10-11 17:44 ` Mamta Shukla
2018-10-11 17:46 ` [PATCH 2/3] staging: rtl8723bs: os_dep: Remove space after cast Mamta Shukla
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Mamta Shukla @ 2018-10-11 17:44 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Larry.Finger, hadess, hdegoede
Remove comparison to true and false in if statement.
Issue found with checkpatch.pl
CHECK: Using comparison to true is error prone
CHECK: Using comparison to false is error prone
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index c38298d..48a1560 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -209,9 +209,9 @@ static char *translate_scan(struct adapter *padapter,
i++;
}
- if (vht_cap == true) {
+ if (vht_cap) {
max_rate = vht_data_rate;
- } else if (ht_cap == true) {
+ } else if (ht_cap) {
if (mcs_rate&0x8000) { /* MCS15 */
max_rate = (bw_40MHz) ? ((short_GI)?300:270):((short_GI)?144:130);
} else if (mcs_rate&0x0080) { /* MCS7 */
@@ -862,7 +862,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
goto exit;
}
- if (padapter->hw_init_completed ==false) {
+ if (!padapter->hw_init_completed) {
ret = -EPERM;
goto exit;
}
@@ -1295,7 +1295,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
goto exit;
}
- if (padapter->hw_init_completed ==false) {
+ if (!padapter->hw_init_completed ) {
ret = -1;
goto exit;
}
@@ -1303,7 +1303,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
/* When Busy Traffic, driver do not site survey. So driver return success. */
/* wpa_supplicant will not issue SIOCSIWSCAN cmd again after scan timeout. */
/* modify by thomas 2011-02-22. */
- if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true) {
+ if (pmlmepriv->LinkDetectInfo.bBusyTraffic) {
indicate_wx_scan_complete_event(padapter);
goto exit;
}
@@ -4229,7 +4229,7 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p)
* so, we just check hw_init_completed
*/
- if (padapter->hw_init_completed ==false) {
+ if (!padapter->hw_init_completed) {
ret = -EPERM;
goto out;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/3] staging: rtl8723bs: os_dep: Remove space after cast
2018-10-11 17:42 [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues Mamta Shukla
2018-10-11 17:44 ` [PATCH 1/3] staging: rtl8723bs: os_dep: Remove true and false comparison Mamta Shukla
@ 2018-10-11 17:46 ` Mamta Shukla
2018-10-11 17:48 ` [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name Mamta Shukla
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Mamta Shukla @ 2018-10-11 17:46 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Larry.Finger, hadess, hdegoede
Remove space after cast to fix checkpatch issue.
CHECK: No space is necessary after a cast
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 48a1560..243394e 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -337,7 +337,7 @@ static char *translate_scan(struct adapter *padapter,
#ifdef CONFIG_SIGNAL_DISPLAY_DBM
- iwe.u.qual.level = (u8) translate_percentage_to_dbm(ss);/* dbm */
+ iwe.u.qual.level = (u8)translate_percentage_to_dbm(ss);/* dbm */
#else
#ifdef CONFIG_SKIP_SIGNAL_SCALE_MAPPING
{
@@ -392,7 +392,7 @@ static char *translate_scan(struct adapter *padapter,
static int wpa_set_auth_algs(struct net_device *dev, u32 value)
{
- struct adapter *padapter = (struct adapter *) rtw_netdev_priv(dev);
+ struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
int ret = 0;
if ((value & WLAN_AUTH_SHARED_KEY) && (value & WLAN_AUTH_OPEN)) {
@@ -436,7 +436,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
param->u.crypt.err = 0;
param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
- if (param_len < (u32) ((u8 *) param->u.crypt.key - (u8 *) param) + param->u.crypt.key_len) {
+ if (param_len < (u32)((u8 *)param->u.crypt.key - (u8 *)param) + param->u.crypt.key_len) {
ret = -EINVAL;
goto exit;
}
@@ -946,7 +946,7 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
u8 j, blInserted = false;
int intReturn = false;
struct security_priv *psecuritypriv = &padapter->securitypriv;
- struct iw_pmksa* pPMK = (struct iw_pmksa*) extra;
+ struct iw_pmksa* pPMK = (struct iw_pmksa*)extra;
u8 strZeroMacAddress[ ETH_ALEN ] = { 0x00 };
u8 strIssueBssid[ ETH_ALEN ] = { 0x00 };
@@ -1236,7 +1236,7 @@ static int rtw_wx_set_mlme(struct net_device *dev,
int ret = 0;
u16 reason;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- struct iw_mlme *mlme = (struct iw_mlme *) extra;
+ struct iw_mlme *mlme = (struct iw_mlme *)extra;
if (mlme == NULL)
@@ -2390,7 +2390,7 @@ static int rtw_wx_set_channel_plan(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
- u8 channel_plan_req = (u8) (*((int *)wrqu));
+ u8 channel_plan_req = (u8)(*((int *)wrqu));
if (_SUCCESS == rtw_set_chplan_cmd(padapter, channel_plan_req, 1, 1))
DBG_871X("%s set channel_plan = 0x%02X\n", __func__, channel_plan_req);
@@ -2584,7 +2584,7 @@ static int rtw_wps_start(struct net_device *dev,
goto exit;
}
- uintRet = copy_from_user((void*) &u32wps_start, pdata->pointer, 4);
+ uintRet = copy_from_user((void*)&u32wps_start, pdata->pointer, 4);
if (u32wps_start == 0)
u32wps_start = *extra;
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name
2018-10-11 17:42 [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues Mamta Shukla
2018-10-11 17:44 ` [PATCH 1/3] staging: rtl8723bs: os_dep: Remove true and false comparison Mamta Shukla
2018-10-11 17:46 ` [PATCH 2/3] staging: rtl8723bs: os_dep: Remove space after cast Mamta Shukla
@ 2018-10-11 17:48 ` Mamta Shukla
2018-10-11 18:22 ` [Outreachy kernel] " Greg KH
2018-10-12 11:22 ` Julia Lawall
2018-10-11 18:05 ` [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues Larry Finger
2018-10-11 18:22 ` [Outreachy kernel] " Julia Lawall
4 siblings, 2 replies; 9+ messages in thread
From: Mamta Shukla @ 2018-10-11 17:48 UTC (permalink / raw)
To: outreachy-kernel; +Cc: gregkh, Larry.Finger, hadess, hdegoede
Shift * to be adjacent to pointer name to follow Linux coding style.
Issue found with checkpatch.pl
ERROR: "foo * bar" should be "foo *bar"
Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
---
drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 243394e..28bfdbd 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -528,8 +528,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
}
if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) { /* 802_1x */
- struct sta_info * psta,*pbcmc_sta;
- struct sta_priv * pstapriv = &padapter->stapriv;
+ struct sta_info *psta, *pbcmc_sta;
+ struct sta_priv *pstapriv = &padapter->stapriv;
--
1.9.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name
2018-10-11 17:48 ` [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name Mamta Shukla
@ 2018-10-11 18:22 ` Greg KH
2018-10-12 11:22 ` Julia Lawall
1 sibling, 0 replies; 9+ messages in thread
From: Greg KH @ 2018-10-11 18:22 UTC (permalink / raw)
To: Mamta Shukla; +Cc: outreachy-kernel, Larry.Finger, hadess, hdegoede
On Thu, Oct 11, 2018 at 11:18:33PM +0530, Mamta Shukla wrote:
> Shift * to be adjacent to pointer name to follow Linux coding style.
> Issue found with checkpatch.pl
> ERROR: "foo * bar" should be "foo *bar"
>
> Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
> drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
This patch is somehow corrupted. Can you fix it up and resend it,
keeping Larry's ack?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name
2018-10-11 17:48 ` [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name Mamta Shukla
2018-10-11 18:22 ` [Outreachy kernel] " Greg KH
@ 2018-10-12 11:22 ` Julia Lawall
2018-10-12 11:36 ` Mamta Shukla
1 sibling, 1 reply; 9+ messages in thread
From: Julia Lawall @ 2018-10-12 11:22 UTC (permalink / raw)
To: Mamta Shukla; +Cc: outreachy-kernel, gregkh
On Fri, 12 Oct 2018, Mamta Shukla wrote:
> Shift * to be adjacent to pointer name to follow Linux coding style.
> Issue found with checkpatch.pl
> ERROR: "foo * bar" should be "foo *bar"
>
> Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> ACKed-by: Larry Finger <Larry....@lwfinger.net>
You should put the full email address here. And it should be Acked-by.
This is a v2, so you should say that in the subject line and explain what
you changed. Did Greg already take the others in the series?
julia
> ---
> drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> index 243394e..28bfdbd 100644
> --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> @@ -528,8 +528,8 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
> }
>
> if (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) { /* 802_1x */
> - struct sta_info * psta,*pbcmc_sta;
> - struct sta_priv * pstapriv = &padapter->stapriv;
> + struct sta_info *psta, *pbcmc_sta;
> + struct sta_priv *pstapriv = &padapter->stapriv;
>
> if (check_fwstate(pmlmepriv, WIFI_STATION_STATE | WIFI_MP_STATE) == true) { /* sta mode */
> psta = rtw_get_stainfo(pstapriv, get_bssid(pmlmepriv));
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/deb7888572fb02d8cbd80fcaf9d9cef69c550d88.1539278377.git.mamtashukla555%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name
2018-10-12 11:22 ` Julia Lawall
@ 2018-10-12 11:36 ` Mamta Shukla
0 siblings, 0 replies; 9+ messages in thread
From: Mamta Shukla @ 2018-10-12 11:36 UTC (permalink / raw)
To: Julia Lawall, outreachy-kernel, gregkh
[-- Attachment #1: Type: text/plain, Size: 2715 bytes --]
On Fri, Oct 12, 2018 at 4:56 PM Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> >On Fri, 12 Oct 2018, Mamta Shukla wrote:
>
> > Shift * to be adjacent to pointer name to follow Linux coding style.
> > Issue found with checkpatch.pl
> > ERROR: "foo * bar" should be "foo *bar"
> >
> > Signed-off-by: Mamta Shukla <mamtashukla555@gmail.com>
> > ACKed-by: Larry Finger <Larry....@lwfinger.net>
>
> >You should put the full email address here. And it should be Acked-by.
> >
> >This is a v2, so you should say that in the subject line and explain what
> >you changed. Did Greg already take the others in the series?
>
> >julia
>
> This was the issue with this patch:
This patch is somehow corrupted. Can you fix it up and resend it,
keeping Larry's ack?
>thanks,
>greg k-h
Yes, Greg had already taken the others in the series.
I did this patch again to fix it.
This patch had got corrupted previously.
I will add the revision and change log.
> > ---
> > drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > index 243394e..28bfdbd 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > @@ -528,8 +528,8 @@ static int wpa_set_encryption(struct net_device
> *dev, struct ieee_param *param,
> > }
> >
> > if (padapter->securitypriv.dot11AuthAlgrthm ==
> dot11AuthAlgrthm_8021X) { /* 802_1x */
> > - struct sta_info * psta,*pbcmc_sta;
> > - struct sta_priv * pstapriv = &padapter->stapriv;
> > + struct sta_info *psta, *pbcmc_sta;
> > + struct sta_priv *pstapriv = &padapter->stapriv;
> >
> > if (check_fwstate(pmlmepriv, WIFI_STATION_STATE |
> WIFI_MP_STATE) == true) { /* sta mode */
> > psta = rtw_get_stainfo(pstapriv,
> get_bssid(pmlmepriv));
> > --
> > 1.9.1
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "outreachy-kernel" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to outreachy-kernel+unsubscribe@googlegroups.com.
> > To post to this group, send email to outreachy-kernel@googlegroups.com.
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/outreachy-kernel/deb7888572fb02d8cbd80fcaf9d9cef69c550d88.1539278377.git.mamtashukla555%40gmail.com
> .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
--
Mamta Shukla
Pune Institute of Computer Technology
Pune
m: 9158516957
e : mamtashukla555@gmail.com
[-- Attachment #2: Type: text/html, Size: 4654 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues
2018-10-11 17:42 [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues Mamta Shukla
` (2 preceding siblings ...)
2018-10-11 17:48 ` [PATCH 3/3] staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name Mamta Shukla
@ 2018-10-11 18:05 ` Larry Finger
2018-10-11 18:22 ` [Outreachy kernel] " Julia Lawall
4 siblings, 0 replies; 9+ messages in thread
From: Larry Finger @ 2018-10-11 18:05 UTC (permalink / raw)
To: Mamta Shukla, outreachy-kernel; +Cc: gregkh, hadess, hdegoede
On 10/11/18 12:42 PM, Mamta Shukla wrote:
> This patch series fixes checkpatch issues such as:
> -Remove true and false comparison
> -Remove space after cast
> -Shift * to be adjacent to pointer name to conform kernel coding style.
>
>
> Mamta Shukla (3):
> staging: rtl8723bs: os_dep: Remove true and false comparison
> staging: rtl8723bs: os_dep: Remove space after cast
> staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name
>
> drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 30 +++++++++++++-------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
ACKed-by: Larry Finger <Larry.Finger@lwfinger.net>
That is for all 3.
Larry
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Outreachy kernel] [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues
2018-10-11 17:42 [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues Mamta Shukla
` (3 preceding siblings ...)
2018-10-11 18:05 ` [PATCH 0/3] staging: rtl8723bs: os_dep: Fix coding style issues Larry Finger
@ 2018-10-11 18:22 ` Julia Lawall
4 siblings, 0 replies; 9+ messages in thread
From: Julia Lawall @ 2018-10-11 18:22 UTC (permalink / raw)
To: Mamta Shukla; +Cc: outreachy-kernel, gregkh, Larry.Finger, hadess, hdegoede
On Thu, 11 Oct 2018, Mamta Shukla wrote:
> This patch series fixes checkpatch issues such as:
> -Remove true and false comparison
> -Remove space after cast
> -Shift * to be adjacent to pointer name to conform kernel coding style.
Good jobs in cleaning these up, since the original code doesn't look very
nice at all :)
julia
>
>
> Mamta Shukla (3):
> staging: rtl8723bs: os_dep: Remove true and false comparison
> staging: rtl8723bs: os_dep: Remove space after cast
> staging: rtl8723bs: os_dep: Shift * to be adjacent to pointer name
>
> drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 30 +++++++++++++-------------
> 1 file changed, 15 insertions(+), 15 deletions(-)
>
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/cover.1539278377.git.mamtashukla555%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 9+ messages in thread