Re: [PATCH v2 09/13] ASoC: Intel: Select catpt and deprecate haswell
by kernel test robot
Hi Cezary,
I love your patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on sound/for-next v5.8 next-20200811]
[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]
url: https://github.com/0day-ci/linux/commits/Cezary-Rojewski/ASoC-Intel-Catpt...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/printk.h:404,
from include/linux/kernel.h:15,
from arch/x86/include/asm/percpu.h:45,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from sound/soc/intel/catpt/loader.c:8:
sound/soc/intel/catpt/loader.c: In function 'catpt_restore_fwimage':
>> sound/soc/intel/catpt/loader.c:277:22: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
277 | dev_dbg(cdev->dev, "found intersecting region: 0x%08llx-%08llx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
125 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
157 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/intel/catpt/loader.c:277:3: note: in expansion of macro 'dev_dbg'
277 | dev_dbg(cdev->dev, "found intersecting region: 0x%08llx-%08llx\n",
| ^~~~~~~
sound/soc/intel/catpt/loader.c:277:57: note: format string is defined here
277 | dev_dbg(cdev->dev, "found intersecting region: 0x%08llx-%08llx\n",
| ~~~~~^
| |
| long long unsigned int
| %08x
In file included from include/linux/printk.h:404,
from include/linux/kernel.h:15,
from arch/x86/include/asm/percpu.h:45,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from sound/soc/intel/catpt/loader.c:8:
sound/soc/intel/catpt/loader.c:277:22: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
277 | dev_dbg(cdev->dev, "found intersecting region: 0x%08llx-%08llx\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
125 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
157 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/intel/catpt/loader.c:277:3: note: in expansion of macro 'dev_dbg'
277 | dev_dbg(cdev->dev, "found intersecting region: 0x%08llx-%08llx\n",
| ^~~~~~~
sound/soc/intel/catpt/loader.c:277:64: note: format string is defined here
277 | dev_dbg(cdev->dev, "found intersecting region: 0x%08llx-%08llx\n",
| ~~~~~^
| |
| long long unsigned int
| %08x
In file included from include/linux/printk.h:404,
from include/linux/kernel.h:15,
from arch/x86/include/asm/percpu.h:45,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from sound/soc/intel/catpt/loader.c:8:
sound/soc/intel/catpt/loader.c:279:22: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 4 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
279 | dev_dbg(cdev->dev, "restoring fwimage: start 0x%08llx size %lld\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
125 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
157 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/intel/catpt/loader.c:279:3: note: in expansion of macro 'dev_dbg'
279 | dev_dbg(cdev->dev, "restoring fwimage: start 0x%08llx size %lld\n",
| ^~~~~~~
sound/soc/intel/catpt/loader.c:279:55: note: format string is defined here
279 | dev_dbg(cdev->dev, "restoring fwimage: start 0x%08llx size %lld\n",
| ~~~~~^
| |
| long long unsigned int
| %08x
In file included from include/linux/printk.h:404,
from include/linux/kernel.h:15,
from arch/x86/include/asm/percpu.h:45,
from arch/x86/include/asm/current.h:6,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/dma-mapping.h:7,
from sound/soc/intel/catpt/loader.c:8:
>> sound/soc/intel/catpt/loader.c:279:22: warning: format '%lld' expects argument of type 'long long int', but argument 5 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
279 | dev_dbg(cdev->dev, "restoring fwimage: start 0x%08llx size %lld\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro '__dynamic_func_call'
125 | func(&id, ##__VA_ARGS__); \
| ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro '_dynamic_func_call'
157 | _dynamic_func_call(fmt,__dynamic_dev_dbg, \
| ^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
115 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
sound/soc/intel/catpt/loader.c:279:3: note: in expansion of macro 'dev_dbg'
279 | dev_dbg(cdev->dev, "restoring fwimage: start 0x%08llx size %lld\n",
| ^~~~~~~
sound/soc/intel/catpt/loader.c:279:65: note: format string is defined here
279 | dev_dbg(cdev->dev, "restoring fwimage: start 0x%08llx size %lld\n",
| ~~~^
| |
| long long int
| %d
vim +277 sound/soc/intel/catpt/loader.c
2305f5477ad095 Cezary Rojewski 2020-08-11 239
2305f5477ad095 Cezary Rojewski 2020-08-11 240 static int catpt_restore_fwimage(struct catpt_dev *cdev,
2305f5477ad095 Cezary Rojewski 2020-08-11 241 struct dma_chan *chan, dma_addr_t paddr,
2305f5477ad095 Cezary Rojewski 2020-08-11 242 struct catpt_fw_block_hdr *blk)
2305f5477ad095 Cezary Rojewski 2020-08-11 243 {
2305f5477ad095 Cezary Rojewski 2020-08-11 244 struct resource r1, r2, common;
2305f5477ad095 Cezary Rojewski 2020-08-11 245 int i;
2305f5477ad095 Cezary Rojewski 2020-08-11 246
2305f5477ad095 Cezary Rojewski 2020-08-11 247 print_hex_dump_debug(__func__, DUMP_PREFIX_OFFSET, 8, 4,
2305f5477ad095 Cezary Rojewski 2020-08-11 248 blk, sizeof(*blk), false);
2305f5477ad095 Cezary Rojewski 2020-08-11 249
2305f5477ad095 Cezary Rojewski 2020-08-11 250 r1.start = cdev->dram.start + blk->ram_offset;
2305f5477ad095 Cezary Rojewski 2020-08-11 251 r1.end = r1.start + blk->size - 1;
2305f5477ad095 Cezary Rojewski 2020-08-11 252 /* advance to data area */
2305f5477ad095 Cezary Rojewski 2020-08-11 253 paddr += sizeof(*blk);
2305f5477ad095 Cezary Rojewski 2020-08-11 254
2305f5477ad095 Cezary Rojewski 2020-08-11 255 for (i = 0; i < cdev->dx_ctx.num_meminfo; i++) {
2305f5477ad095 Cezary Rojewski 2020-08-11 256 struct catpt_save_meminfo *info;
2305f5477ad095 Cezary Rojewski 2020-08-11 257 u32 off;
2305f5477ad095 Cezary Rojewski 2020-08-11 258 int ret;
2305f5477ad095 Cezary Rojewski 2020-08-11 259
2305f5477ad095 Cezary Rojewski 2020-08-11 260 info = &cdev->dx_ctx.meminfo[i];
2305f5477ad095 Cezary Rojewski 2020-08-11 261
2305f5477ad095 Cezary Rojewski 2020-08-11 262 if (info->source != CATPT_DX_TYPE_FW_IMAGE)
2305f5477ad095 Cezary Rojewski 2020-08-11 263 continue;
2305f5477ad095 Cezary Rojewski 2020-08-11 264
2305f5477ad095 Cezary Rojewski 2020-08-11 265 off = catpt_to_host_offset(info->offset);
2305f5477ad095 Cezary Rojewski 2020-08-11 266 if (off < cdev->dram.start || off > cdev->dram.end)
2305f5477ad095 Cezary Rojewski 2020-08-11 267 continue;
2305f5477ad095 Cezary Rojewski 2020-08-11 268
2305f5477ad095 Cezary Rojewski 2020-08-11 269 r2.start = off;
2305f5477ad095 Cezary Rojewski 2020-08-11 270 r2.end = r2.start + info->size - 1;
2305f5477ad095 Cezary Rojewski 2020-08-11 271
2305f5477ad095 Cezary Rojewski 2020-08-11 272 if (!catpt_resource_overlapping(&r2, &r1, &common))
2305f5477ad095 Cezary Rojewski 2020-08-11 273 continue;
2305f5477ad095 Cezary Rojewski 2020-08-11 274 /* calculate start offset of common data area */
2305f5477ad095 Cezary Rojewski 2020-08-11 275 off = common.start - r1.start;
2305f5477ad095 Cezary Rojewski 2020-08-11 276
2305f5477ad095 Cezary Rojewski 2020-08-11 @277 dev_dbg(cdev->dev, "found intersecting region: 0x%08llx-%08llx\n",
2305f5477ad095 Cezary Rojewski 2020-08-11 278 common.start, common.end);
2305f5477ad095 Cezary Rojewski 2020-08-11 @279 dev_dbg(cdev->dev, "restoring fwimage: start 0x%08llx size %lld\n",
2305f5477ad095 Cezary Rojewski 2020-08-11 280 common.start, resource_size(&common));
2305f5477ad095 Cezary Rojewski 2020-08-11 281
2305f5477ad095 Cezary Rojewski 2020-08-11 282 ret = catpt_dma_memcpy_todsp(cdev, chan, common.start,
2305f5477ad095 Cezary Rojewski 2020-08-11 283 paddr + off,
2305f5477ad095 Cezary Rojewski 2020-08-11 284 resource_size(&common));
2305f5477ad095 Cezary Rojewski 2020-08-11 285 if (ret < 0) {
2305f5477ad095 Cezary Rojewski 2020-08-11 286 dev_err(cdev->dev, "memcpy todsp failed: %d\n", ret);
2305f5477ad095 Cezary Rojewski 2020-08-11 287 return ret;
2305f5477ad095 Cezary Rojewski 2020-08-11 288 }
2305f5477ad095 Cezary Rojewski 2020-08-11 289 }
2305f5477ad095 Cezary Rojewski 2020-08-11 290
2305f5477ad095 Cezary Rojewski 2020-08-11 291 return 0;
2305f5477ad095 Cezary Rojewski 2020-08-11 292 }
2305f5477ad095 Cezary Rojewski 2020-08-11 293
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[frank-w-bpi-r2-4.14:5.8-main 5/58] drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect.c:75:9: error: no previous prototype for 'wmt_detect_write'
by kernel test robot
tree: https://github.com/frank-w/BPI-R2-4.14 5.8-main
head: 3fc4f1d2748b72489057cd07d270b4a259880fb0
commit: 141d9bc8265abec28dfbac88566610ad098b6801 [5/58] mt6625l: include wifi-folder
config: arm-randconfig-r026-20200811 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
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
git checkout 141d9bc8265abec28dfbac88566610ad098b6801
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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 >>):
cc1: error: drivers/misc/mediatek/include/mt-plat//include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: arch/arm/mach-//dct/dct: No such file or directory [-Werror=missing-include-dirs]
>> drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect.c:75:9: error: no previous prototype for 'wmt_detect_write' [-Werror=missing-prototypes]
75 | ssize_t wmt_detect_write(struct file *filp, const char __user *buf, size_t count, loff_t *f_pos)
| ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
cc1: error: drivers/misc/mediatek/include/mt-plat//include: No such file or directory [-Werror=missing-include-dirs]
cc1: error: arch/arm/mach-//dct/dct: No such file or directory [-Werror=missing-include-dirs]
>> drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect_pwr.c:51:5: error: no previous prototype for '_wmt_detect_output_low' [-Werror=missing-prototypes]
51 | int _wmt_detect_output_low(unsigned int id)
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect_pwr.c:63:5: error: no previous prototype for '_wmt_detect_output_high' [-Werror=missing-prototypes]
63 | int _wmt_detect_output_high(unsigned int id)
| ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect_pwr.c:75:5: error: no previous prototype for '_wmt_detect_read_gpio_input' [-Werror=missing-prototypes]
75 | int _wmt_detect_read_gpio_input(unsigned int id)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: drivers/misc/mediatek/base/power/include: No such file or directory [-Werror=missing-include-dirs]
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/scan.h:269,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:237,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/dump.c:47:
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:152:1: error: 'lstats_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
152 | lstats_vendor_test_policy[LSTATS_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:140:1: error: 'rtt_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
140 | rtt_vendor_test_policy[RTT_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:120:1: error: 'gscan_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
120 | gscan_vendor_test_policy[GSCAN_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:93:1: error: 'wifi_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
93 | wifi_vendor_test_policy[WIFI_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:543,
from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h:594,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:171,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/dump.c:47:
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:935:21: error: 'aucRateTableSize' defined but not used [-Werror=unused-const-variable=]
935 | static const UINT_8 aucRateTableSize[PREAMBLE_OPTION_NUM] = {
| ^~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:878:21: error: 'aucRateIndex2RateCode' defined but not used [-Werror=unused-const-variable=]
878 | static const UINT_8 aucRateIndex2RateCode[PREAMBLE_OPTION_NUM][RATE_NUM] = {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: drivers/misc/mediatek/base/power/include: No such file or directory [-Werror=missing-include-dirs]
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c: In function 'wlanSendCommand':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2005:14: error: variable 'prTxCtrl' set but not used [-Werror=unused-but-set-variable]
2005 | P_TX_CTRL_T prTxCtrl;
| ^~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c: In function 'wlanSendNicPowerCtrlCmd':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:2576:16: error: variable 'prGlueInfo' set but not used [-Werror=unused-but-set-variable]
2576 | P_GLUE_INFO_T prGlueInfo;
| ^~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c: In function 'wlanProcessQueuedSwRfb':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:3271:14: error: variable 'prRxCtrl' set but not used [-Werror=unused-but-set-variable]
3271 | P_RX_CTRL_T prRxCtrl;
| ^~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:3270:14: error: variable 'prTxCtrl' set but not used [-Werror=unused-but-set-variable]
3270 | P_TX_CTRL_T prTxCtrl;
| ^~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c: At top level:
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:4119:13: error: no previous prototype for 'wlanQueryCompileFlag' [-Werror=missing-prototypes]
4119 | WLAN_STATUS wlanQueryCompileFlag(IN P_ADAPTER_T prAdapter, IN UINT_32 u4QueryID, OUT PUINT_32 pu4CompilerFlag)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:5432:1: error: no previous prototype for 'wlanoidQueryACSChannelList' [-Werror=missing-prototypes]
5432 | wlanoidQueryACSChannelList(IN P_ADAPTER_T prAdapter,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:5739:8: error: no previous prototype for 'wlanCfgFindNextToken' [-Werror=missing-prototypes]
5739 | INT_32 wlanCfgFindNextToken(struct WLAN_CFG_PARSE_STATE_S *state)
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:5898:1: error: no previous prototype for 'wlanCfgParseAddEntry' [-Werror=missing-prototypes]
5898 | wlanCfgParseAddEntry(IN P_ADAPTER_T prAdapter,
| ^~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:5955:13: error: no previous prototype for 'wlanCfgParse' [-Werror=missing-prototypes]
5955 | WLAN_STATUS wlanCfgParse(IN P_ADAPTER_T prAdapter, PUINT_8 pucConfigBuf, UINT_32 u4ConfigBufLen)
| ^~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/scan.h:269,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:237,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:967:
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:152:1: error: 'lstats_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
152 | lstats_vendor_test_policy[LSTATS_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:140:1: error: 'rtt_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
140 | rtt_vendor_test_policy[RTT_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:120:1: error: 'gscan_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
120 | gscan_vendor_test_policy[GSCAN_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:93:1: error: 'wifi_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
93 | wifi_vendor_test_policy[WIFI_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:543,
from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h:594,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:171,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_lib.c:967:
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:935:21: error: 'aucRateTableSize' defined but not used [-Werror=unused-const-variable=]
935 | static const UINT_8 aucRateTableSize[PREAMBLE_OPTION_NUM] = {
| ^~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:878:21: error: 'aucRateIndex2RateCode' defined but not used [-Werror=unused-const-variable=]
878 | static const UINT_8 aucRateIndex2RateCode[PREAMBLE_OPTION_NUM][RATE_NUM] = {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: drivers/misc/mediatek/base/power/include: No such file or directory [-Werror=missing-include-dirs]
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidQueryBssidList':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:1384:16: error: variable 'prGlueInfo' set but not used [-Werror=unused-but-set-variable]
1384 | P_GLUE_INFO_T prGlueInfo;
| ^~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetBssid':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:1704:9: error: variable 'i4Idx' set but not used [-Werror=unused-but-set-variable]
1704 | INT_32 i4Idx = -1;
| ^~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetSsid':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:1963:9: error: variable 'i4Idx' set but not used [-Werror=unused-but-set-variable]
1963 | INT_32 i4Idx = -1, i4MaxRSSI = INT_MIN;
| ^~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetInfrastructureMode':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:2218:16: error: variable 'prGlueInfo' set but not used [-Werror=unused-but-set-variable]
2218 | P_GLUE_INFO_T prGlueInfo;
| ^~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetAuthMode':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:2388:16: error: variable 'prGlueInfo' set but not used [-Werror=unused-but-set-variable]
2388 | P_GLUE_INFO_T prGlueInfo;
| ^~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetEncryptionStatus':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:3496:16: error: variable 'prGlueInfo' set but not used [-Werror=unused-but-set-variable]
3496 | P_GLUE_INFO_T prGlueInfo;
| ^~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetSwCtrlWrite':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:5430:16: error: variable 'prGlueInfo' set but not used [-Werror=unused-but-set-variable]
5430 | P_GLUE_INFO_T prGlueInfo;
| ^~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetWapiKey':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:8182:10: error: variable 'pc' set but not used [-Werror=unused-but-set-variable]
8182 | PUINT_8 pc;
| ^~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c: In function 'wlanoidSetGSCNAction':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:10358:16: error: variable 'prScanInfo' set but not used [-Werror=unused-but-set-variable]
10358 | P_SCAN_INFO_T prScanInfo;
| ^~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/scan.h:269,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:237,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:1061:
At top level:
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:152:1: error: 'lstats_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
152 | lstats_vendor_test_policy[LSTATS_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:140:1: error: 'rtt_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
140 | rtt_vendor_test_policy[RTT_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:120:1: error: 'gscan_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
120 | gscan_vendor_test_policy[GSCAN_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:93:1: error: 'wifi_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
93 | wifi_vendor_test_policy[WIFI_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:543,
from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h:594,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:171,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_oid.c:1061:
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:935:21: error: 'aucRateTableSize' defined but not used [-Werror=unused-const-variable=]
935 | static const UINT_8 aucRateTableSize[PREAMBLE_OPTION_NUM] = {
| ^~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:878:21: error: 'aucRateIndex2RateCode' defined but not used [-Werror=unused-const-variable=]
878 | static const UINT_8 aucRateIndex2RateCode[PREAMBLE_OPTION_NUM][RATE_NUM] = {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: drivers/misc/mediatek/base/power/include: No such file or directory [-Werror=missing-include-dirs]
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowCmdReadRSSI':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:997:18: error: variable 'prBowReadRSSI' set but not used [-Werror=unused-but-set-variable]
997 | P_BOW_READ_RSSI prBowReadRSSI;
| ^~~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowCmdReadLinkQuality':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:1029:26: error: variable 'prBowReadLinkQuality' set but not used [-Werror=unused-but-set-variable]
1029 | P_BOW_READ_LINK_QUALITY prBowReadLinkQuality;
| ^~~~~~~~~~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'wlanbowCmdEventLinkDisconnected':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:1439:41: error: cast between incompatible function types from 'VOID (*)(struct _ADAPTER_T *, struct _MSDU_INFO_T *, ENUM_TX_RESULT_CODE_T)' {aka 'void (*)(struct _ADAPTER_T *, struct _MSDU_INFO_T *, enum _ENUM_TX_RESULT_CODE_T)'} to 'WLAN_STATUS (*)(struct _ADAPTER_T *, struct _MSDU_INFO_T *, ENUM_TX_RESULT_CODE_T)' {aka 'unsigned int (*)(struct _ADAPTER_T *, struct _MSDU_INFO_T *, enum _ENUM_TX_RESULT_CODE_T)'} [-Werror=cast-function-type]
1439 | REASON_CODE_DEAUTH_LEAVING_BSS, (PFN_TX_DONE_HANDLER) bowDisconnectLink);
| ^
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'wlanbowCmdEventSetSetupConnection':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:1492:19: error: variable 'prBowFsmInfo' set but not used [-Werror=unused-but-set-variable]
1492 | P_BOW_FSM_INFO_T prBowFsmInfo;
| ^~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowStopping':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:1650:15: error: variable 'prBowBssInfo' set but not used [-Werror=unused-but-set-variable]
1650 | P_BSS_INFO_T prBowBssInfo;
| ^~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:1649:19: error: variable 'prBowFsmInfo' set but not used [-Werror=unused-but-set-variable]
1649 | P_BOW_FSM_INFO_T prBowFsmInfo;
| ^~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowValidateProbeReq':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:1953:19: error: variable 'prBowFsmInfo' set but not used [-Werror=unused-but-set-variable]
1953 | P_BOW_FSM_INFO_T prBowFsmInfo;
| ^~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowResponderScan':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:2051:15: error: variable 'prBssInfo' set but not used [-Werror=unused-but-set-variable]
2051 | P_BSS_INFO_T prBssInfo;
| ^~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowFsmRunEventJoinComplete':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:2356:15: error: variable 'prBssInfo' set but not used [-Werror=unused-but-set-variable]
2356 | P_BSS_INFO_T prBssInfo;
| ^~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowRunEventAAAComplete':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:2617:19: error: variable 'prBowFsmInfo' set but not used [-Werror=unused-but-set-variable]
2617 | P_BOW_FSM_INFO_T prBowFsmInfo;
| ^~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowRunEventRxDeAuth':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:2656:15: error: variable 'prBowBssInfo' set but not used [-Werror=unused-but-set-variable]
2656 | P_BSS_INFO_T prBowBssInfo;
| ^~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowRunEventChGrant':
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:2971:15: error: variable 'prBowBssInfo' set but not used [-Werror=unused-but-set-variable]
2971 | P_BSS_INFO_T prBowBssInfo;
| ^~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c: In function 'bowGetBowTableContent':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:3266:100: error: parameter 'prBowTable' set but not used [-Werror=unused-but-set-parameter]
3266 | BOOLEAN bowGetBowTableContent(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBowTableIdx, OUT P_BOW_TABLE_T prBowTable)
| ~~~~~~~~~~~~~~^~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/scan.h:269,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:237,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:319:
At top level:
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:152:1: error: 'lstats_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
152 | lstats_vendor_test_policy[LSTATS_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:140:1: error: 'rtt_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
140 | rtt_vendor_test_policy[RTT_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:120:1: error: 'gscan_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
120 | gscan_vendor_test_policy[GSCAN_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:93:1: error: 'wifi_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
93 | wifi_vendor_test_policy[WIFI_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:543,
from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h:594,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:171,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_bow.c:319:
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:935:21: error: 'aucRateTableSize' defined but not used [-Werror=unused-const-variable=]
935 | static const UINT_8 aucRateTableSize[PREAMBLE_OPTION_NUM] = {
| ^~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:878:21: error: 'aucRateIndex2RateCode' defined but not used [-Werror=unused-const-variable=]
878 | static const UINT_8 aucRateIndex2RateCode[PREAMBLE_OPTION_NUM][RATE_NUM] = {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: drivers/misc/mediatek/base/power/include: No such file or directory [-Werror=missing-include-dirs]
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:218:
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_p2p_ioctl.h:570:2: error: #error "Please ENABLE kernel config (CONFIG_NL80211_TESTMODE) to support Wi-Fi Direct"
570 | #error "Please ENABLE kernel config (CONFIG_NL80211_TESTMODE) to support Wi-Fi Direct"
| ^~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c: In function 'wlanoidSetRemoveP2PKey':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:487:3: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
487 | ; /* return WLAN_STATUS_NOT_ACCEPTED; */
| ^
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c: At top level:
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:529:1: error: no previous prototype for 'wlanoidSetP2pNetworkAddress' [-Werror=missing-prototypes]
529 | wlanoidSetP2pNetworkAddress(IN P_ADAPTER_T prAdapter,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c: In function 'wlanoidSetP2pSupplicantVersion':
>> drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:1528:9: error: variable 'ucVersionNum' set but not used [-Werror=unused-but-set-variable]
1528 | UINT_8 ucVersionNum;
| ^~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/scan.h:269,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:237,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:217:
At top level:
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:152:1: error: 'lstats_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
152 | lstats_vendor_test_policy[LSTATS_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:140:1: error: 'rtt_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
140 | rtt_vendor_test_policy[RTT_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:120:1: error: 'gscan_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
120 | gscan_vendor_test_policy[GSCAN_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:93:1: error: 'wifi_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
93 | wifi_vendor_test_policy[WIFI_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:543,
from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h:594,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:171,
from drivers/misc/mediatek/connectivity/wlan/gen2/common/wlan_p2p.c:217:
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:935:21: error: 'aucRateTableSize' defined but not used [-Werror=unused-const-variable=]
935 | static const UINT_8 aucRateTableSize[PREAMBLE_OPTION_NUM] = {
| ^~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:878:21: error: 'aucRateIndex2RateCode' defined but not used [-Werror=unused-const-variable=]
878 | static const UINT_8 aucRateIndex2RateCode[PREAMBLE_OPTION_NUM][RATE_NUM] = {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
--
>> cc1: error: drivers/misc/mediatek/base/power/include: No such file or directory [-Werror=missing-include-dirs]
>> drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c:1213:6: error: no previous prototype for 'nicHifInit' [-Werror=missing-prototypes]
1213 | VOID nicHifInit(IN P_ADAPTER_T prAdapter)
| ^~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c:1316:6: error: no previous prototype for 'nicProcessFwOwnBackInterrupt' [-Werror=missing-prototypes]
1316 | VOID nicProcessFwOwnBackInterrupt(IN P_ADAPTER_T prAdapter)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c:2611:13: error: no previous prototype for 'nicSetAutoTxPowerControl' [-Werror=missing-prototypes]
2611 | WLAN_STATUS nicSetAutoTxPowerControl(IN P_ADAPTER_T prAdapter, IN P_CMD_TX_PWR_T prTxPwrParam)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/include/mgmt/scan.h:269,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:237,
from drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c:637:
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:152:1: error: 'lstats_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
152 | lstats_vendor_test_policy[LSTATS_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:140:1: error: 'rtt_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
140 | rtt_vendor_test_policy[RTT_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:120:1: error: 'gscan_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
120 | gscan_vendor_test_policy[GSCAN_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_vendor.h:93:1: error: 'wifi_vendor_test_policy' defined but not used [-Werror=unused-const-variable=]
93 | wifi_vendor_test_policy[WIFI_SUBCMD_MAX + 1] = {
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_kal.h:543,
from drivers/misc/mediatek/connectivity/wlan/gen2/os/linux/include/gl_os.h:594,
from drivers/misc/mediatek/connectivity/wlan/gen2/include/precomp.h:171,
from drivers/misc/mediatek/connectivity/wlan/gen2/nic/nic.c:637:
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:935:21: error: 'aucRateTableSize' defined but not used [-Werror=unused-const-variable=]
935 | static const UINT_8 aucRateTableSize[PREAMBLE_OPTION_NUM] = {
| ^~~~~~~~~~~~~~~~
>> drivers/misc/mediatek/connectivity/wlan/gen2/include/nic/wlan_def.h:878:21: error: 'aucRateIndex2RateCode' defined but not used [-Werror=unused-const-variable=]
878 | static const UINT_8 aucRateIndex2RateCode[PREAMBLE_OPTION_NUM][RATE_NUM] = {
| ^~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
..
vim +/wmt_detect_write +75 drivers/misc/mediatek/connectivity/common/common_detect/wmt_detect.c
1d4087fef69d21 Frank Wunderlich 2020-06-15 74
1d4087fef69d21 Frank Wunderlich 2020-06-15 @75 ssize_t wmt_detect_write(struct file *filp, const char __user *buf, size_t count, loff_t *f_pos)
1d4087fef69d21 Frank Wunderlich 2020-06-15 76 {
1d4087fef69d21 Frank Wunderlich 2020-06-15 77 WMT_DETECT_INFO_FUNC(" ++\n");
1d4087fef69d21 Frank Wunderlich 2020-06-15 78 WMT_DETECT_INFO_FUNC(" --\n");
1d4087fef69d21 Frank Wunderlich 2020-06-15 79
1d4087fef69d21 Frank Wunderlich 2020-06-15 80 return 0;
1d4087fef69d21 Frank Wunderlich 2020-06-15 81 }
1d4087fef69d21 Frank Wunderlich 2020-06-15 82
:::::: The code at line 75 was first introduced by commit
:::::: 1d4087fef69d21eeb0bdb3f34b978298f6609d91 mt6625l: add driver-folder from 5.7
:::::: TO: Frank Wunderlich <frank-w(a)public-files.de>
:::::: CC: Frank Wunderlich <linux(a)fw-web.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/scsi/mpt3sas/mpt3sas_ctl.c:1900 _ctl_diag_register() warn: potential spectre issue 'ioc->diag_buffer_status'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: a8a6cbcd038de4ee3722c17edd7a4d84ce423f7d scsi: mpt3sas: Add app owned flag support for diag buffer
date: 11 months ago
config: parisc-randconfig-m031-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
New smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_ctl.c:1900 _ctl_diag_register() warn: potential spectre issue 'ioc->diag_buffer_status' [w]
Old smatch warnings:
drivers/scsi/mpt3sas/mpt3sas_ctl.c:701 _ctl_do_mpt_command() error: copy_from_user() 'mpi_request' too small (65535 vs 4294967292)
drivers/scsi/mpt3sas/mpt3sas_ctl.c:1812 mpt3sas_enable_diag_buffer() warn: inconsistent indenting
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2042 _ctl_diag_query() warn: potential spectre issue 'ioc->diag_buffer' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2043 _ctl_diag_query() warn: possible spectre second half. 'request_data'
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2067 _ctl_diag_query() warn: potential spectre issue 'ioc->product_specific' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2069 _ctl_diag_query() warn: potential spectre issue 'ioc->diag_buffer_sz' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2071 _ctl_diag_query() warn: potential spectre issue 'ioc->unique_id' [r]
drivers/scsi/mpt3sas/mpt3sas_ctl.c:2072 _ctl_diag_query() warn: potential spectre issue 'ioc->diagnostic_flags' [r]
vim +1900 drivers/scsi/mpt3sas/mpt3sas_ctl.c
1875
1876 /**
1877 * _ctl_diag_register - application register with driver
1878 * @ioc: per adapter object
1879 * @arg: user space buffer containing ioctl content
1880 *
1881 * This will allow the driver to setup any required buffers that will be
1882 * needed by firmware to communicate with the driver.
1883 */
1884 static long
1885 _ctl_diag_register(struct MPT3SAS_ADAPTER *ioc, void __user *arg)
1886 {
1887 struct mpt3_diag_register karg;
1888 long rc;
1889
1890 if (copy_from_user(&karg, arg, sizeof(karg))) {
1891 pr_err("failure at %s:%d/%s()!\n",
1892 __FILE__, __LINE__, __func__);
1893 return -EFAULT;
1894 }
1895
1896 rc = _ctl_diag_register_2(ioc, &karg);
1897
1898 if (!rc && (ioc->diag_buffer_status[karg.buffer_type] &
1899 MPT3_DIAG_BUFFER_IS_REGISTERED))
> 1900 ioc->diag_buffer_status[karg.buffer_type] |=
1901 MPT3_DIAG_BUFFER_IS_APP_OWNED;
1902
1903 return rc;
1904 }
1905
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 8453/9195] drivers/pinctrl/pinctrl-keembay.c:959:22: sparse: sparse: cast from unknown type
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: be0e9733a9c8b728a733e6d96210e7abbb0d4d5d [8453/9195] pinctrl: Add Intel Keem Bay pinctrl driver
config: nios2-randconfig-s031-20200811 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout be0e9733a9c8b728a733e6d96210e7abbb0d4d5d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/pinctrl/pinctrl-keembay.c:953:20: sparse: sparse: undefined identifier 'pinmux_generic_get_function'
drivers/pinctrl/pinctrl-keembay.c:959:36: sparse: sparse: using member 'data' in incomplete struct function_desc
>> drivers/pinctrl/pinctrl-keembay.c:959:22: sparse: sparse: cast from unknown type
>> drivers/pinctrl/pinctrl-keembay.c:959:20: sparse: sparse: cannot dereference this type
drivers/pinctrl/pinctrl-keembay.c:1268:32: sparse: sparse: undefined identifier 'pinmux_generic_get_function_count'
drivers/pinctrl/pinctrl-keembay.c:1269:32: sparse: sparse: undefined identifier 'pinmux_generic_get_function_name'
drivers/pinctrl/pinctrl-keembay.c:1270:32: sparse: sparse: undefined identifier 'pinmux_generic_get_function_groups'
drivers/pinctrl/pinctrl-keembay.c:1797:71: sparse: sparse: using member 'name' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1807:39: sparse: sparse: using member 'num_group_names' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1808:48: sparse: sparse: using member 'group_names' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1810:34: sparse: sparse: using member 'group_names' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1811:37: sparse: sparse: using member 'group_names' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1815:42: sparse: sparse: using member 'group_names' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1821:35: sparse: sparse: using member 'group_names' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1832:17: sparse: sparse: undefined identifier 'pinmux_generic_add_function'
drivers/pinctrl/pinctrl-keembay.c:1865:36: sparse: sparse: using member 'name' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1866:64: sparse: sparse: using member 'name' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1867:45: sparse: sparse: using member 'num_group_names' in incomplete struct function_desc
>> drivers/pinctrl/pinctrl-keembay.c:1871:37: sparse: sparse: bad argument type for ++/--
drivers/pinctrl/pinctrl-keembay.c:1874:34: sparse: sparse: using member 'name' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1875:37: sparse: sparse: using member 'name' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1876:37: sparse: sparse: using member 'num_group_names' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c:1877:37: sparse: sparse: using member 'data' in incomplete struct function_desc
drivers/pinctrl/pinctrl-keembay.c: note: in included file (through arch/nios2/include/asm/io.h, include/linux/io.h, include/linux/irq.h, ...):
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
vim +959 drivers/pinctrl/pinctrl-keembay.c
936
937 static int keembay_set_mux(struct pinctrl_dev *pctldev,
938 unsigned int func_select,
939 unsigned int group_select)
940 {
941 struct keembay_pinctrl *kpc = pinctrl_dev_get_drvdata(pctldev);
942 struct function_desc *function;
943 struct group_desc *group;
944 unsigned long flags;
945 u8 pin_mode;
946 int pin;
947 u32 reg;
948
949 group = pinctrl_generic_get_group(pctldev, group_select);
950 if (!group)
951 return -EINVAL;
952
953 function = pinmux_generic_get_function(pctldev, func_select);
954 if (!function)
955 return -EINVAL;
956
957 /* Change modes for pins in the selected group */
958 pin = *group->pins;
> 959 pin_mode = *(u8 *)(function->data);
960
961 raw_spin_lock_irqsave(&kpc->lock, flags);
962 reg = read_reg(kpc->base1 + GPIO_MODE, pin);
963 reg &= ~GPIO_MODE_SELECT_MASK;
964 reg |= FIELD_PREP(GPIO_MODE_SELECT_MASK, pin_mode);
965 write_reg(reg, kpc->base1 + GPIO_MODE, pin);
966 raw_spin_unlock_irqrestore(&kpc->lock, flags);
967
968 return 0;
969 }
970
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 206/9195] drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:548:6: warning: variable 'hash' set but not used
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: 6db3546e9e4811b396273585711d79de67ec2707 [206/9195] net: stmmac: Add support for VLAN promiscuous mode
config: parisc-randconfig-r021-20200811 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
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
git checkout 6db3546e9e4811b396273585711d79de67ec2707
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/mm.h:99,
from include/linux/bvec.h:13,
from include/linux/skbuff.h:17,
from include/linux/if_ether.h:19,
from include/uapi/linux/ethtool.h:19,
from include/linux/ethtool.h:18,
from drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:15:
include/asm-generic/pgtable.h: In function 'pte_clear_not_present_full':
arch/parisc/include/asm/pgtable.h:91:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
91 | pte_t old_pte; \
| ^~~~~~~
arch/parisc/include/asm/pgtable.h:316:34: note: in expansion of macro 'set_pte_at'
316 | #define pte_clear(mm, addr, xp) set_pte_at(mm, addr, xp, __pte(0))
| ^~~~~~~~~~
include/asm-generic/pgtable.h:201:2: note: in expansion of macro 'pte_clear'
201 | pte_clear(mm, address, ptep);
| ^~~~~~~~~
include/asm-generic/pgtable.h: In function '__ptep_modify_prot_commit':
arch/parisc/include/asm/pgtable.h:91:9: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
91 | pte_t old_pte; \
| ^~~~~~~
include/asm-generic/pgtable.h:629:2: note: in expansion of macro 'set_pte_at'
629 | set_pte_at(vma->vm_mm, addr, ptep, pte);
| ^~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c: In function 'dwmac4_vlan_promisc_enable':
>> drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c:548:6: warning: variable 'hash' set but not used [-Wunused-but-set-variable]
548 | u32 hash;
| ^~~~
vim +/hash +548 drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
542
543 static void dwmac4_vlan_promisc_enable(struct net_device *dev,
544 struct mac_device_info *hw)
545 {
546 void __iomem *ioaddr = hw->pcsr;
547 u32 value;
> 548 u32 hash;
549 u32 val;
550 int i;
551
552 /* Single Rx VLAN Filter */
553 if (hw->num_vlan == 1) {
554 dwmac4_write_single_vlan(dev, 0);
555 return;
556 }
557
558 /* Extended Rx VLAN Filter Enable */
559 for (i = 0; i < hw->num_vlan; i++) {
560 if (hw->vlan_filter[i] & GMAC_VLAN_TAG_DATA_VEN) {
561 val = hw->vlan_filter[i] & ~GMAC_VLAN_TAG_DATA_VEN;
562 dwmac4_write_vlan_filter(dev, hw, i, val);
563 }
564 }
565
566 hash = readl(ioaddr + GMAC_VLAN_HASH_TABLE);
567 value = readl(ioaddr + GMAC_VLAN_TAG);
568 if (value & GMAC_VLAN_VTHM) {
569 value &= ~GMAC_VLAN_VTHM;
570 writel(value, ioaddr + GMAC_VLAN_TAG);
571 }
572 }
573
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: incorrect type in initializer (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: 670d0a4b10704667765f7d18f7592993d02783aa sparse: use identifiers to define address spaces
date: 8 weeks ago
config: ia64-randconfig-s032-20200811 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout 670d0a4b10704667765f7d18f7592993d02783aa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
>> drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned int [noderef] __user *__pu_ptr @@ got unsigned int [usertype] * @@
>> drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: expected unsigned int [noderef] __user *__pu_ptr
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: got unsigned int [usertype] *
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
drivers/gpu/drm/radeon/radeon_ttm.c:979:21: sparse: sparse: cast removes address space '__user' of expression
drivers/gpu/drm/radeon/radeon_ttm.c: note: in included file (through arch/ia64/include/asm/io.h, arch/ia64/include/asm/smp.h, arch/ia64/include/asm/topology.h, ...):
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
--
>> drivers/gpu/drm/radeon/radeon_fb.c:264:22: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void volatile [noderef] __iomem *s @@ got void *kptr @@
>> drivers/gpu/drm/radeon/radeon_fb.c:264:22: sparse: expected void volatile [noderef] __iomem *s
drivers/gpu/drm/radeon/radeon_fb.c:264:22: sparse: got void *kptr
drivers/gpu/drm/radeon/radeon_fb.c:271:27: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char [noderef] __iomem *screen_base @@ got void *kptr @@
drivers/gpu/drm/radeon/radeon_fb.c:271:27: sparse: expected char [noderef] __iomem *screen_base
drivers/gpu/drm/radeon/radeon_fb.c:271:27: sparse: got void *kptr
vim +979 drivers/gpu/drm/radeon/radeon_ttm.c
771fe6b912fca54 Jerome Glisse 2009-06-05 782
771fe6b912fca54 Jerome Glisse 2009-06-05 @783 int radeon_ttm_init(struct radeon_device *rdev)
771fe6b912fca54 Jerome Glisse 2009-06-05 784 {
771fe6b912fca54 Jerome Glisse 2009-06-05 785 int r;
771fe6b912fca54 Jerome Glisse 2009-06-05 786
771fe6b912fca54 Jerome Glisse 2009-06-05 787 /* No others user of address space so set it to 0 */
771fe6b912fca54 Jerome Glisse 2009-06-05 788 r = ttm_bo_device_init(&rdev->mman.bdev,
44d847b7439bdea David Herrmann 2013-08-13 789 &radeon_bo_driver,
44d847b7439bdea David Herrmann 2013-08-13 790 rdev->ddev->anon_inode->i_mapping,
8b53e1cb2728b63 Gerd Hoffmann 2019-09-05 791 rdev->ddev->vma_offset_manager,
33b3ad3788aba84 Christoph Hellwig 2019-08-15 792 dma_addressing_limited(&rdev->pdev->dev));
771fe6b912fca54 Jerome Glisse 2009-06-05 793 if (r) {
771fe6b912fca54 Jerome Glisse 2009-06-05 794 DRM_ERROR("failed initializing buffer object driver(%d).\n", r);
771fe6b912fca54 Jerome Glisse 2009-06-05 795 return r;
771fe6b912fca54 Jerome Glisse 2009-06-05 796 }
0a0c7596c643239 Jerome Glisse 2009-12-11 797 rdev->mman.initialized = true;
4c7886791264f03 Jerome Glisse 2009-11-20 798 r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_VRAM,
312ea8da049a183 Jerome Glisse 2009-12-07 799 rdev->mc.real_vram_size >> PAGE_SHIFT);
771fe6b912fca54 Jerome Glisse 2009-06-05 800 if (r) {
771fe6b912fca54 Jerome Glisse 2009-06-05 801 DRM_ERROR("Failed initializing VRAM heap.\n");
771fe6b912fca54 Jerome Glisse 2009-06-05 802 return r;
771fe6b912fca54 Jerome Glisse 2009-06-05 803 }
14eedc32a3c0ec9 Lauri Kasanen 2014-02-28 804 /* Change the size here instead of the init above so only lpfn is affected */
14eedc32a3c0ec9 Lauri Kasanen 2014-02-28 805 radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size);
14eedc32a3c0ec9 Lauri Kasanen 2014-02-28 806
441921d5309cfe0 Daniel Vetter 2011-02-18 807 r = radeon_bo_create(rdev, 256 * 1024, PAGE_SIZE, true,
831b6966a60fe72 Maarten Lankhorst 2014-09-18 808 RADEON_GEM_DOMAIN_VRAM, 0, NULL,
4aa5b92fd48f88f Kent Russell 2017-08-08 809 NULL, &rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse 2009-06-05 810 if (r) {
771fe6b912fca54 Jerome Glisse 2009-06-05 811 return r;
771fe6b912fca54 Jerome Glisse 2009-06-05 812 }
4aa5b92fd48f88f Kent Russell 2017-08-08 813 r = radeon_bo_reserve(rdev->stolen_vga_memory, false);
4c7886791264f03 Jerome Glisse 2009-11-20 814 if (r)
4c7886791264f03 Jerome Glisse 2009-11-20 815 return r;
4aa5b92fd48f88f Kent Russell 2017-08-08 816 r = radeon_bo_pin(rdev->stolen_vga_memory, RADEON_GEM_DOMAIN_VRAM, NULL);
4aa5b92fd48f88f Kent Russell 2017-08-08 817 radeon_bo_unreserve(rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse 2009-06-05 818 if (r) {
4aa5b92fd48f88f Kent Russell 2017-08-08 819 radeon_bo_unref(&rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse 2009-06-05 820 return r;
771fe6b912fca54 Jerome Glisse 2009-06-05 821 }
771fe6b912fca54 Jerome Glisse 2009-06-05 822 DRM_INFO("radeon: %uM of VRAM memory ready\n",
fc986034540102c Niels Ole Salscheider 2013-05-18 823 (unsigned) (rdev->mc.real_vram_size / (1024 * 1024)));
4c7886791264f03 Jerome Glisse 2009-11-20 824 r = ttm_bo_init_mm(&rdev->mman.bdev, TTM_PL_TT,
312ea8da049a183 Jerome Glisse 2009-12-07 825 rdev->mc.gtt_size >> PAGE_SHIFT);
771fe6b912fca54 Jerome Glisse 2009-06-05 826 if (r) {
771fe6b912fca54 Jerome Glisse 2009-06-05 827 DRM_ERROR("Failed initializing GTT heap.\n");
771fe6b912fca54 Jerome Glisse 2009-06-05 828 return r;
771fe6b912fca54 Jerome Glisse 2009-06-05 829 }
771fe6b912fca54 Jerome Glisse 2009-06-05 830 DRM_INFO("radeon: %uM of GTT memory ready.\n",
3ce0a23d2d25318 Jerome Glisse 2009-09-08 831 (unsigned)(rdev->mc.gtt_size / (1024 * 1024)));
fa8a123855e2006 Dave Airlie 2009-08-26 832
fa8a123855e2006 Dave Airlie 2009-08-26 833 r = radeon_ttm_debugfs_init(rdev);
fa8a123855e2006 Dave Airlie 2009-08-26 834 if (r) {
fa8a123855e2006 Dave Airlie 2009-08-26 835 DRM_ERROR("Failed to init debugfs\n");
fa8a123855e2006 Dave Airlie 2009-08-26 836 return r;
fa8a123855e2006 Dave Airlie 2009-08-26 837 }
771fe6b912fca54 Jerome Glisse 2009-06-05 838 return 0;
771fe6b912fca54 Jerome Glisse 2009-06-05 839 }
771fe6b912fca54 Jerome Glisse 2009-06-05 840
771fe6b912fca54 Jerome Glisse 2009-06-05 841 void radeon_ttm_fini(struct radeon_device *rdev)
771fe6b912fca54 Jerome Glisse 2009-06-05 842 {
4c7886791264f03 Jerome Glisse 2009-11-20 843 int r;
4c7886791264f03 Jerome Glisse 2009-11-20 844
0a0c7596c643239 Jerome Glisse 2009-12-11 845 if (!rdev->mman.initialized)
0a0c7596c643239 Jerome Glisse 2009-12-11 846 return;
2014b5694182b54 Christian König 2013-12-18 847 radeon_ttm_debugfs_fini(rdev);
4aa5b92fd48f88f Kent Russell 2017-08-08 848 if (rdev->stolen_vga_memory) {
4aa5b92fd48f88f Kent Russell 2017-08-08 849 r = radeon_bo_reserve(rdev->stolen_vga_memory, false);
4c7886791264f03 Jerome Glisse 2009-11-20 850 if (r == 0) {
4aa5b92fd48f88f Kent Russell 2017-08-08 851 radeon_bo_unpin(rdev->stolen_vga_memory);
4aa5b92fd48f88f Kent Russell 2017-08-08 852 radeon_bo_unreserve(rdev->stolen_vga_memory);
4c7886791264f03 Jerome Glisse 2009-11-20 853 }
4aa5b92fd48f88f Kent Russell 2017-08-08 854 radeon_bo_unref(&rdev->stolen_vga_memory);
771fe6b912fca54 Jerome Glisse 2009-06-05 855 }
771fe6b912fca54 Jerome Glisse 2009-06-05 856 ttm_bo_clean_mm(&rdev->mman.bdev, TTM_PL_VRAM);
771fe6b912fca54 Jerome Glisse 2009-06-05 857 ttm_bo_clean_mm(&rdev->mman.bdev, TTM_PL_TT);
771fe6b912fca54 Jerome Glisse 2009-06-05 858 ttm_bo_device_release(&rdev->mman.bdev);
771fe6b912fca54 Jerome Glisse 2009-06-05 859 radeon_gart_fini(rdev);
0a0c7596c643239 Jerome Glisse 2009-12-11 860 rdev->mman.initialized = false;
771fe6b912fca54 Jerome Glisse 2009-06-05 861 DRM_INFO("radeon: ttm finalized\n");
771fe6b912fca54 Jerome Glisse 2009-06-05 862 }
771fe6b912fca54 Jerome Glisse 2009-06-05 863
5359533801e3dd3 Dave Airlie 2011-03-14 864 /* this should only be called at bootup or when userspace
5359533801e3dd3 Dave Airlie 2011-03-14 865 * isn't running */
5359533801e3dd3 Dave Airlie 2011-03-14 866 void radeon_ttm_set_active_vram_size(struct radeon_device *rdev, u64 size)
5359533801e3dd3 Dave Airlie 2011-03-14 867 {
5359533801e3dd3 Dave Airlie 2011-03-14 868 struct ttm_mem_type_manager *man;
5359533801e3dd3 Dave Airlie 2011-03-14 869
5359533801e3dd3 Dave Airlie 2011-03-14 870 if (!rdev->mman.initialized)
5359533801e3dd3 Dave Airlie 2011-03-14 871 return;
5359533801e3dd3 Dave Airlie 2011-03-14 872
5359533801e3dd3 Dave Airlie 2011-03-14 873 man = &rdev->mman.bdev.man[TTM_PL_VRAM];
5359533801e3dd3 Dave Airlie 2011-03-14 874 /* this just adjusts TTM size idea, which sets lpfn to the correct value */
5359533801e3dd3 Dave Airlie 2011-03-14 875 man->size = size >> PAGE_SHIFT;
5359533801e3dd3 Dave Airlie 2011-03-14 876 }
5359533801e3dd3 Dave Airlie 2011-03-14 877
2bfb0b678e48dee Souptick Joarder 2018-04-16 878 static vm_fault_t radeon_ttm_fault(struct vm_fault *vmf)
771fe6b912fca54 Jerome Glisse 2009-06-05 879 {
771fe6b912fca54 Jerome Glisse 2009-06-05 880 struct ttm_buffer_object *bo;
5876dd249e8e47c Matthew Garrett 2010-04-26 881 struct radeon_device *rdev;
2bfb0b678e48dee Souptick Joarder 2018-04-16 882 vm_fault_t ret;
771fe6b912fca54 Jerome Glisse 2009-06-05 883
11bac80004499ea Dave Jiang 2017-02-24 884 bo = (struct ttm_buffer_object *)vmf->vma->vm_private_data;
165d3448a1a0e86 Christian König 2019-09-27 885 if (bo == NULL)
771fe6b912fca54 Jerome Glisse 2009-06-05 886 return VM_FAULT_NOPAGE;
165d3448a1a0e86 Christian König 2019-09-27 887
5876dd249e8e47c Matthew Garrett 2010-04-26 888 rdev = radeon_get_rdev(bo->bdev);
db7fce3983ad9b3 Christian König 2012-05-11 889 down_read(&rdev->pm.mclk_lock);
165d3448a1a0e86 Christian König 2019-09-27 890 ret = ttm_bo_vm_fault(vmf);
db7fce3983ad9b3 Christian König 2012-05-11 891 up_read(&rdev->pm.mclk_lock);
2bfb0b678e48dee Souptick Joarder 2018-04-16 892 return ret;
771fe6b912fca54 Jerome Glisse 2009-06-05 893 }
771fe6b912fca54 Jerome Glisse 2009-06-05 894
165d3448a1a0e86 Christian König 2019-09-27 895 static struct vm_operations_struct radeon_ttm_vm_ops = {
165d3448a1a0e86 Christian König 2019-09-27 896 .fault = radeon_ttm_fault,
165d3448a1a0e86 Christian König 2019-09-27 897 .open = ttm_bo_vm_open,
165d3448a1a0e86 Christian König 2019-09-27 898 .close = ttm_bo_vm_close,
165d3448a1a0e86 Christian König 2019-09-27 899 .access = ttm_bo_vm_access
165d3448a1a0e86 Christian König 2019-09-27 900 };
165d3448a1a0e86 Christian König 2019-09-27 901
771fe6b912fca54 Jerome Glisse 2009-06-05 902 int radeon_mmap(struct file *filp, struct vm_area_struct *vma)
771fe6b912fca54 Jerome Glisse 2009-06-05 903 {
771fe6b912fca54 Jerome Glisse 2009-06-05 904 int r;
bed2dd84212eb01 Thomas Zimmermann 2019-02-07 905 struct drm_file *file_priv = filp->private_data;
bed2dd84212eb01 Thomas Zimmermann 2019-02-07 906 struct radeon_device *rdev = file_priv->minor->dev->dev_private;
771fe6b912fca54 Jerome Glisse 2009-06-05 907
165d3448a1a0e86 Christian König 2019-09-27 908 if (rdev == NULL)
771fe6b912fca54 Jerome Glisse 2009-06-05 909 return -EINVAL;
165d3448a1a0e86 Christian König 2019-09-27 910
771fe6b912fca54 Jerome Glisse 2009-06-05 911 r = ttm_bo_mmap(filp, vma, &rdev->mman.bdev);
165d3448a1a0e86 Christian König 2019-09-27 912 if (unlikely(r != 0))
771fe6b912fca54 Jerome Glisse 2009-06-05 913 return r;
165d3448a1a0e86 Christian König 2019-09-27 914
771fe6b912fca54 Jerome Glisse 2009-06-05 915 vma->vm_ops = &radeon_ttm_vm_ops;
771fe6b912fca54 Jerome Glisse 2009-06-05 916 return 0;
771fe6b912fca54 Jerome Glisse 2009-06-05 917 }
771fe6b912fca54 Jerome Glisse 2009-06-05 918
fa8a123855e2006 Dave Airlie 2009-08-26 919 #if defined(CONFIG_DEBUG_FS)
893d6e6e122386d Christian König 2013-12-12 920
fa8a123855e2006 Dave Airlie 2009-08-26 921 static int radeon_mm_dump_table(struct seq_file *m, void *data)
fa8a123855e2006 Dave Airlie 2009-08-26 922 {
fa8a123855e2006 Dave Airlie 2009-08-26 923 struct drm_info_node *node = (struct drm_info_node *)m->private;
893d6e6e122386d Christian König 2013-12-12 924 unsigned ttm_pl = *(int*)node->info_ent->data;
fa8a123855e2006 Dave Airlie 2009-08-26 925 struct drm_device *dev = node->minor->dev;
fa8a123855e2006 Dave Airlie 2009-08-26 926 struct radeon_device *rdev = dev->dev_private;
bbbb29efa20d552 Christian König 2017-08-07 927 struct ttm_mem_type_manager *man = &rdev->mman.bdev.man[ttm_pl];
b5c3714fe878974 Daniel Vetter 2016-12-29 928 struct drm_printer p = drm_seq_file_printer(m);
fa8a123855e2006 Dave Airlie 2009-08-26 929
bbbb29efa20d552 Christian König 2017-08-07 930 man->func->debug(man, &p);
b5c3714fe878974 Daniel Vetter 2016-12-29 931 return 0;
fa8a123855e2006 Dave Airlie 2009-08-26 932 }
893d6e6e122386d Christian König 2013-12-12 933
bbbb29efa20d552 Christian König 2017-08-07 934
893d6e6e122386d Christian König 2013-12-12 935 static int ttm_pl_vram = TTM_PL_VRAM;
893d6e6e122386d Christian König 2013-12-12 936 static int ttm_pl_tt = TTM_PL_TT;
893d6e6e122386d Christian König 2013-12-12 937
893d6e6e122386d Christian König 2013-12-12 938 static struct drm_info_list radeon_ttm_debugfs_list[] = {
893d6e6e122386d Christian König 2013-12-12 939 {"radeon_vram_mm", radeon_mm_dump_table, 0, &ttm_pl_vram},
893d6e6e122386d Christian König 2013-12-12 940 {"radeon_gtt_mm", radeon_mm_dump_table, 0, &ttm_pl_tt},
893d6e6e122386d Christian König 2013-12-12 941 {"ttm_page_pool", ttm_page_alloc_debugfs, 0, NULL},
893d6e6e122386d Christian König 2013-12-12 942 #ifdef CONFIG_SWIOTLB
893d6e6e122386d Christian König 2013-12-12 943 {"ttm_dma_page_pool", ttm_dma_page_alloc_debugfs, 0, NULL}
893d6e6e122386d Christian König 2013-12-12 944 #endif
893d6e6e122386d Christian König 2013-12-12 945 };
893d6e6e122386d Christian König 2013-12-12 946
2014b5694182b54 Christian König 2013-12-18 947 static int radeon_ttm_vram_open(struct inode *inode, struct file *filep)
2014b5694182b54 Christian König 2013-12-18 948 {
2014b5694182b54 Christian König 2013-12-18 949 struct radeon_device *rdev = inode->i_private;
2014b5694182b54 Christian König 2013-12-18 950 i_size_write(inode, rdev->mc.mc_vram_size);
2014b5694182b54 Christian König 2013-12-18 951 filep->private_data = inode->i_private;
2014b5694182b54 Christian König 2013-12-18 952 return 0;
2014b5694182b54 Christian König 2013-12-18 953 }
2014b5694182b54 Christian König 2013-12-18 954
2014b5694182b54 Christian König 2013-12-18 955 static ssize_t radeon_ttm_vram_read(struct file *f, char __user *buf,
2014b5694182b54 Christian König 2013-12-18 956 size_t size, loff_t *pos)
2014b5694182b54 Christian König 2013-12-18 957 {
2014b5694182b54 Christian König 2013-12-18 958 struct radeon_device *rdev = f->private_data;
2014b5694182b54 Christian König 2013-12-18 959 ssize_t result = 0;
2014b5694182b54 Christian König 2013-12-18 960 int r;
2014b5694182b54 Christian König 2013-12-18 961
2014b5694182b54 Christian König 2013-12-18 962 if (size & 0x3 || *pos & 0x3)
2014b5694182b54 Christian König 2013-12-18 963 return -EINVAL;
2014b5694182b54 Christian König 2013-12-18 964
2014b5694182b54 Christian König 2013-12-18 965 while (size) {
2014b5694182b54 Christian König 2013-12-18 966 unsigned long flags;
2014b5694182b54 Christian König 2013-12-18 967 uint32_t value;
2014b5694182b54 Christian König 2013-12-18 968
2014b5694182b54 Christian König 2013-12-18 969 if (*pos >= rdev->mc.mc_vram_size)
2014b5694182b54 Christian König 2013-12-18 970 return result;
2014b5694182b54 Christian König 2013-12-18 971
2014b5694182b54 Christian König 2013-12-18 972 spin_lock_irqsave(&rdev->mmio_idx_lock, flags);
2014b5694182b54 Christian König 2013-12-18 973 WREG32(RADEON_MM_INDEX, ((uint32_t)*pos) | 0x80000000);
2014b5694182b54 Christian König 2013-12-18 974 if (rdev->family >= CHIP_CEDAR)
2014b5694182b54 Christian König 2013-12-18 975 WREG32(EVERGREEN_MM_INDEX_HI, *pos >> 31);
2014b5694182b54 Christian König 2013-12-18 976 value = RREG32(RADEON_MM_DATA);
2014b5694182b54 Christian König 2013-12-18 977 spin_unlock_irqrestore(&rdev->mmio_idx_lock, flags);
2014b5694182b54 Christian König 2013-12-18 978
2014b5694182b54 Christian König 2013-12-18 @979 r = put_user(value, (uint32_t *)buf);
2014b5694182b54 Christian König 2013-12-18 980 if (r)
2014b5694182b54 Christian König 2013-12-18 981 return r;
2014b5694182b54 Christian König 2013-12-18 982
2014b5694182b54 Christian König 2013-12-18 983 result += 4;
2014b5694182b54 Christian König 2013-12-18 984 buf += 4;
2014b5694182b54 Christian König 2013-12-18 985 *pos += 4;
2014b5694182b54 Christian König 2013-12-18 986 size -= 4;
2014b5694182b54 Christian König 2013-12-18 987 }
2014b5694182b54 Christian König 2013-12-18 988
2014b5694182b54 Christian König 2013-12-18 989 return result;
2014b5694182b54 Christian König 2013-12-18 990 }
2014b5694182b54 Christian König 2013-12-18 991
:::::: The code at line 979 was first introduced by commit
:::::: 2014b5694182b54c781b93d26ec993f8a12bca01 drm/radeon: add VRAM debugfs access v3
:::::: TO: Christian König <christian.koenig(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[intel-linux-intel-lts:5.4/yocto 8353/9195] drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:53: sparse: sparse: shift too big (32) for type unsigned long
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: 87241c08286384feb3ddc57d4cb0daca4be1e384
commit: 846425f0c049b2d0507497b19ad7ccf0d07f0baa [8353/9195] crypto: keembay: Add Keem Bay OCS HCU
config: nios2-randconfig-s031-20200811 (attached as .config)
compiler: nios2-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
git checkout 846425f0c049b2d0507497b19ad7ccf0d07f0baa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/crypto/keembay/keembay-ocs-hcu-core.c:218:31: sparse: sparse: Using plain integer as NULL pointer
drivers/crypto/keembay/keembay-ocs-hcu-core.c:219:31: sparse: sparse: Using plain integer as NULL pointer
drivers/crypto/keembay/keembay-ocs-hcu-core.c:749:31: sparse: sparse: Using plain integer as NULL pointer
drivers/crypto/keembay/keembay-ocs-hcu-core.c:750:31: sparse: sparse: Using plain integer as NULL pointer
>> drivers/crypto/keembay/keembay-ocs-hcu-core.c:226:53: sparse: sparse: shift too big (32) for type unsigned long
--
drivers/crypto/keembay/ocs-hcu.c: note: in included file (through arch/nios2/include/asm/io.h, include/linux/io.h, include/linux/irq.h):
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
>> drivers/crypto/keembay/ocs-hcu.c:389:29: sparse: sparse: shift too big (32) for type unsigned long
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:179:15: sparse: sparse: cast to restricted __le32
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
include/asm-generic/io.h:225:22: sparse: sparse: incorrect type in argument 1 (different base types) @@ expected unsigned int [usertype] value @@ got restricted __le32 [usertype] @@
include/asm-generic/io.h:225:22: sparse: expected unsigned int [usertype] value
include/asm-generic/io.h:225:22: sparse: got restricted __le32 [usertype]
vim +226 drivers/crypto/keembay/keembay-ocs-hcu-core.c
222
223 static int kmb_ocs_add_dma_tail(struct ocs_hcu_rctx *rctx,
224 dma_addr_t addr, size_t len)
225 {
> 226 if (addr & KMB_OCS_HCU_ALIGN_MASK || addr > OCS_HCU_DMA_MAX_ADDR_MASK)
227 return -EINVAL;
228
229 if (!len)
230 return 0;
231
232 rctx->dma_list_tail->src_adr = (u32)addr;
233 rctx->dma_list_tail->src_len = (u32)len;
234 rctx->dma_list_tail->ll_flags = 0;
235 rctx->dma_list_tail->nxt_desc = rctx->ll_dma_addr +
236 (virt_to_phys(rctx->dma_list_tail) -
237 virt_to_phys(rctx->dma_list_head)) +
238 sizeof(*rctx->dma_list_tail);
239
240 rctx->dma_list_tail++;
241
242 return 0;
243 }
244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[android-goldfish:android-4.14-q 10/11] drivers/block/loop.c:1069:18: warning: Local variable bsize shadows outer variable
by kernel test robot
tree: https://android.googlesource.com/kernel/goldfish android-4.14-q
head: bf6d4fcf969de4bc7913b6d1343340ab68a9f2b8
commit: 2061c5856b6886554f01cce8b96b8f1595695e98 [10/11] BACKPORT: loop: Add LOOP_CONFIGURE ioctl
compiler: hppa-linux-gcc (GCC) 7.5.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
drivers/block/loop.c:531:8: warning: Variable 'bvec' is reassigned a value before the old one has been used. [redundantAssignment]
bvec = cmd->bvec;
^
drivers/block/loop.c:529:8: note: Variable 'bvec' is reassigned a value before the old one has been used.
bvec++;
^
drivers/block/loop.c:531:8: note: Variable 'bvec' is reassigned a value before the old one has been used.
bvec = cmd->bvec;
^
drivers/block/loop.c:693:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = -EINVAL;
^
drivers/block/loop.c:688:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -ENXIO;
^
drivers/block/loop.c:693:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EINVAL;
^
drivers/block/loop.c:697:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = -EBADF;
^
drivers/block/loop.c:693:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EINVAL;
^
drivers/block/loop.c:697:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EBADF;
^
drivers/block/loop.c:702:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = loop_validate_file(file, bdev);
^
drivers/block/loop.c:697:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EBADF;
^
drivers/block/loop.c:702:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = loop_validate_file(file, bdev);
^
drivers/block/loop.c:1018:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = -EBUSY;
^
drivers/block/loop.c:1013:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EBADF;
^
drivers/block/loop.c:1018:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EBUSY;
^
drivers/block/loop.c:1022:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = loop_validate_file(file, bdev);
^
drivers/block/loop.c:1018:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EBUSY;
^
drivers/block/loop.c:1022:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = loop_validate_file(file, bdev);
^
drivers/block/loop.c:1435:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = -EINVAL;
^
drivers/block/loop.c:1428:0: note: Variable 'error' is reassigned a value before the old one has been used.
int error = -ENXIO;
^
drivers/block/loop.c:1435:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -EINVAL;
^
drivers/block/loop.c:1919:7: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = idr_alloc(&loop_index_idr, lo, i, i + 1, GFP_KERNEL);
^
drivers/block/loop.c:1910:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOMEM;
^
drivers/block/loop.c:1919:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = idr_alloc(&loop_index_idr, lo, i, i + 1, GFP_KERNEL);
^
drivers/block/loop.c:1938:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = blk_mq_alloc_tag_set(&lo->tag_set);
^
drivers/block/loop.c:1929:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOMEM;
^
drivers/block/loop.c:1938:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = blk_mq_alloc_tag_set(&lo->tag_set);
^
drivers/block/loop.c:511:23: warning: Local variable iter shadows outer variable [shadowVar]
struct req_iterator iter;
^
drivers/block/loop.c:501:18: note: Shadowed declaration
struct iov_iter iter;
^
drivers/block/loop.c:511:23: note: Shadow variable
struct req_iterator iter;
^
>> drivers/block/loop.c:1069:18: warning: Local variable bsize shadows outer variable [shadowVar]
unsigned short bsize = bdev_logical_block_size(
^
drivers/block/loop.c:1008:17: note: Shadowed declaration
unsigned short bsize;
^
drivers/block/loop.c:1069:18: note: Shadow variable
unsigned short bsize = bdev_logical_block_size(
^
vim +1069 drivers/block/loop.c
e25cf72f82f02a Martijn Coenen 2020-05-13 998
2061c5856b6886 Martijn Coenen 2020-05-13 999 static int loop_configure(struct loop_device *lo, fmode_t mode,
2061c5856b6886 Martijn Coenen 2020-05-13 1000 struct block_device *bdev,
2061c5856b6886 Martijn Coenen 2020-05-13 1001 const struct loop_config *config)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1002 {
6f9f5797fc7de2 Theodore Ts'o 2018-05-07 1003 struct file *file;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1004 struct inode *inode;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1005 struct address_space *mapping;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1006 int error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1007 loff_t size;
2061c5856b6886 Martijn Coenen 2020-05-13 1008 unsigned short bsize;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1009
^1da177e4c3f41 Linus Torvalds 2005-04-16 1010 /* This is safe, since we have a reference from open(). */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1011 __module_get(THIS_MODULE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1012
^1da177e4c3f41 Linus Torvalds 2005-04-16 1013 error = -EBADF;
2061c5856b6886 Martijn Coenen 2020-05-13 1014 file = fget(config->fd);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1015 if (!file)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1016 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1017
^1da177e4c3f41 Linus Torvalds 2005-04-16 1018 error = -EBUSY;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1019 if (lo->lo_state != Lo_unbound)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1020 goto out_putf;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1021
6f9f5797fc7de2 Theodore Ts'o 2018-05-07 1022 error = loop_validate_file(file, bdev);
6f9f5797fc7de2 Theodore Ts'o 2018-05-07 1023 if (error)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1024 goto out_putf;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1025
^1da177e4c3f41 Linus Torvalds 2005-04-16 1026 mapping = file->f_mapping;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1027 inode = mapping->host;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1028
2061c5856b6886 Martijn Coenen 2020-05-13 1029 size = get_loop_size(lo, file);
2061c5856b6886 Martijn Coenen 2020-05-13 1030
2061c5856b6886 Martijn Coenen 2020-05-13 1031 if ((config->info.lo_flags & ~LOOP_CONFIGURE_SETTABLE_FLAGS) != 0) {
2061c5856b6886 Martijn Coenen 2020-05-13 1032 error = -EINVAL;
2061c5856b6886 Martijn Coenen 2020-05-13 1033 goto out_putf;
2061c5856b6886 Martijn Coenen 2020-05-13 1034 }
2061c5856b6886 Martijn Coenen 2020-05-13 1035
2061c5856b6886 Martijn Coenen 2020-05-13 1036 if (config->block_size) {
2061c5856b6886 Martijn Coenen 2020-05-13 1037 error = loop_validate_block_size(config->block_size);
2061c5856b6886 Martijn Coenen 2020-05-13 1038 if (error)
2061c5856b6886 Martijn Coenen 2020-05-13 1039 goto out_putf;
2061c5856b6886 Martijn Coenen 2020-05-13 1040 }
2061c5856b6886 Martijn Coenen 2020-05-13 1041
2061c5856b6886 Martijn Coenen 2020-05-13 1042 error = loop_set_status_from_info(lo, &config->info);
2061c5856b6886 Martijn Coenen 2020-05-13 1043 if (error)
2061c5856b6886 Martijn Coenen 2020-05-13 1044 goto out_putf;
2061c5856b6886 Martijn Coenen 2020-05-13 1045
456be1484ffc72 Christoph Hellwig 2011-10-17 1046 if (!(file->f_mode & FMODE_WRITE) || !(mode & FMODE_WRITE) ||
283e7e5d249f48 Al Viro 2015-04-03 1047 !file->f_op->write_iter)
2061c5856b6886 Martijn Coenen 2020-05-13 1048 lo->lo_flags |= LO_FLAGS_READ_ONLY;
6e0c4b058649df Martijn Coenen 2020-05-13 1049
e03a3d7a94e248 Ming Lei 2015-08-17 1050 error = loop_prepare_queue(lo);
e03a3d7a94e248 Ming Lei 2015-08-17 1051 if (error)
f4aa4c7bbac6c4 Ming Lei 2015-05-05 1052 goto out_putf;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1053
456be1484ffc72 Christoph Hellwig 2011-10-17 1054 error = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1055
2061c5856b6886 Martijn Coenen 2020-05-13 1056 set_device_ro(bdev, (lo->lo_flags & LO_FLAGS_READ_ONLY) != 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1057
2061c5856b6886 Martijn Coenen 2020-05-13 1058 lo->use_dio = lo->lo_flags & LO_FLAGS_DIRECT_IO;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1059 lo->lo_device = bdev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1060 lo->lo_backing_file = file;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1061 lo->old_gfp_mask = mapping_gfp_mask(mapping);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1062 mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
^1da177e4c3f41 Linus Torvalds 2005-04-16 1063
2061c5856b6886 Martijn Coenen 2020-05-13 1064 if (!(lo->lo_flags & LO_FLAGS_READ_ONLY) && file->f_op->fsync)
21d0727f639e4b Jens Axboe 2016-03-30 1065 blk_queue_write_cache(lo->lo_queue, true, false);
68db1961bbf4e1 Nikanth Karthikesan 2009-03-24 1066
907f2050333a68 Martijn Coenen 2019-09-04 1067 if (io_is_direct(lo->lo_backing_file) && inode->i_sb->s_bdev) {
907f2050333a68 Martijn Coenen 2019-09-04 1068 /* In case of direct I/O, match underlying block size */
907f2050333a68 Martijn Coenen 2019-09-04 @1069 unsigned short bsize = bdev_logical_block_size(
907f2050333a68 Martijn Coenen 2019-09-04 1070 inode->i_sb->s_bdev);
907f2050333a68 Martijn Coenen 2019-09-04 1071
907f2050333a68 Martijn Coenen 2019-09-04 1072 blk_queue_logical_block_size(lo->lo_queue, bsize);
907f2050333a68 Martijn Coenen 2019-09-04 1073 blk_queue_physical_block_size(lo->lo_queue, bsize);
907f2050333a68 Martijn Coenen 2019-09-04 1074 blk_queue_io_min(lo->lo_queue, bsize);
907f2050333a68 Martijn Coenen 2019-09-04 1075 }
907f2050333a68 Martijn Coenen 2019-09-04 1076
2e5ab5f379f96a Ming Lei 2015-08-17 1077 loop_update_dio(lo);
ee86273062cbb3 Milan Broz 2010-08-23 1078 loop_sysfs_init(lo);
88bd1b944fabf6 Martijn Coenen 2020-05-13 1079 loop_set_size(lo, size);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1080
2061c5856b6886 Martijn Coenen 2020-05-13 1081 if (config->block_size)
2061c5856b6886 Martijn Coenen 2020-05-13 1082 bsize = config->block_size;
2061c5856b6886 Martijn Coenen 2020-05-13 1083 else
2061c5856b6886 Martijn Coenen 2020-05-13 1084 bsize = S_ISBLK(inode->i_mode) ?
2061c5856b6886 Martijn Coenen 2020-05-13 1085 block_size(inode->i_bdev) : PAGE_SIZE;
2061c5856b6886 Martijn Coenen 2020-05-13 1086
2061c5856b6886 Martijn Coenen 2020-05-13 1087 set_blocksize(bdev, bsize);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1088
6c9979185c7ef4 Serge E. Hallyn 2006-09-29 1089 lo->lo_state = Lo_bound;
e03c8dd14915fa Kay Sievers 2011-08-23 1090 if (part_shift)
e03c8dd14915fa Kay Sievers 2011-08-23 1091 lo->lo_flags |= LO_FLAGS_PARTSCAN;
e03c8dd14915fa Kay Sievers 2011-08-23 1092 if (lo->lo_flags & LO_FLAGS_PARTSCAN)
06f0e9e68c0d81 Ming Lei 2015-05-06 1093 loop_reread_partitions(lo, bdev);
c1681bf8a7b1b9 Anatol Pomozov 2013-04-01 1094
c1681bf8a7b1b9 Anatol Pomozov 2013-04-01 1095 /* Grab the block_device to prevent its destruction after we
c1681bf8a7b1b9 Anatol Pomozov 2013-04-01 1096 * put /dev/loopXX inode. Later in loop_clr_fd() we bdput(bdev).
c1681bf8a7b1b9 Anatol Pomozov 2013-04-01 1097 */
c1681bf8a7b1b9 Anatol Pomozov 2013-04-01 1098 bdgrab(bdev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1099 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1100
^1da177e4c3f41 Linus Torvalds 2005-04-16 1101 out_putf:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1102 fput(file);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1103 out:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1104 /* This is safe: open() is still holding a reference. */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1105 module_put(THIS_MODULE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1106 return error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1107 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1108
:::::: The code at line 1069 was first introduced by commit
:::::: 907f2050333a68ec2166f0b5badb0edd85ef584c BACKPORT: loop: change queue block size to match when using DIO
:::::: TO: Martijn Coenen <maco(a)android.com>
:::::: CC: Martijn Coenen <maco(a)android.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH] net: untag pointer in sockptr_is_kernel
by kernel test robot
Hi Miles,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on linus/master]
[cannot apply to net/master hch-configfs/for-next sparc-next/master v5.8 next-20200811]
[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]
url: https://github.com/0day-ci/linux/commits/Miles-Chen/net-untag-pointer-in-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git bfdd5aaa54b0a44d9df550fe4c9db7e1470a11b8
config: x86_64-randconfig-s022-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-168-g9554805c-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>):
In file included from include/linux/net.h:24,
from net/core/stream.c:18:
include/linux/sockptr.h: In function 'sockptr_is_kernel':
>> include/linux/sockptr.h:23:24: error: implicit declaration of function 'untagged_addr' [-Werror=implicit-function-declaration]
23 | return (unsigned long)untagged_addr(sockptr.kernel) >= TASK_SIZE;
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/net.h:24,
from net/ipv6/ip6_fib.c:20:
include/linux/sockptr.h: In function 'sockptr_is_kernel':
>> include/linux/sockptr.h:23:24: error: implicit declaration of function 'untagged_addr' [-Werror=implicit-function-declaration]
23 | return (unsigned long)untagged_addr(sockptr.kernel) >= TASK_SIZE;
| ^~~~~~~~~~~~~
net/ipv6/ip6_fib.c: In function 'fib6_add':
net/ipv6/ip6_fib.c:1373:25: warning: variable 'pn' set but not used [-Wunused-but-set-variable]
1373 | struct fib6_node *fn, *pn = NULL;
| ^~
cc1: some warnings being treated as errors
--
In file included from include/linux/net.h:24,
from net/ipv6/udp.c:24:
include/linux/sockptr.h: In function 'sockptr_is_kernel':
>> include/linux/sockptr.h:23:24: error: implicit declaration of function 'untagged_addr' [-Werror=implicit-function-declaration]
23 | return (unsigned long)untagged_addr(sockptr.kernel) >= TASK_SIZE;
| ^~~~~~~~~~~~~
net/ipv6/udp.c: At top level:
net/ipv6/udp.c:1029:30: warning: no previous prototype for 'udp_v6_early_demux' [-Wmissing-prototypes]
1029 | INDIRECT_CALLABLE_SCOPE void udp_v6_early_demux(struct sk_buff *skb)
| ^~~~~~~~~~~~~~~~~~
net/ipv6/udp.c:1070:29: warning: no previous prototype for 'udpv6_rcv' [-Wmissing-prototypes]
1070 | INDIRECT_CALLABLE_SCOPE int udpv6_rcv(struct sk_buff *skb)
| ^~~~~~~~~
cc1: some warnings being treated as errors
vim +/untagged_addr +23 include/linux/sockptr.h
20
21 static inline bool sockptr_is_kernel(sockptr_t sockptr)
22 {
> 23 return (unsigned long)untagged_addr(sockptr.kernel) >= TASK_SIZE;
24 }
25
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8541cds.dtb.dts.tmp: No such file or directory
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 00e4db51259a5f936fec1424b884f029479d3981
commit: cc8a51ca6f05ade72f7dd2624bc5f9b948e216fc kbuild: always create directories of targets
date: 2 days ago
config: powerpc-randconfig-c004-20200811 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
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
git checkout cc8a51ca6f05ade72f7dd2624bc5f9b948e216fc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
>> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8541cds.dtb.dts.tmp: No such file or directory
compilation terminated.
--
>> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8548cds_32b.dtb.dts.tmp: No such file or directory
compilation terminated.
--
>> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8555cds.dtb.dts.tmp: No such file or directory
compilation terminated.
--
>> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8568mds.dtb.dts.tmp: No such file or directory
compilation terminated.
--
>> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8544ds.dtb.dts.tmp: No such file or directory
compilation terminated.
--
>> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8572ds.dtb.dts.tmp: No such file or directory
compilation terminated.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month