LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Phillip Potter <phil@philpotter.co.uk>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [staging:staging-next 319/341] drivers/staging/r8188eu/hal/rtl8188e_cmd.c:158:12: warning: variable 'init_rate' set but not used
Date: Sun, 15 Aug 2021 10:53:29 +0800 [thread overview]
Message-ID: <202108151020.9OYD9f2T-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 5791 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-next
head: 0bd35146642bdc56f1b87d75f047b1c92bd2bd39
commit: 987219ad34a67b6160e6f5247578596a1a887031 [319/341] staging: r8188eu: remove lines from Makefile that silence build warnings
config: x86_64-randconfig-r005-20210815 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 7776b19eed44906e9973bfb240b6279d6feaab41)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/commit/?id=987219ad34a67b6160e6f5247578596a1a887031
git remote add staging https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git
git fetch --no-tags staging staging-next
git checkout 987219ad34a67b6160e6f5247578596a1a887031
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/staging/r8188eu/hal/rtl8188e_cmd.c:7:
In file included from drivers/staging/r8188eu/hal/../include/drv_types.h:22:
drivers/staging/r8188eu/hal/../include/rtw_recv.h:395:9: warning: variable 'buf_desc' is uninitialized when used here [-Wuninitialized]
return buf_desc;
^~~~~~~~
drivers/staging/r8188eu/hal/../include/rtw_recv.h:391:25: note: initialize the variable 'buf_desc' to silence this warning
unsigned char *buf_desc;
^
= NULL
drivers/staging/r8188eu/hal/../include/rtw_recv.h:412:52: warning: variable 'buf_star' is uninitialized when used here [-Wuninitialized]
precv_frame = rxmem_to_recvframe((unsigned char *)buf_star);
^~~~~~~~
drivers/staging/r8188eu/hal/../include/rtw_recv.h:410:14: note: initialize the variable 'buf_star' to silence this warning
u8 *buf_star;
^
= NULL
>> drivers/staging/r8188eu/hal/rtl8188e_cmd.c:158:12: warning: variable 'init_rate' set but not used [-Wunused-but-set-variable]
u8 macid, init_rate, raid, shortGIrate = false;
^
3 warnings generated.
vim +/init_rate +158 drivers/staging/r8188eu/hal/rtl8188e_cmd.c
8cd574e6af5463 Phillip Potter 2021-07-28 149
8cd574e6af5463 Phillip Potter 2021-07-28 150 /* bitmap[0:27] = tx_rate_bitmap */
8cd574e6af5463 Phillip Potter 2021-07-28 151 /* bitmap[28:31]= Rate Adaptive id */
8cd574e6af5463 Phillip Potter 2021-07-28 152 /* arg[0:4] = macid */
8cd574e6af5463 Phillip Potter 2021-07-28 153 /* arg[5] = Short GI */
8cd574e6af5463 Phillip Potter 2021-07-28 154 void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level)
8cd574e6af5463 Phillip Potter 2021-07-28 155 {
8cd574e6af5463 Phillip Potter 2021-07-28 156 struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter);
8cd574e6af5463 Phillip Potter 2021-07-28 157
8cd574e6af5463 Phillip Potter 2021-07-28 @158 u8 macid, init_rate, raid, shortGIrate = false;
8cd574e6af5463 Phillip Potter 2021-07-28 159
8cd574e6af5463 Phillip Potter 2021-07-28 160 macid = arg&0x1f;
8cd574e6af5463 Phillip Potter 2021-07-28 161
8cd574e6af5463 Phillip Potter 2021-07-28 162 raid = (bitmap>>28) & 0x0f;
8cd574e6af5463 Phillip Potter 2021-07-28 163 bitmap &= 0x0fffffff;
8cd574e6af5463 Phillip Potter 2021-07-28 164
8cd574e6af5463 Phillip Potter 2021-07-28 165 if (rssi_level != DM_RATR_STA_INIT)
8cd574e6af5463 Phillip Potter 2021-07-28 166 bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, macid, bitmap, rssi_level);
8cd574e6af5463 Phillip Potter 2021-07-28 167
8cd574e6af5463 Phillip Potter 2021-07-28 168 bitmap |= ((raid<<28)&0xf0000000);
8cd574e6af5463 Phillip Potter 2021-07-28 169
8cd574e6af5463 Phillip Potter 2021-07-28 170 init_rate = get_highest_rate_idx(bitmap&0x0fffffff)&0x3f;
8cd574e6af5463 Phillip Potter 2021-07-28 171
8cd574e6af5463 Phillip Potter 2021-07-28 172 shortGIrate = (arg&BIT(5)) ? true : false;
8cd574e6af5463 Phillip Potter 2021-07-28 173
8cd574e6af5463 Phillip Potter 2021-07-28 174 if (shortGIrate)
8cd574e6af5463 Phillip Potter 2021-07-28 175 init_rate |= BIT(6);
8cd574e6af5463 Phillip Potter 2021-07-28 176
8cd574e6af5463 Phillip Potter 2021-07-28 177 raid = (bitmap>>28) & 0x0f;
8cd574e6af5463 Phillip Potter 2021-07-28 178
8cd574e6af5463 Phillip Potter 2021-07-28 179 bitmap &= 0x0fffffff;
8cd574e6af5463 Phillip Potter 2021-07-28 180
8cd574e6af5463 Phillip Potter 2021-07-28 181 DBG_88E("%s=> mac_id:%d, raid:%d, ra_bitmap=0x%x, shortGIrate=0x%02x\n",
8cd574e6af5463 Phillip Potter 2021-07-28 182 __func__, macid, raid, bitmap, shortGIrate);
8cd574e6af5463 Phillip Potter 2021-07-28 183
6839ff57baa4a6 Michael Straube 2021-08-09 184 ODM_RA_UpdateRateInfo_8188E(&haldata->odmpriv, macid, raid, bitmap, shortGIrate);
8cd574e6af5463 Phillip Potter 2021-07-28 185 }
8cd574e6af5463 Phillip Potter 2021-07-28 186
:::::: The code at line 158 was first introduced by commit
:::::: 8cd574e6af5463af7d693d111c61212e52c44810 staging: r8188eu: introduce new hal dir for RTL8188eu driver
:::::: TO: Phillip Potter <phil@philpotter.co.uk>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 33770 bytes --]
reply other threads:[~2021-08-15 2:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202108151020.9OYD9f2T-lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phil@philpotter.co.uk \
--subject='Re: [staging:staging-next 319/341] drivers/staging/r8188eu/hal/rtl8188e_cmd.c:158:12: warning: variable '\''init_rate'\'' set but not used' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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).