Re: [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer

From: kernel test robot
Date: Mon Mar 13 2023 - 05:45:24 EST


Hi Dongliang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wireless-next/main]
[also build test WARNING on wireless/main linus/master v6.3-rc2 next-20230310]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Dongliang-Mu/wifi-ray_cs-add-sanity-check-on-local-sram-rmem-amem/20230313-150341
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
patch link: https://lore.kernel.org/r/20230313065823.256731-1-dzm91%40hust.edu.cn
patch subject: [PATCH 1/2] wifi: ray_cs: remove one redundant del_timer
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20230313/202303131721.wELY9b9M-lkp@xxxxxxxxx/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/8b405d9c164f51ae0d9a2b1e0b0460b09e71e5c9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dongliang-Mu/wifi-ray_cs-add-sanity-check-on-local-sram-rmem-amem/20230313-150341
git checkout 8b405d9c164f51ae0d9a2b1e0b0460b09e71e5c9
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/net/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@xxxxxxxxx>
| Link: https://lore.kernel.org/oe-kbuild-all/202303131721.wELY9b9M-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

drivers/net/wireless/ray_cs.c: In function 'ray_detach':
>> drivers/net/wireless/ray_cs.c:325:20: warning: unused variable 'local' [-Wunused-variable]
325 | ray_dev_t *local;
| ^~~~~
In file included from include/linux/string.h:254,
from include/linux/bitmap.h:11,
from include/linux/cpumask.h:12,
from arch/x86/include/asm/paravirt.h:17,
from arch/x86/include/asm/cpuid.h:62,
from arch/x86/include/asm/processor.h:19,
from arch/x86/include/asm/timex.h:5,
from include/linux/timex.h:67,
from include/linux/time32.h:13,
from include/linux/time.h:60,
from include/linux/stat.h:19,
from include/linux/module.h:13,
from drivers/net/wireless/ray_cs.c:20:
In function 'strncpy',
inlined from 'init_startup_params' at drivers/net/wireless/ray_cs.c:625:3:
include/linux/fortify-string.h:68:33: warning: '__builtin_strncpy' specified bound 32 equals destination size [-Wstringop-truncation]
68 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/fortify-string.h:151:16: note: in expansion of macro '__underlying_strncpy'
151 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~


vim +/local +325 drivers/net/wireless/ray_cs.c

141fa61f10c419 John Daiker 2009-03-10 321
fba395eee7d3f3 Dominik Brodowski 2006-03-31 322 static void ray_detach(struct pcmcia_device *link)
^1da177e4c3f41 Linus Torvalds 2005-04-16 323 {
cc3b4866bee996 Dominik Brodowski 2005-11-14 324 struct net_device *dev;
cc3b4866bee996 Dominik Brodowski 2005-11-14 @325 ray_dev_t *local;
^1da177e4c3f41 Linus Torvalds 2005-04-16 326
624dd66957e53e Dominik Brodowski 2009-10-24 327 dev_dbg(&link->dev, "ray_detach\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 328
fd238232cd0ff4 Dominik Brodowski 2006-03-05 329 this_device = NULL;
cc3b4866bee996 Dominik Brodowski 2005-11-14 330 dev = link->priv;
cc3b4866bee996 Dominik Brodowski 2005-11-14 331
^1da177e4c3f41 Linus Torvalds 2005-04-16 332 ray_release(link);
^1da177e4c3f41 Linus Torvalds 2005-04-16 333
^1da177e4c3f41 Linus Torvalds 2005-04-16 334 if (link->priv) {
141fa61f10c419 John Daiker 2009-03-10 335 unregister_netdev(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 336 free_netdev(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 337 }
624dd66957e53e Dominik Brodowski 2009-10-24 338 dev_dbg(&link->dev, "ray_cs ray_detach ending\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 339 } /* ray_detach */
141fa61f10c419 John Daiker 2009-03-10 340

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests