* [staging:staging-testing 36/53] drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used
@ 2024-08-23 12:35 kernel test robot
2024-08-23 17:16 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2024-08-23 12:35 UTC (permalink / raw)
To: Simon Horman; +Cc: llvm, oe-kbuild-all, devel, Greg Kroah-Hartman
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head: 5315266844ea3b0b8b6be9842d5901e439fa838a
commit: 5f1a6826ea4900f8540d5eeb29f97796860f2d08 [36/53] staging: rtl8192e: remove set but otherwise unused local variable iv32
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/config)
compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408232049.UJef268y-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used [-Wunused-but-set-variable]
640 | u16 iv16 = tkey->tx_iv16;
| ^
1 warning generated.
vim +/iv16 +640 drivers/staging/rtl8192e/rtllib_crypt_tkip.c
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 626
94a799425eee82 drivers/staging/rtl8192e/rtllib_crypt_tkip.c Larry Finger 2011-08-23 627 static int rtllib_tkip_get_key(void *key, int len, u8 *seq, void *priv)
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 628 {
94a799425eee82 drivers/staging/rtl8192e/rtllib_crypt_tkip.c Larry Finger 2011-08-23 629 struct rtllib_tkip_data *tkey = priv;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 630
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 631 if (len < TKIP_KEY_LEN)
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 632 return -1;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 633
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 634 if (!tkey->key_set)
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 635 return 0;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 636 memcpy(key, tkey->key, TKIP_KEY_LEN);
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 637
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 638 if (seq) {
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 639 /* Return the sequence number of the last transmitted frame. */
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 @640 u16 iv16 = tkey->tx_iv16;
3a6b70c3f3558a drivers/staging/rtl8192e/rtllib_crypt_tkip.c Matthew Casey 2014-08-22 641
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 642 iv16--;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 643 seq[0] = tkey->tx_iv16;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 644 seq[1] = tkey->tx_iv16 >> 8;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 645 seq[2] = tkey->tx_iv32;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 646 seq[3] = tkey->tx_iv32 >> 8;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 647 seq[4] = tkey->tx_iv32 >> 16;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 648 seq[5] = tkey->tx_iv32 >> 24;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 649 }
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 650
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 651 return TKIP_KEY_LEN;
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 652 }
ecdfa44610fa18 drivers/staging/rtl8192e/ieee80211/ieee80211_crypt_tkip.c Greg Kroah-Hartman 2009-08-04 653
:::::: The code at line 640 was first introduced by commit
:::::: ecdfa44610fa18678c3dd481af75368b9800c6c7 Staging: add Realtek 8192 PCI wireless driver
:::::: TO: Greg Kroah-Hartman <gregkh@suse.de>
:::::: CC: Greg Kroah-Hartman <gregkh@suse.de>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [staging:staging-testing 36/53] drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used
2024-08-23 12:35 [staging:staging-testing 36/53] drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used kernel test robot
@ 2024-08-23 17:16 ` Simon Horman
2024-08-23 17:27 ` Simon Horman
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2024-08-23 17:16 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all, devel, Greg Kroah-Hartman
On Fri, Aug 23, 2024 at 08:35:15PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
> head: 5315266844ea3b0b8b6be9842d5901e439fa838a
> commit: 5f1a6826ea4900f8540d5eeb29f97796860f2d08 [36/53] staging: rtl8192e: remove set but otherwise unused local variable iv32
> config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/config)
> compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202408232049.UJef268y-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> >> drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used [-Wunused-but-set-variable]
> 640 | u16 iv16 = tkey->tx_iv16;
> | ^
> 1 warning generated.
Sorry about this.
It seems that my patch, cited above, which removed a set but otherwise
unused variable results in iv16 being set but otherwise unused.
I'll prepare a follow-up patch to address this.
...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [staging:staging-testing 36/53] drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used
2024-08-23 17:16 ` Simon Horman
@ 2024-08-23 17:27 ` Simon Horman
2024-08-24 6:07 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Simon Horman @ 2024-08-23 17:27 UTC (permalink / raw)
To: kernel test robot; +Cc: llvm, oe-kbuild-all, devel, Greg Kroah-Hartman
On Fri, Aug 23, 2024 at 06:16:49PM +0100, Simon Horman wrote:
> On Fri, Aug 23, 2024 at 08:35:15PM +0800, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
> > head: 5315266844ea3b0b8b6be9842d5901e439fa838a
> > commit: 5f1a6826ea4900f8540d5eeb29f97796860f2d08 [36/53] staging: rtl8192e: remove set but otherwise unused local variable iv32
> > config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/config)
> > compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@intel.com>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202408232049.UJef268y-lkp@intel.com/
> >
> > All warnings (new ones prefixed by >>):
> >
> > >> drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used [-Wunused-but-set-variable]
> > 640 | u16 iv16 = tkey->tx_iv16;
> > | ^
> > 1 warning generated.
>
> Sorry about this.
>
> It seems that my patch, cited above, which removed a set but otherwise
> unused variable results in iv16 being set but otherwise unused.
>
> I'll prepare a follow-up patch to address this.
Patch is here:
- [PATCH] staging: rtl8192e: remove set but otherwise unused local variable iv16
https://lore.kernel.org/linux-staging/20240823-rtl8192e-iv16-v1-1-000702673065@kernel.org/T/#u
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [staging:staging-testing 36/53] drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used
2024-08-23 17:27 ` Simon Horman
@ 2024-08-24 6:07 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2024-08-24 6:07 UTC (permalink / raw)
To: Simon Horman; +Cc: kernel test robot, devel, llvm, oe-kbuild-all
On Fri, Aug 23, 2024 at 06:27:49PM +0100, Simon Horman wrote:
> On Fri, Aug 23, 2024 at 06:16:49PM +0100, Simon Horman wrote:
> > On Fri, Aug 23, 2024 at 08:35:15PM +0800, kernel test robot wrote:
> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
> > > head: 5315266844ea3b0b8b6be9842d5901e439fa838a
> > > commit: 5f1a6826ea4900f8540d5eeb29f97796860f2d08 [36/53] staging: rtl8192e: remove set but otherwise unused local variable iv32
> > > config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/config)
> > > compiler: clang version 18.1.5 (https://github.com/llvm/llvm-project 617a15a9eac96088ae5e9134248d8236e34b91b1)
> > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408232049.UJef268y-lkp@intel.com/reproduce)
> > >
> > > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > > the same patch/commit), kindly add following tags
> > > | Reported-by: kernel test robot <lkp@intel.com>
> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202408232049.UJef268y-lkp@intel.com/
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > > >> drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used [-Wunused-but-set-variable]
> > > 640 | u16 iv16 = tkey->tx_iv16;
> > > | ^
> > > 1 warning generated.
> >
> > Sorry about this.
> >
> > It seems that my patch, cited above, which removed a set but otherwise
> > unused variable results in iv16 being set but otherwise unused.
> >
> > I'll prepare a follow-up patch to address this.
>
> Patch is here:
>
> - [PATCH] staging: rtl8192e: remove set but otherwise unused local variable iv16
> https://lore.kernel.org/linux-staging/20240823-rtl8192e-iv16-v1-1-000702673065@kernel.org/T/#u
Now applied, thanks for the quick response!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-24 6:07 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 12:35 [staging:staging-testing 36/53] drivers/staging/rtl8192e/rtllib_crypt_tkip.c:640:7: warning: variable 'iv16' set but not used kernel test robot
2024-08-23 17:16 ` Simon Horman
2024-08-23 17:27 ` Simon Horman
2024-08-24 6:07 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox