* [PATCH] staging: rtl8188eu: core: fix coding style issues
@ 2020-07-14 21:25 Arpitha
2020-07-15 14:01 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Arpitha @ 2020-07-14 21:25 UTC (permalink / raw)
To: Larry.Finger, gregkh, puranjay12, yepeilin.cs
Cc: Arpitha, devel, linux-kernel
Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name'
in a string in rtw_ioctl_set.c
Signed-off-by: Arpitha <98.arpi@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index 9cc77ab4fd6b..fa88e8b2852d 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -44,12 +44,12 @@ u8 rtw_do_join(struct adapter *padapter)
if (!pmlmepriv->LinkDetectInfo.bBusyTraffic ||
pmlmepriv->to_roaming > 0) {
- RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_do_join(): site survey if scanned_queue is empty\n."));
+ RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("%s: site survey if scanned_queue is empty\n.", __func__));
/* submit site_survey_cmd */
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
if (ret != _SUCCESS) {
pmlmepriv->to_join = false;
- RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_do_join(): site survey return error\n."));
+ RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("%s: site survey return error\n.", __func__));
}
} else {
pmlmepriv->to_join = false;
@@ -313,7 +313,7 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *padapter,
enum ndis_802_11_network_infra *pold_state = &cur_network->network.InfrastructureMode;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_notice_,
- ("+rtw_set_802_11_infrastructure_mode: old =%d new =%d fw_state = 0x%08x\n",
+ ("+%s: old =%d new =%d fw_state = 0x%08x\n", __func__,
*pold_state, networktype, get_fwstate(pmlmepriv)));
if (*pold_state != networktype) {
@@ -496,7 +496,7 @@ u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep)
break;
}
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
- ("rtw_set_802_11_add_wep:before memcpy, wep->KeyLength = 0x%x wep->KeyIndex = 0x%x keyid =%x\n",
+ ("%s:before memcpy, wep->KeyLength = 0x%x wep->KeyIndex = 0x%x keyid =%x\n", __func__,
wep->KeyLength, wep->KeyIndex, keyid));
memcpy(&psecuritypriv->dot11DefKey[keyid].skey[0],
@@ -507,7 +507,7 @@ u8 rtw_set_802_11_add_wep(struct adapter *padapter, struct ndis_802_11_wep *wep)
psecuritypriv->dot11PrivacyKeyIndex = keyid;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
- ("rtw_set_802_11_add_wep:security key material : %x %x %x %x %x %x %x %x %x %x %x %x %x\n",
+ ("%s:security key material : %x %x %x %x %x %x %x %x %x %x %x %x %x\n", __func__,
psecuritypriv->dot11DefKey[keyid].skey[0],
psecuritypriv->dot11DefKey[keyid].skey[1],
psecuritypriv->dot11DefKey[keyid].skey[2],
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging: rtl8188eu: core: fix coding style issues
2020-07-14 21:25 [PATCH] staging: rtl8188eu: core: fix coding style issues Arpitha
@ 2020-07-15 14:01 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2020-07-15 14:01 UTC (permalink / raw)
To: Arpitha; +Cc: Larry.Finger, puranjay12, yepeilin.cs, devel, linux-kernel
On Wed, Jul 15, 2020 at 02:55:59AM +0530, Arpitha wrote:
> Fixing WARNING: Prefer using '"%s...", __func__' to using 'function_name'
> in a string in rtw_ioctl_set.c
>
> Signed-off-by: Arpitha <98.arpi@gmail.com>
We need a "full" name for kernel patches, what you use to sign
documents.
Same for the From: line.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] staging:rtl8188eu:core Fix coding style Issues
@ 2017-08-24 9:00 Janani Sankara Babu
0 siblings, 0 replies; 5+ messages in thread
From: Janani Sankara Babu @ 2017-08-24 9:00 UTC (permalink / raw)
To: gregkh; +Cc: insafonov, devel, linux-kernel, Janani Sankara Babu
This patch solves the following warning shown by the checkpatch script
WARNING: Comparisons should place the constants on the right side of
the test
Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index d8d88b5..767928a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -56,7 +56,7 @@ u8 rtw_do_join(struct adapter *padapter)
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_do_join(): site survey if scanned_queue is empty\n."));
/* submit site_survey_cmd */
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
- if (_SUCCESS != ret) {
+ if (ret != _SUCCESS) {
pmlmepriv->to_join = false;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_do_join(): site survey return error\n."));
}
@@ -110,7 +110,7 @@ u8 rtw_do_join(struct adapter *padapter)
if (!pmlmepriv->LinkDetectInfo.bBusyTraffic ||
pmlmepriv->to_roaming > 0) {
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
- if (_SUCCESS != ret) {
+ if (ret != _SUCCESS) {
pmlmepriv->to_join = false;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("do_join(): site survey return error\n."));
}
@@ -621,7 +621,7 @@ int rtw_set_country(struct adapter *adapter, const char *country_code)
DBG_88E("%s country_code:%s\n", __func__, country_code);
for (i = 0; i < ARRAY_SIZE(channel_table); i++) {
- if (0 == strcmp(channel_table[i].name, country_code)) {
+ if (strcmp(channel_table[i].name, country_code) == 0) {
channel_plan = channel_table[i].channel_plan;
break;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] staging:rtl8188eu:core Fix coding style Issues
2017-08-23 9:15 Janani S
@ 2017-08-23 23:20 ` Greg KH
0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2017-08-23 23:20 UTC (permalink / raw)
To: Janani S; +Cc: devel, insafonov, linux-kernel
On Wed, Aug 23, 2017 at 02:45:51PM +0530, Janani S wrote:
> This patch solves the following warning shown by the checkpatch script
> WARNING: Comparisons should place the constants on the right side of
> the test
>
> Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
Your "From:" line does not match this :(
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] staging:rtl8188eu:core Fix coding style Issues
@ 2017-08-23 9:15 Janani S
2017-08-23 23:20 ` Greg KH
0 siblings, 1 reply; 5+ messages in thread
From: Janani S @ 2017-08-23 9:15 UTC (permalink / raw)
To: gregkh; +Cc: insafonov, devel, linux-kernel, Janani S
This patch solves the following warning shown by the checkpatch script
WARNING: Comparisons should place the constants on the right side of
the test
Signed-off-by: Janani Sankara Babu <jananis37@gmail.com>
---
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
index d8d88b5..767928a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
@@ -56,7 +56,7 @@ u8 rtw_do_join(struct adapter *padapter)
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("rtw_do_join(): site survey if scanned_queue is empty\n."));
/* submit site_survey_cmd */
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
- if (_SUCCESS != ret) {
+ if (ret != _SUCCESS) {
pmlmepriv->to_join = false;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_do_join(): site survey return error\n."));
}
@@ -110,7 +110,7 @@ u8 rtw_do_join(struct adapter *padapter)
if (!pmlmepriv->LinkDetectInfo.bBusyTraffic ||
pmlmepriv->to_roaming > 0) {
ret = rtw_sitesurvey_cmd(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
- if (_SUCCESS != ret) {
+ if (ret != _SUCCESS) {
pmlmepriv->to_join = false;
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("do_join(): site survey return error\n."));
}
@@ -621,7 +621,7 @@ int rtw_set_country(struct adapter *adapter, const char *country_code)
DBG_88E("%s country_code:%s\n", __func__, country_code);
for (i = 0; i < ARRAY_SIZE(channel_table); i++) {
- if (0 == strcmp(channel_table[i].name, country_code)) {
+ if (strcmp(channel_table[i].name, country_code) == 0) {
channel_plan = channel_table[i].channel_plan;
break;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-07-15 14:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 21:25 [PATCH] staging: rtl8188eu: core: fix coding style issues Arpitha
2020-07-15 14:01 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2017-08-24 9:00 [PATCH] staging:rtl8188eu:core Fix coding style Issues Janani Sankara Babu
2017-08-23 9:15 Janani S
2017-08-23 23:20 ` Greg KH
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).