[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202203181306.hfAlK7cq-lkp@intel.com>
Date: Fri, 18 Mar 2022 13:58:30 +0800
From: kernel test robot <lkp@...el.com>
To: Fangrui Song <maskray@...gle.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Nathan Chancellor <natechancellor@...il.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Masahiro Yamada <masahiroy@...nel.org>
Subject: [linux-stable-rc:linux-4.19.y 2710/9999] mm/slab_common.c:1438:37:
warning: unused variable 'proc_slabinfo_operations'
Hi Fangrui,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: 57e593a4ee92b5fddbab3367340e9cb0300cc241
commit: 69c122751164c3c343eea205fd5c3e1d5132f967 [2710/9999] Makefile: Fix GCC_TOOLCHAIN_DIR prefix for Clang cross compilation
config: mips-randconfig-r022-20220317 (https://download.01.org/0day-ci/archive/20220318/202203181306.hfAlK7cq-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb)
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 mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=69c122751164c3c343eea205fd5c3e1d5132f967
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout 69c122751164c3c343eea205fd5c3e1d5132f967
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=mips SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> mm/slab_common.c:1438:37: warning: unused variable 'proc_slabinfo_operations' [-Wunused-const-variable]
static const struct file_operations proc_slabinfo_operations = {
^
1 warning generated.
--
>> drivers/hwmon/scmi-hwmon.c:59:24: warning: address of array 'sensor->name' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (sensor && sensor->name)
~~ ~~~~~~~~^~~~
1 warning generated.
--
drivers/tty/serial/stm32-usart.c:332:15: warning: variable 'cookie' set but not used [-Wunused-but-set-variable]
dma_cookie_t cookie;
^
>> drivers/tty/serial/stm32-usart.c:600:14: warning: no previous prototype for function 'stm32_get_databits' [-Wmissing-prototypes]
unsigned int stm32_get_databits(struct ktermios *termios)
^
drivers/tty/serial/stm32-usart.c:600:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
unsigned int stm32_get_databits(struct ktermios *termios)
^
static
drivers/tty/serial/stm32-usart.c:929:15: warning: variable 'cookie' set but not used [-Wunused-but-set-variable]
dma_cookie_t cookie;
^
3 warnings generated.
--
In file included from drivers/net/wireless/intersil/hostap/hostap_ap.c:30:
In file included from drivers/net/wireless/intersil/hostap/hostap_wlan.h:11:
include/net/iw_handler.h:489:9: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]
return IW_EV_POINT_LEN;
^~~~~~~~~~~~~~~
include/uapi/linux/wireless.h:1096:5: note: expanded from macro 'IW_EV_POINT_LEN'
IW_EV_POINT_OFF)
^~~~~~~~~~~~~~~
include/uapi/linux/wireless.h:1093:75: note: expanded from macro 'IW_EV_POINT_OFF'
#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \
^
drivers/net/wireless/intersil/hostap/hostap_ap.c:1507:8: warning: variable 'txt' set but not used [-Wunused-but-set-variable]
char *txt = "";
^
>> drivers/net/wireless/intersil/hostap/hostap_ap.c:372:36: warning: unused variable 'ap_control_proc_seqops' [-Wunused-const-variable]
static const struct seq_operations ap_control_proc_seqops = {
^
>> drivers/net/wireless/intersil/hostap/hostap_ap.c:574:36: warning: unused variable 'prism2_ap_proc_seqops' [-Wunused-const-variable]
static const struct seq_operations prism2_ap_proc_seqops = {
^
4 warnings generated.
--
In file included from drivers/net/wireless/intersil/hostap/hostap_proc.c:9:
In file included from drivers/net/wireless/intersil/hostap/hostap_wlan.h:11:
include/net/iw_handler.h:489:9: warning: performing pointer subtraction with a null pointer has undefined behavior [-Wnull-pointer-subtraction]
return IW_EV_POINT_LEN;
^~~~~~~~~~~~~~~
include/uapi/linux/wireless.h:1096:5: note: expanded from macro 'IW_EV_POINT_LEN'
IW_EV_POINT_OFF)
^~~~~~~~~~~~~~~
include/uapi/linux/wireless.h:1093:75: note: expanded from macro 'IW_EV_POINT_OFF'
#define IW_EV_POINT_OFF (((char *) &(((struct iw_point *) NULL)->length)) - \
^
>> drivers/net/wireless/intersil/hostap/hostap_proc.c:117:36: warning: unused variable 'prism2_wds_proc_seqops' [-Wunused-const-variable]
static const struct seq_operations prism2_wds_proc_seqops = {
^
>> drivers/net/wireless/intersil/hostap/hostap_proc.c:170:36: warning: unused variable 'prism2_bss_list_proc_seqops' [-Wunused-const-variable]
static const struct seq_operations prism2_bss_list_proc_seqops = {
^
drivers/net/wireless/intersil/hostap/hostap_proc.c:214:37: warning: unused variable 'prism2_pda_proc_fops' [-Wunused-const-variable]
static const struct file_operations prism2_pda_proc_fops = {
^
drivers/net/wireless/intersil/hostap/hostap_proc.c:226:37: warning: unused variable 'prism2_aux_dump_proc_fops' [-Wunused-const-variable]
static const struct file_operations prism2_aux_dump_proc_fops = {
^
>> drivers/net/wireless/intersil/hostap/hostap_proc.c:348:36: warning: unused variable 'prism2_scan_results_proc_seqops' [-Wunused-const-variable]
static const struct seq_operations prism2_scan_results_proc_seqops = {
^
6 warnings generated.
vim +/proc_slabinfo_operations +1438 mm/slab_common.c
b7454ad3cfc304 Glauber Costa 2012-10-19 1437
b7454ad3cfc304 Glauber Costa 2012-10-19 @1438 static const struct file_operations proc_slabinfo_operations = {
b7454ad3cfc304 Glauber Costa 2012-10-19 1439 .open = slabinfo_open,
b7454ad3cfc304 Glauber Costa 2012-10-19 1440 .read = seq_read,
b7454ad3cfc304 Glauber Costa 2012-10-19 1441 .write = slabinfo_write,
b7454ad3cfc304 Glauber Costa 2012-10-19 1442 .llseek = seq_lseek,
b7454ad3cfc304 Glauber Costa 2012-10-19 1443 .release = seq_release,
b7454ad3cfc304 Glauber Costa 2012-10-19 1444 };
b7454ad3cfc304 Glauber Costa 2012-10-19 1445
:::::: The code at line 1438 was first introduced by commit
:::::: b7454ad3cfc3043c5264729a6204f049fe1f34b1 mm/sl[au]b: Move slabinfo processing to slab_common.c
:::::: TO: Glauber Costa <glommer@...allels.com>
:::::: CC: Pekka Enberg <penberg@...nel.org>
---
0-DAY CI Kernel Test Service
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists