staging: rtl8192e: fix camelcase style warning
PATCH 1/1 staging: rtl8192e: fix camelcase style warning
Remove CamelCase words. Warning found using checkpatch.pl
--- drivers/staging/rtl8192e/dot11d.c | 84 +++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-)
drivers/staging/rtl8192e/dot11d.c +42 -42
@@ -15,11 +15,11 @@#include "dot11d.h" struct channel_list { -u8 Channel[32 ]; -u8 Len; +u8 channel[32 ]; +u8 len; }; -static struct channel_list ChannelPlan[] = { +static struct channel_list channelPlan[] = { {{1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,36 ,40 ,44 ,48 ,52 ,56 ,60 ,64 ,149 ,153 ,157 ,161 ,165 },24 }, {{1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 },11 },
@@ -48,29 +48,29 @@ void dot11d_init(struct rtllib_device *ieee) pDot11dInfo->bEnabled = false; - pDot11dInfo->State =DOT11D_STATE_NONE ; - pDot11dInfo->CountryIeLen =0 ; + pDot11dInfo->state =DOT11D_STATE_NONE ; + pDot11dInfo->countryIelen =0 ;memset (pDot11dInfo->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (pDot11dInfo->MaxTxPwrDbmList,0xFF ,MAX_CHANNEL_NUMBER +1 ); +memset (pDot11dInfo->maxTxPwrDbmList,0xFF ,MAX_CHANNEL_NUMBER +1 );RESET_CIE_WATCHDOG (ieee); }EXPORT_SYMBOL (dot11d_init); -void Dot11d_Channelmap (u8 channel_plan,struct rtllib_device *ieee) +void dot11d_channelmap (u8 channel_plan,struct rtllib_device *ieee) {int i, max_chan =14 , min_chan =1 ; ieee->bGlobalDomain = false; -if (ChannelPlan[channel_plan].Len !=0 ) { +if (channelPlan[channel_plan].len !=0 ) {memset (GET_DOT11D_INFO (ieee)->channel_map,0 ,sizeof (GET_DOT11D_INFO (ieee)->channel_map)); -for (i =0 ; i < ChannelPlan[channel_plan].Len; i++) { -if (ChannelPlan[channel_plan].Channel[i] < min_chan || - ChannelPlan[channel_plan].Channel[i] > max_chan) +for (i =0 ; i < channelPlan[channel_plan].len; i++) { +if (channelPlan[channel_plan].channel[i] < min_chan || + channelPlan[channel_plan].channel[i] > max_chan)break ; -GET_DOT11D_INFO (ieee)->channel_map[ChannelPlan - [channel_plan].Channel[i]] =1 ; +GET_DOT11D_INFO (ieee)->channel_map[channelPlan + [channel_plan].channel[i]] =1 ; } }
@@ -79,73 +79,73 @@ void Dot11d_Channelmap(u8 channel_plan, struct rtllib_device *ieee) ieee->bGlobalDomain = true;for (i =12 ; i <=14 ; i++)GET_DOT11D_INFO (ieee)->channel_map[i] =2 ; - ieee->IbssStartChnl =10 ; + ieee->ibssStartChnl =10 ; ieee->ibss_maxjoin_chal =11 ;break ;case COUNTRY_CODE_WORLD_WIDE_13 :for (i =12 ; i <=13 ; i++)GET_DOT11D_INFO (ieee)->channel_map[i] =2 ; - ieee->IbssStartChnl =10 ; + ieee->ibssStartChnl =10 ; ieee->ibss_maxjoin_chal =11 ;break ;default : - ieee->IbssStartChnl =1 ; + ieee->ibssStartChnl =1 ; ieee->ibss_maxjoin_chal =14 ;break ; } } -EXPORT_SYMBOL (Dot11d_Channelmap); +EXPORT_SYMBOL (dot11d_channelmap); -void Dot11d_Reset (struct rtllib_device *ieee) +void dot11d_Reset (struct rtllib_device *ieee) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (ieee);u32 i;memset (pDot11dInfo->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (pDot11dInfo->MaxTxPwrDbmList,0xFF ,MAX_CHANNEL_NUMBER +1 ); +memset (pDot11dInfo->maxTxPwrDbmList,0xFF ,MAX_CHANNEL_NUMBER +1 );for (i =1 ; i <=11 ; i++) (pDot11dInfo->channel_map)[i] =1 ;for (i =12 ; i <=14 ; i++) (pDot11dInfo->channel_map)[i] =2 ; - pDot11dInfo->State =DOT11D_STATE_NONE ; - pDot11dInfo->CountryIeLen =0 ; + pDot11dInfo->state =DOT11D_STATE_NONE ; + pDot11dInfo->countryIelen =0 ;RESET_CIE_WATCHDOG (ieee); } -void Dot11d_UpdateCountryIe (struct rtllib_device *dev,u8 *pTaddr, -u16 CoutryIeLen,u8 *pCoutryIe) +void dot11d_UpdateCountryIe (struct rtllib_device *dev,u8 *pTaddr, +u16 coutryIeLen,u8 *pCoutryIe) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev); -u8 i, j, NumTriples, MaxChnlNum; +u8 i, j, numTriples, maxChnlNum;struct chnl_txpow_triple *pTriple;memset (pDot11dInfo->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (pDot11dInfo->MaxTxPwrDbmList,0xFF ,MAX_CHANNEL_NUMBER +1 ); - MaxChnlNum =0 ; - NumTriples = (CoutryIeLen -3 ) /3 ; +memset (pDot11dInfo->maxTxPwrDbmList,0xFF ,MAX_CHANNEL_NUMBER +1 ); + maxChnlNum =0 ; + numTriples = (coutryIeLen -3 ) /3 ; pTriple = (struct chnl_txpow_triple *)(pCoutryIe +3 ); -for (i =0 ; i < NumTriples; i++) { -if (MaxChnlNum >= pTriple->FirstChnl) { +for (i =0 ; i < numTriples; i++) { +if (maxChnlNum >= pTriple->firstChnl) {netdev_info (dev->dev,"%s: Invalid country IE, skip it......1\n" , __func__);return ; } -if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl + - pTriple->NumChnls)) { +if (MAX_CHANNEL_NUMBER < (pTriple->firstChnl + + pTriple->numChnls)) {netdev_info (dev->dev,"%s: Invalid country IE, skip it......2\n" , __func__);return ; } -for (j =0 ; j < pTriple->NumChnls; j++) { - pDot11dInfo->channel_map[pTriple->FirstChnl + j] =1 ; - pDot11dInfo->MaxTxPwrDbmList[pTriple->FirstChnl + j] = - pTriple->MaxTxPowerInDbm; - MaxChnlNum = pTriple->FirstChnl + j; +for (j =0 ; j < pTriple->numChnls; j++) { + pDot11dInfo->channel_map[pTriple->firstChnl + j] =1 ; + pDot11dInfo->maxTxPwrDbmList[pTriple->firstChnl + j] = + pTriple->maxTxPowerInDbm; + maxChnlNum = pTriple->firstChnl + j; } pTriple = (struct chnl_txpow_triple *)((u8 *)pTriple +3 );
@@ -153,21 +153,21 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,UPDATE_CIE_SRC (dev, pTaddr); - pDot11dInfo->CountryIeLen = CoutryIeLen; -memcpy (pDot11dInfo->CountryIeBuf, pCoutryIe, CoutryIeLen); - pDot11dInfo->State =DOT11D_STATE_LEARNED ; + pDot11dInfo->countryIelen = coutryIeLen; +memcpy (pDot11dInfo->countryIeBuf, pCoutryIe, coutryIeLen); + pDot11dInfo->state =DOT11D_STATE_LEARNED ; }void DOT11D_ScanComplete (struct rtllib_device *dev) {struct rt_dot11d_info *pDot11dInfo =GET_DOT11D_INFO (dev); -switch (pDot11dInfo->State) { +switch (pDot11dInfo->state) {case DOT11D_STATE_LEARNED : - pDot11dInfo->State =DOT11D_STATE_DONE ; + pDot11dInfo->state =DOT11D_STATE_DONE ;break ;case DOT11D_STATE_DONE : -Dot11d_Reset (dev); +dot11d_Reset (dev);break ;case DOT11D_STATE_NONE :break ;
Signature · 1 line
2.19.1
kbuild test robot
build botThank you for the patch! Yet something to improve:
Hi Sushil,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
[also build test ERROR on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Sushil-Verma/staging-rtl8192e-fix-camelcase-style-warning/20181228-202508
config: x86_64-randconfig-x002-201851 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 All errors (new ones prefixed by >>):
drivers/staging/rtl8192e/dot11d.c: In function 'dot11d_init':
>> drivers/staging/rtl8192e/dot11d.c:51:15: error: 'struct rt_dot11d_info' has no member named 'state'; did you mean 'State'?
pDot11dInfo->state = DOT11D_STATE_NONE;
^~~~~
State
>> drivers/staging/rtl8192e/dot11d.c:52:15: error: 'struct rt_dot11d_info' has no member named 'countryIelen'; did you mean 'CountryIeLen'?
pDot11dInfo->countryIelen = 0;
^~~~~~~~~~~~
CountryIeLen
>> drivers/staging/rtl8192e/dot11d.c:54:22: error: 'struct rt_dot11d_info' has no member named 'maxTxPwrDbmList'; did you mean 'MaxTxPwrDbmList'?
memset(pDot11dInfo->maxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER + 1);
^~~~~~~~~~~~~~~
MaxTxPwrDbmList
drivers/staging/rtl8192e/dot11d.c: In function 'dot11d_channelmap':
>> drivers/staging/rtl8192e/dot11d.c:82:9: error: 'struct rtllib_device' has no member named 'ibssStartChnl'; did you mean 'IbssStartChnl'?
ieee->ibssStartChnl = 10;
^~~~~~~~~~~~~
IbssStartChnl
drivers/staging/rtl8192e/dot11d.c:89:9: error: 'struct rtllib_device' has no member named 'ibssStartChnl'; did you mean 'IbssStartChnl'?
ieee->ibssStartChnl = 10;
^~~~~~~~~~~~~
IbssStartChnl
drivers/staging/rtl8192e/dot11d.c:94:9: error: 'struct rtllib_device' has no member named 'ibssStartChnl'; did you mean 'IbssStartChnl'?
ieee->ibssStartChnl = 1;
^~~~~~~~~~~~~
IbssStartChnl
drivers/staging/rtl8192e/dot11d.c: In function 'dot11d_Reset':
drivers/staging/rtl8192e/dot11d.c:107:22: error: 'struct rt_dot11d_info' has no member named 'maxTxPwrDbmList'; did you mean 'MaxTxPwrDbmList'?
memset(pDot11dInfo->maxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER + 1);
^~~~~~~~~~~~~~~
MaxTxPwrDbmList
drivers/staging/rtl8192e/dot11d.c:112:15: error: 'struct rt_dot11d_info' has no member named 'state'; did you mean 'State'?
pDot11dInfo->state = DOT11D_STATE_NONE;
^~~~~
State
drivers/staging/rtl8192e/dot11d.c:113:15: error: 'struct rt_dot11d_info' has no member named 'countryIelen'; did you mean 'CountryIeLen'?
pDot11dInfo->countryIelen = 0;
^~~~~~~~~~~~
CountryIeLen
drivers/staging/rtl8192e/dot11d.c: In function 'dot11d_UpdateCountryIe':
drivers/staging/rtl8192e/dot11d.c:125:22: error: 'struct rt_dot11d_info' has no member named 'maxTxPwrDbmList'; did you mean 'MaxTxPwrDbmList'?
memset(pDot11dInfo->maxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER + 1);
^~~~~~~~~~~~~~~
MaxTxPwrDbmList
>> drivers/staging/rtl8192e/dot11d.c:130:30: error: 'struct chnl_txpow_triple' has no member named 'firstChnl'; did you mean 'FirstChnl'?
if (maxChnlNum >= pTriple->firstChnl) {
^~~~~~~~~
FirstChnl
drivers/staging/rtl8192e/dot11d.c:136:38: error: 'struct chnl_txpow_triple' has no member named 'firstChnl'; did you mean 'FirstChnl'?
if (MAX_CHANNEL_NUMBER < (pTriple->firstChnl +
^~~~~~~~~
FirstChnl
>> drivers/staging/rtl8192e/dot11d.c:137:16: error: 'struct chnl_txpow_triple' has no member named 'numChnls'; did you mean 'NumChnls'?
pTriple->numChnls)) {
^~~~~~~~
NumChnls
drivers/staging/rtl8192e/dot11d.c:144:28: error: 'struct chnl_txpow_triple' has no member named 'numChnls'; did you mean 'NumChnls'?
for (j = 0; j < pTriple->numChnls; j++) {
^~~~~~~~
NumChnls
drivers/staging/rtl8192e/dot11d.c:145:38: error: 'struct chnl_txpow_triple' has no member named 'firstChnl'; did you mean 'FirstChnl'?
pDot11dInfo->channel_map[pTriple->firstChnl + j] = 1;
^~~~~~~~~
FirstChnl
drivers/staging/rtl8192e/dot11d.c:146:17: error: 'struct rt_dot11d_info' has no member named 'maxTxPwrDbmList'; did you mean 'MaxTxPwrDbmList'?
pDot11dInfo->maxTxPwrDbmList[pTriple->firstChnl + j] =
^~~~~~~~~~~~~~~
MaxTxPwrDbmList
drivers/staging/rtl8192e/dot11d.c:146:42: error: 'struct chnl_txpow_triple' has no member named 'firstChnl'; did you mean 'FirstChnl'?
pDot11dInfo->maxTxPwrDbmList[pTriple->firstChnl + j] =
^~~~~~~~~
FirstChnl
>> drivers/staging/rtl8192e/dot11d.c:147:17: error: 'struct chnl_txpow_triple' has no member named 'maxTxPowerInDbm'; did you mean 'MaxTxPowerInDbm'?
pTriple->maxTxPowerInDbm;
^~~~~~~~~~~~~~~
MaxTxPowerInDbm
drivers/staging/rtl8192e/dot11d.c:148:26: error: 'struct chnl_txpow_triple' has no member named 'firstChnl'; did you mean 'FirstChnl'?
maxChnlNum = pTriple->firstChnl + j;
^~~~~~~~~
FirstChnl
drivers/staging/rtl8192e/dot11d.c:156:15: error: 'struct rt_dot11d_info' has no member named 'countryIelen'; did you mean 'CountryIeLen'?
pDot11dInfo->countryIelen = coutryIeLen;
^~~~~~~~~~~~
CountryIeLen
>> drivers/staging/rtl8192e/dot11d.c:157:22: error: 'struct rt_dot11d_info' has no member named 'countryIeBuf'; did you mean 'CountryIeBuf'?
memcpy(pDot11dInfo->countryIeBuf, pCoutryIe, coutryIeLen);
^~~~~~~~~~~~
CountryIeBuf
drivers/staging/rtl8192e/dot11d.c:158:15: error: 'struct rt_dot11d_info' has no member named 'state'; did you mean 'State'?
pDot11dInfo->state = DOT11D_STATE_LEARNED;
^~~~~
State
drivers/staging/rtl8192e/dot11d.c: In function 'DOT11D_ScanComplete':
drivers/staging/rtl8192e/dot11d.c:165:23: error: 'struct rt_dot11d_info' has no member named 'state'; did you mean 'State'?
switch (pDot11dInfo->state) {
^~~~~
State
drivers/staging/rtl8192e/dot11d.c:167:16: error: 'struct rt_dot11d_info' has no member named 'state'; did you mean 'State'?
pDot11dInfo->state = DOT11D_STATE_DONE;
^~~~~
Statevim +51 drivers/staging/rtl8192e/dot11d.c
44
45 void dot11d_init(struct rtllib_device *ieee)
46 {
47 struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
48
49 pDot11dInfo->bEnabled = false;
50
> 51 pDot11dInfo->state = DOT11D_STATE_NONE;
> 52 pDot11dInfo->countryIelen = 0;
53 memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
> 54 memset(pDot11dInfo->maxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER + 1);
55 RESET_CIE_WATCHDOG(ieee);
56 }
57 EXPORT_SYMBOL(dot11d_init);
58
59 void dot11d_channelmap(u8 channel_plan, struct rtllib_device *ieee)
60 {
61 int i, max_chan = 14, min_chan = 1;
62
63 ieee->bGlobalDomain = false;
64
65 if (channelPlan[channel_plan].len != 0) {
66 memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
67 sizeof(GET_DOT11D_INFO(ieee)->channel_map));
68 for (i = 0; i < channelPlan[channel_plan].len; i++) {
69 if (channelPlan[channel_plan].channel[i] < min_chan ||
70 channelPlan[channel_plan].channel[i] > max_chan)
71 break;
72 GET_DOT11D_INFO(ieee)->channel_map[channelPlan
73 [channel_plan].channel[i]] = 1;
74 }
75 }
76
77 switch (channel_plan) {
78 case COUNTRY_CODE_GLOBAL_DOMAIN:
79 ieee->bGlobalDomain = true;
80 for (i = 12; i <= 14; i++)
81 GET_DOT11D_INFO(ieee)->channel_map[i] = 2;
> 82 ieee->ibssStartChnl = 10;
83 ieee->ibss_maxjoin_chal = 11;
84 break;
85
86 case COUNTRY_CODE_WORLD_WIDE_13:
87 for (i = 12; i <= 13; i++)
88 GET_DOT11D_INFO(ieee)->channel_map[i] = 2;
89 ieee->ibssStartChnl = 10;
90 ieee->ibss_maxjoin_chal = 11;
91 break;
92
93 default:
94 ieee->ibssStartChnl = 1;
95 ieee->ibss_maxjoin_chal = 14;
96 break;
97 }
98 }
99 EXPORT_SYMBOL(dot11d_channelmap);
100
101 void dot11d_Reset(struct rtllib_device *ieee)
102 {
103 struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee);
104 u32 i;
105
106 memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
107 memset(pDot11dInfo->maxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER + 1);
108 for (i = 1; i <= 11; i++)
109 (pDot11dInfo->channel_map)[i] = 1;
110 for (i = 12; i <= 14; i++)
111 (pDot11dInfo->channel_map)[i] = 2;
112 pDot11dInfo->state = DOT11D_STATE_NONE;
> 113 pDot11dInfo->countryIelen = 0;
114 RESET_CIE_WATCHDOG(ieee);
115 }
116
117 void dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
118 u16 coutryIeLen, u8 *pCoutryIe)
119 {
120 struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev);
121 u8 i, j, numTriples, maxChnlNum;
122 struct chnl_txpow_triple *pTriple;
123
124 memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
125 memset(pDot11dInfo->maxTxPwrDbmList, 0xFF, MAX_CHANNEL_NUMBER + 1);
126 maxChnlNum = 0;
127 numTriples = (coutryIeLen - 3) / 3;
128 pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
129 for (i = 0; i < numTriples; i++) {
> 130 if (maxChnlNum >= pTriple->firstChnl) {
131 netdev_info(dev->dev,
132 "%s: Invalid country IE, skip it......1\n",
133 __func__);
134 return;
135 }
136 if (MAX_CHANNEL_NUMBER < (pTriple->firstChnl +
> 137 pTriple->numChnls)) {
138 netdev_info(dev->dev,
139 "%s: Invalid country IE, skip it......2\n",
140 __func__);
141 return;
142 }
143
144 for (j = 0; j < pTriple->numChnls; j++) {
145 pDot11dInfo->channel_map[pTriple->firstChnl + j] = 1;
> 146 pDot11dInfo->maxTxPwrDbmList[pTriple->firstChnl + j] =
> 147 pTriple->maxTxPowerInDbm;
> 148 maxChnlNum = pTriple->firstChnl + j;
149 }
150
151 pTriple = (struct chnl_txpow_triple *)((u8 *)pTriple + 3);
152 }
153
154 UPDATE_CIE_SRC(dev, pTaddr);
155
156 pDot11dInfo->countryIelen = coutryIeLen;
> 157 memcpy(pDot11dInfo->countryIeBuf, pCoutryIe, coutryIeLen); 158 pDot11dInfo->state = DOT11D_STATE_LEARNED;
159 }
160
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Greg KH
maintainerQuoted 6 lines · Sushil Verma
Remove CamelCase words. Warning found using checkpatch.pl
Signed-off-by Sushil Verma <[email protected]>--- drivers/staging/rtl8192e/dot11d.c | 84 +++++++++++++++---------------- 1 file changed, 42 insertions(+), 42 deletions(-)
Please always use scripts/get_maintainer.pl to determine what people and lists to send a patch to, as well as always test-build your changes before sending them out :(
thanks,
greg k-h