Hi Leon,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url:
https://github.com/0day-ci/linux/commits/Leon-Krieg/staging-ks7010-Fix-co...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
ff63261978ee1f00758f447d63276a6f180a81dc
config: riscv-randconfig-r042-20210816 (attached as .config)
compiler: clang version 14.0.0 (
https://github.com/llvm/llvm-project
44d0a99a12ec7ead4d2f5ef649ba05b40f6d463d)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
#
https://github.com/0day-ci/linux/commit/be523ea1038288a8b2c8e5cf10bb2e6a0...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Leon-Krieg/staging-ks7010-Fix-coding-style-problems-Version-2/20210817-020702
git checkout be523ea1038288a8b2c8e5cf10bb2e6a02830a0a
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=riscv
SHELL=/bin/bash drivers/staging/ks7010/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/staging/ks7010/ks_wlan_net.c:191:3: error: fallthrough
annotation is outside switch statement
fallthrough;
^
include/linux/compiler_attributes.h:210:56: note: expanded from macro
'fallthrough'
# define fallthrough __attribute__((__fallthrough__))
^
1 error generated.
vim +191 drivers/staging/ks7010/ks_wlan_net.c
171
172 static int ks_wlan_set_freq(struct net_device *dev,
173 struct iw_request_info *info,
174 union iwreq_data *fwrq, char *extra)
175 {
176 struct ks_wlan_private *priv = netdev_priv(dev);
177 int channel;
178
179 if (priv->sleep_mode == SLP_SLEEP)
180 return -EPERM;
181
182 /* for SLEEP MODE */
183 /* If setting by frequency, convert to a channel */
184 if (fwrq->freq.e == 1 &&
185 fwrq->freq.m >= 241200000 && fwrq->freq.m <= 248700000) {
186 int f = fwrq->freq.m / 100000;
187 int c = 0;
188
189 while ((c < 14) && (f != frequency_list[c]))
190 c++;
191 fallthrough;
192 fwrq->freq.e = 0;
193 fwrq->freq.m = c + 1;
194 }
195 /* Setting by channel number */
196 if (fwrq->freq.m > 1000 || fwrq->freq.e > 0)
197 return -EOPNOTSUPP;
198
199 channel = fwrq->freq.m;
200 /* We should do a better check than that,
201 * based on the card capability !!!
202 */
203 if (channel < 1 || channel > 14) {
204 netdev_dbg(dev, "%s: New channel value of %d is invalid!\n",
205 dev->name, fwrq->freq.m);
206 return -EINVAL;
207 }
208
209 /* Yes ! We can set it !!! */
210 priv->reg.channel = (u8)(channel);
211 priv->need_commit |= SME_MODE_SET;
212
213 return -EINPROGRESS; /* Call commit handler */
214 }
215
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org