[drm-drm-misc:drm-misc-next 1/2] drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:387:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE'
by kernel test robot
tree: git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
head: 13b0d4a9ae0c2d650993c48be797992eaf621332
commit: ed7d94597fad747ff0be4a0045da79e7ddd6eba0 [1/2] drm/hisilicon: Remove the unused include statements
config: arm64-randconfig-r005-20200811 (attached as .config)
compiler: aarch64-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 ed7d94597fad747ff0be4a0045da79e7ddd6eba0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/device.h:31,
from include/linux/pci.h:37,
from drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:14:
include/linux/device/driver.h:263:1: warning: data definition has no type or storage class
263 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/pci.h:1388:2: note: in expansion of macro 'module_driver'
1388 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
| ^~~~~~~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: note: in expansion of macro 'module_pci_driver'
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~~
>> include/linux/device/driver.h:263:1: error: type defaults to 'int' in declaration of 'module_init' [-Werror=implicit-int]
263 | module_init(__driver##_init); \
| ^~~~~~~~~~~
include/linux/pci.h:1388:2: note: in expansion of macro 'module_driver'
1388 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
| ^~~~~~~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: note: in expansion of macro 'module_pci_driver'
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: warning: parameter names (without types) in function declaration
In file included from include/linux/device.h:31,
from include/linux/pci.h:37,
from drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:14:
include/linux/device/driver.h:268:1: warning: data definition has no type or storage class
268 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/pci.h:1388:2: note: in expansion of macro 'module_driver'
1388 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
| ^~~~~~~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: note: in expansion of macro 'module_pci_driver'
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~~
>> include/linux/device/driver.h:268:1: error: type defaults to 'int' in declaration of 'module_exit' [-Werror=implicit-int]
268 | module_exit(__driver##_exit);
| ^~~~~~~~~~~
include/linux/pci.h:1388:2: note: in expansion of macro 'module_driver'
1388 | module_driver(__pci_driver, pci_register_driver, pci_unregister_driver)
| ^~~~~~~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: note: in expansion of macro 'module_pci_driver'
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: warning: parameter names (without types) in function declaration
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:387:1: warning: data definition has no type or storage class
387 | MODULE_DEVICE_TABLE(pci, hibmc_pci_table);
| ^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:387:1: error: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Werror=implicit-int]
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:387:1: warning: parameter names (without types) in function declaration
>> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:388:15: error: expected declaration specifiers or '...' before string constant
388 | MODULE_AUTHOR("RongrongZou <zourongrong(a)huawei.com>");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:389:20: error: expected declaration specifiers or '...' before string constant
389 | MODULE_DESCRIPTION("DRM Driver for Hisilicon Hibmc");
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:390:16: error: expected declaration specifiers or '...' before string constant
390 | MODULE_LICENSE("GPL v2");
| ^~~~~~~~
In file included from include/linux/device.h:31,
from include/linux/pci.h:37,
from drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:14:
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:19: warning: 'hibmc_pci_driver_exit' defined but not used [-Wunused-function]
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~
include/linux/device/driver.h:264:20: note: in definition of macro 'module_driver'
264 | static void __exit __driver##_exit(void) \
| ^~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: note: in expansion of macro 'module_pci_driver'
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:19: warning: 'hibmc_pci_driver_init' defined but not used [-Wunused-function]
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~
include/linux/device/driver.h:259:19: note: in definition of macro 'module_driver'
259 | static int __init __driver##_init(void) \
| ^~~~~~~~
drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c:385:1: note: in expansion of macro 'module_pci_driver'
385 | module_pci_driver(hibmc_pci_driver);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +387 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c
5e0df3a08f3d174 Rongrong Zou 2016-11-16 384
4f1a7007d688a79 YueHaibing 2018-04-21 @385 module_pci_driver(hibmc_pci_driver);
5e0df3a08f3d174 Rongrong Zou 2016-11-16 386
5e0df3a08f3d174 Rongrong Zou 2016-11-16 @387 MODULE_DEVICE_TABLE(pci, hibmc_pci_table);
5e0df3a08f3d174 Rongrong Zou 2016-11-16 @388 MODULE_AUTHOR("RongrongZou <zourongrong(a)huawei.com>");
:::::: The code at line 387 was first introduced by commit
:::::: 5e0df3a08f3d17485a5081634902424c6834e001 drm/hisilicon/hibmc: Add hisilicon hibmc drm master driver
:::::: TO: Rongrong Zou <zourongrong(a)gmail.com>
:::::: CC: Rongrong Zou <zourongrong(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/md/dm-clone-metadata.c:781:4: warning: Variable 'r' is reassigned a value before the old one has been used.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7c2a69f610e64c8dec6a06a66e721f4ce1dd783a
commit: 7431b7835f554f8608b415a02cf3c3f086309e02 dm: add clone target
date: 11 months ago
compiler: sparc-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>
cppcheck warnings: (new ones prefixed by >>)
>> fs/gfs2/xattr.c:884:9: warning: Identical condition 'error', second condition is always false [identicalConditionAfterEarlyExit]
return error;
^
fs/gfs2/xattr.c:867:6: note: first condition
if (error)
^
fs/gfs2/xattr.c:884:9: note: second condition
return error;
^
fs/gfs2/xattr.c:1103:9: warning: Identical condition 'error', second condition is always false [identicalConditionAfterEarlyExit]
return error;
^
fs/gfs2/xattr.c:1081:6: note: first condition
if (error)
^
fs/gfs2/xattr.c:1103:9: note: second condition
return error;
^
>> fs/gfs2/xattr.c:543:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = gfs2_ea_get_copy(ip, &el, data, len);
^
fs/gfs2/xattr.c:539:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -ENOMEM;
^
fs/gfs2/xattr.c:543:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = gfs2_ea_get_copy(ip, &el, data, len);
^
>> fs/minix/namei.c:159:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = minix_delete_entry(de, page);
^
fs/minix/namei.c:150:0: note: Variable 'err' is reassigned a value before the old one has been used.
int err = -ENOENT;
^
fs/minix/namei.c:159:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = minix_delete_entry(de, page);
^
fs/minix/namei.c:214:7: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = -ENOTEMPTY;
^
fs/minix/namei.c:194:0: note: Variable 'err' is reassigned a value before the old one has been used.
int err = -ENOENT;
^
fs/minix/namei.c:214:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOTEMPTY;
^
fs/minix/namei.c:214:7: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = -ENOTEMPTY;
^
fs/minix/namei.c:204:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -EIO;
^
fs/minix/namei.c:214:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOTEMPTY;
^
fs/minix/namei.c:218:7: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = -ENOENT;
^
fs/minix/namei.c:214:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOTEMPTY;
^
fs/minix/namei.c:218:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOENT;
^
--
>> fs/jffs2/wbuf.c:934:9: warning: Uninitialized variable: ret [uninitvar]
return ret;
^
fs/jffs2/wbuf.c:653:10: warning: Uninitialized variable: ret [uninitvar]
return ret;
^
>> fs/minix/inode.c:286:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = -ENOMEM;
^
fs/minix/inode.c:162:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -EINVAL;
^
fs/minix/inode.c:286:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = -ENOMEM;
^
>> fs/minix/dir.c:99:34: warning: Variable 'offset' is reassigned a value before the old one has been used. [redundantAssignment]
for ( ; n < npages; n++, offset = 0) {
^
fs/minix/dir.c:96:9: note: Variable 'offset' is reassigned a value before the old one has been used.
offset = pos & ~PAGE_MASK;
^
fs/minix/dir.c:99:34: note: Variable 'offset' is reassigned a value before the old one has been used.
for ( ; n < npages; n++, offset = 0) {
^
>> fs/gfs2/main.c:146:8: warning: Variable 'error' is reassigned a value before the old one has been used. [redundantAssignment]
error = register_shrinker(&gfs2_qd_shrinker);
^
fs/gfs2/main.c:97:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = -ENOMEM;
^
fs/gfs2/main.c:146:8: note: Variable 'error' is reassigned a value before the old one has been used.
error = register_shrinker(&gfs2_qd_shrinker);
^
--
>> fs/qnx6/dir.c:127:42: warning: Variable 'start' is reassigned a value before the old one has been used. [redundantAssignment]
for ( ; !done && n < npages; n++, start = 0) {
^
fs/qnx6/dir.c:120:0: note: Variable 'start' is reassigned a value before the old one has been used.
unsigned start = (pos & ~PAGE_MASK) / QNX6_DIR_ENTRY_SIZE;
^
fs/qnx6/dir.c:127:42: note: Variable 'start' is reassigned a value before the old one has been used.
for ( ; !done && n < npages; n++, start = 0) {
^
--
>> fs/sysv/balloc.c:128:12: warning: Local variable count shadows outer variable [shadowVar]
unsigned count;
^
fs/sysv/balloc.c:106:11: note: Shadowed declaration
unsigned count;
^
fs/sysv/balloc.c:128:12: note: Shadow variable
unsigned count;
^
--
>> fs/sysv/dir.c:80:34: warning: Variable 'offset' is reassigned a value before the old one has been used. [redundantAssignment]
for ( ; n < npages; n++, offset = 0) {
^
fs/sysv/dir.c:77:9: note: Variable 'offset' is reassigned a value before the old one has been used.
offset = pos & ~PAGE_MASK;
^
fs/sysv/dir.c:80:34: note: Variable 'offset' is reassigned a value before the old one has been used.
for ( ; n < npages; n++, offset = 0) {
^
>> fs/sysv/namei.c:79:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = PTR_ERR(inode);
^
fs/sysv/namei.c:71:0: note: Variable 'err' is reassigned a value before the old one has been used.
int err = -ENAMETOOLONG;
^
fs/sysv/namei.c:79:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = PTR_ERR(inode);
^
fs/sysv/namei.c:84:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = page_symlink(inode, symname, l);
^
fs/sysv/namei.c:79:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = PTR_ERR(inode);
^
fs/sysv/namei.c:84:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = page_symlink(inode, symname, l);
^
fs/sysv/namei.c:127:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = sysv_make_empty(inode, dir);
^
fs/sysv/namei.c:119:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = PTR_ERR(inode);
^
fs/sysv/namei.c:127:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = sysv_make_empty(inode, dir);
^
fs/sysv/namei.c:159:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = sysv_delete_entry (de, page);
^
fs/sysv/namei.c:153:0: note: Variable 'err' is reassigned a value before the old one has been used.
int err = -ENOENT;
^
fs/sysv/namei.c:159:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = sysv_delete_entry (de, page);
^
fs/sysv/namei.c:219:7: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = -ENOTEMPTY;
^
fs/sysv/namei.c:199:0: note: Variable 'err' is reassigned a value before the old one has been used.
int err = -ENOENT;
^
fs/sysv/namei.c:219:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOTEMPTY;
^
fs/sysv/namei.c:219:7: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = -ENOTEMPTY;
^
fs/sysv/namei.c:209:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -EIO;
^
fs/sysv/namei.c:219:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOTEMPTY;
^
fs/sysv/namei.c:223:7: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = -ENOENT;
^
fs/sysv/namei.c:219:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOTEMPTY;
^
fs/sysv/namei.c:223:7: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOENT;
^
--
>> drivers/md/dm-clone-metadata.c:781:4: warning: Variable 'r' is reassigned a value before the old one has been used. [redundantAssignment]
r = __flush_dmap(cmd, dmap);
^
drivers/md/dm-clone-metadata.c:748:0: note: Variable 'r' is reassigned a value before the old one has been used.
int r = -EPERM;
^
drivers/md/dm-clone-metadata.c:781:4: note: Variable 'r' is reassigned a value before the old one has been used.
r = __flush_dmap(cmd, dmap);
^
drivers/md/dm-clone-metadata.c:863:4: warning: Variable 'r' is reassigned a value before the old one has been used. [redundantAssignment]
r = __load_bitset_in_core(cmd);
^
drivers/md/dm-clone-metadata.c:856:0: note: Variable 'r' is reassigned a value before the old one has been used.
int r = -EINVAL;
^
drivers/md/dm-clone-metadata.c:863:4: note: Variable 'r' is reassigned a value before the old one has been used.
r = __load_bitset_in_core(cmd);
^
drivers/md/dm-clone-metadata.c:893:4: warning: Variable 'r' is reassigned a value before the old one has been used. [redundantAssignment]
r = __create_persistent_data_structures(cmd, false);
^
drivers/md/dm-clone-metadata.c:884:0: note: Variable 'r' is reassigned a value before the old one has been used.
int r = -EPERM;
^
drivers/md/dm-clone-metadata.c:893:4: note: Variable 'r' is reassigned a value before the old one has been used.
r = __create_persistent_data_structures(cmd, false);
^
--
>> fs/sysv/super.c:506:17: warning: Variable 'sbi->s_bytesex' is reassigned a value before the old one has been used. [redundantAssignment]
sbi->s_bytesex = BYTESEX_LE;
^
fs/sysv/super.c:501:17: note: Variable 'sbi->s_bytesex' is reassigned a value before the old one has been used.
sbi->s_bytesex = BYTESEX_PDP;
^
fs/sysv/super.c:506:17: note: Variable 'sbi->s_bytesex' is reassigned a value before the old one has been used.
sbi->s_bytesex = BYTESEX_LE;
^
--
>> drivers/md/dm-delay.c:85:18: warning: Local variable flush_bios shadows outer function [shadowFunction]
struct bio_list flush_bios = { };
^
drivers/md/dm-delay.c:68:13: note: Shadowed declaration
static void flush_bios(struct bio *bio)
^
drivers/md/dm-delay.c:85:18: note: Shadow variable
struct bio_list flush_bios = { };
^
--
>> drivers/memstick/core/mspro_block.c:1446:5: warning: Variable 'rc' is reassigned a value before the old one has been used. [redundantAssignment]
rc = register_blkdev(major, DRIVER_NAME);
^
drivers/memstick/core/mspro_block.c:1444:0: note: Variable 'rc' is reassigned a value before the old one has been used.
int rc = -ENOMEM;
^
drivers/memstick/core/mspro_block.c:1446:5: note: Variable 'rc' is reassigned a value before the old one has been used.
rc = register_blkdev(major, DRIVER_NAME);
^
>> drivers/nvme/target/fc.c:1729:19: warning: Variable 'fod->data_sg_cnt' is reassigned a value before the old one has been used. [redundantAssignment]
fod->data_sg_cnt = fc_dma_map_sg(fod->tgtport->dev, sg, nent,
^
drivers/nvme/target/fc.c:1728:19: note: Variable 'fod->data_sg_cnt' is reassigned a value before the old one has been used.
fod->data_sg_cnt = nent;
^
drivers/nvme/target/fc.c:1729:19: note: Variable 'fod->data_sg_cnt' is reassigned a value before the old one has been used.
fod->data_sg_cnt = fc_dma_map_sg(fod->tgtport->dev, sg, nent,
^
>> drivers/nvme/target/fc.c:1077:2: warning: Address of local auto-variable assigned to a function parameter. [autoVariables]
*portptr = &newrec->fc_target_port;
^
--
>> drivers/nvme/target/loop.c:595:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = nvme_loop_configure_admin_queue(ctrl);
^
drivers/nvme/target/loop.c:584:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = -ENOMEM;
^
drivers/nvme/target/loop.c:595:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = nvme_loop_configure_admin_queue(ctrl);
^
>> drivers/pci/syscall.c:47:6: warning: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch]
err = -EIO;
^
drivers/pci/syscall.c:27:6: note: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing?
err = -ENODEV;
^
drivers/pci/syscall.c:47:6: note: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing?
err = -EIO;
^
>> drivers/nvme/target/fcloop.c:909:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = fcloop_parse_options(opts, buf);
^
drivers/nvme/target/fcloop.c:899:0: note: Variable 'ret' is reassigned a value before the old one has been used.
int ret = -ENOMEM;
^
drivers/nvme/target/fcloop.c:909:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = fcloop_parse_options(opts, buf);
^
>> drivers/nvme/target/fcloop.c:1397:32: warning: Uninitialized variable: lport [uninitvar]
ret = __wait_localport_unreg(lport);
^
>> drivers/nvme/target/fcloop.c:1380:28: warning: Uninitialized variable: nport [uninitvar]
ret = __remoteport_unreg(nport, rport);
^
--
>> drivers/regulator/wm8994-regulator.c:124:33: warning: Either the condition '!pdata' is redundant or there is possible null pointer dereference: pdata. [nullPointerRedundantCheck]
int id = pdev->id % ARRAY_SIZE(pdata->ldo);
^
drivers/regulator/wm8994-regulator.c:158:6: note: Assuming that condition '!pdata' is not redundant
if (!pdata || !pdata->ldo[id].init_data || wm8994->dev->of_node) {
^
drivers/regulator/wm8994-regulator.c:124:33: note: Null pointer dereference
int id = pdev->id % ARRAY_SIZE(pdata->ldo);
^
>> drivers/sbus/char/uctrl.c:370:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = request_irq(p->irq, uctrl_interrupt, 0, "uctrl", p);
^
drivers/sbus/char/uctrl.c:353:0: note: Variable 'err' is reassigned a value before the old one has been used.
int err = -ENOMEM;
^
drivers/sbus/char/uctrl.c:370:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = request_irq(p->irq, uctrl_interrupt, 0, "uctrl", p);
^
--
>> drivers/scsi/pcmcia/nsp_cs.c:403:19: warning: Variable 'SCpnt->SCp.phase' is reassigned a value before the old one has been used. [redundantAssignment]
SCpnt->SCp.phase = PH_SELSTART;
^
drivers/scsi/pcmcia/nsp_cs.c:383:19: note: Variable 'SCpnt->SCp.phase' is reassigned a value before the old one has been used.
SCpnt->SCp.phase = PH_ARBSTART;
^
drivers/scsi/pcmcia/nsp_cs.c:403:19: note: Variable 'SCpnt->SCp.phase' is reassigned a value before the old one has been used.
SCpnt->SCp.phase = PH_SELSTART;
^
>> drivers/scsi/pcmcia/nsp_message.c:46:7: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = nsp_expect_signal(SCpnt, BUSPHASE_MESSAGE_IN, BUSMON_REQ);
^
drivers/scsi/pcmcia/nsp_message.c:24:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = 16;
^
drivers/scsi/pcmcia/nsp_message.c:46:7: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = nsp_expect_signal(SCpnt, BUSPHASE_MESSAGE_IN, BUSMON_REQ);
^
>> drivers/scsi/qlogicfas408.c:130:26: warning: Variable 'j' is reassigned a value before the old one has been used. [redundantAssignment]
while (reqlen && !((j = inb(qbase + 8)) & 0x10))
^
drivers/scsi/qlogicfas408.c:129:6: note: Variable 'j' is reassigned a value before the old one has been used.
j &= 0xc0;
^
drivers/scsi/qlogicfas408.c:130:26: note: Variable 'j' is reassigned a value before the old one has been used.
while (reqlen && !((j = inb(qbase + 8)) & 0x10))
^
>> drivers/scsi/qlogicfas408.c:339:4: warning: Variable 'k' is reassigned a value before the old one has been used. [redundantAssignment]
k = jiffies + WATCHDOG;
^
drivers/scsi/qlogicfas408.c:332:5: note: Variable 'k' is reassigned a value before the old one has been used.
k = inb(qbase + 5); /* should be 0x10, bus service */
^
drivers/scsi/qlogicfas408.c:339:4: note: Variable 'k' is reassigned a value before the old one has been used.
k = jiffies + WATCHDOG;
^
>> drivers/scsi/esp_scsi.c:1901:8: warning: Local variable i shadows outer variable [shadowVar]
int i;
^
drivers/scsi/esp_scsi.c:1696:13: note: Shadowed declaration
int write, i;
^
drivers/scsi/esp_scsi.c:1901:8: note: Shadow variable
int i;
^
drivers/scsi/esp_scsi.c:1909:8: warning: Local variable i shadows outer variable [shadowVar]
int i;
^
drivers/scsi/esp_scsi.c:1696:13: note: Shadowed declaration
int write, i;
^
drivers/scsi/esp_scsi.c:1909:8: note: Shadow variable
int i;
^
--
>> drivers/video/fbdev/bw2.c:331:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = register_framebuffer(info);
^
drivers/video/fbdev/bw2.c:285:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOMEM;
^
drivers/video/fbdev/bw2.c:331:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = register_framebuffer(info);
^
--
>> drivers/video/fbdev/cg14.c:549:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = register_framebuffer(info);
^
drivers/video/fbdev/cg14.c:474:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOMEM;
^
drivers/video/fbdev/cg14.c:549:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = register_framebuffer(info);
^
--
>> drivers/video/fbdev/tcx.c:465:6: warning: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing? [redundantAssignInSwitch]
err = register_framebuffer(info);
^
drivers/video/fbdev/tcx.c:375:6: note: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing?
err = -ENOMEM;
^
drivers/video/fbdev/tcx.c:465:6: note: Variable 'err' is reassigned a value before the old one has been used. 'break;' missing?
err = register_framebuffer(info);
^
--
>> drivers/video/fbdev/leo.c:617:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = register_framebuffer(info);
^
drivers/video/fbdev/leo.c:560:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOMEM;
^
drivers/video/fbdev/leo.c:617:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = register_framebuffer(info);
^
--
>> drivers/scsi/sun_esp.c:475:6: warning: Variable 'err' is reassigned a value before the old one has been used. [redundantAssignment]
err = esp_sbus_setup_dma(esp, espdma);
^
drivers/scsi/sun_esp.c:461:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = -ENOMEM;
^
drivers/scsi/sun_esp.c:475:6: note: Variable 'err' is reassigned a value before the old one has been used.
err = esp_sbus_setup_dma(esp, espdma);
^
--
>> drivers/video/fbdev/grvga.c:400:9: warning: Variable 'retval' is reassigned a value before the old one has been used. [redundantAssignment]
retval = fb_alloc_cmap(&info->cmap, 256, 0);
^
drivers/video/fbdev/grvga.c:330:0: note: Variable 'retval' is reassigned a value before the old one has been used.
int retval = -ENOMEM;
^
drivers/video/fbdev/grvga.c:400:9: note: Variable 'retval' is reassigned a value before the old one has been used.
retval = fb_alloc_cmap(&info->cmap, 256, 0);
^
vim +/r +781 drivers/md/dm-clone-metadata.c
745
746 int dm_clone_metadata_commit(struct dm_clone_metadata *cmd)
747 {
748 int r = -EPERM;
749 unsigned long flags;
750 struct dirty_map *dmap, *next_dmap;
751
752 down_write(&cmd->lock);
753
754 if (cmd->fail_io || dm_bm_is_read_only(cmd->bm))
755 goto out;
756
757 /* Get current dirty bitmap */
758 dmap = cmd->current_dmap;
759
760 /* Get next dirty bitmap */
761 next_dmap = (dmap == &cmd->dmap[0]) ? &cmd->dmap[1] : &cmd->dmap[0];
762
763 /*
764 * The last commit failed, so we don't have a clean dirty-bitmap to
765 * use.
766 */
767 if (WARN_ON(next_dmap->changed)) {
768 r = -EINVAL;
769 goto out;
770 }
771
772 /* Swap dirty bitmaps */
773 spin_lock_irqsave(&cmd->bitmap_lock, flags);
774 cmd->current_dmap = next_dmap;
775 spin_unlock_irqrestore(&cmd->bitmap_lock, flags);
776
777 /*
778 * No one is accessing the old dirty bitmap anymore, so we can flush
779 * it.
780 */
> 781 r = __flush_dmap(cmd, dmap);
782 out:
783 up_write(&cmd->lock);
784
785 return r;
786 }
787
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:133 mt7615_reset_test_set() warn: inconsistent returns 'dev->mt76.mutex'.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7c2a69f610e64c8dec6a06a66e721f4ce1dd783a
commit: ea4906c4be4944f8341d500f83267d1ba3e8e838 mt76: mt7615: wake device before accessing regmap in debugfs
date: 3 weeks 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>
smatch warnings:
drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c:133 mt7615_reset_test_set() warn: inconsistent returns 'dev->mt76.mutex'.
vim +133 drivers/net/wireless/mediatek/mt76/mt7615/debugfs.c
f347f81a8ac98b Felix Fietkau 2019-12-29 109
f347f81a8ac98b Felix Fietkau 2019-12-29 110 DEFINE_DEBUGFS_ATTRIBUTE(fops_fw_debug, mt7615_fw_debug_get,
f347f81a8ac98b Felix Fietkau 2019-12-29 111 mt7615_fw_debug_set, "%lld\n");
f347f81a8ac98b Felix Fietkau 2019-12-29 112
35492cd28f2a06 Felix Fietkau 2020-01-31 113 static int
35492cd28f2a06 Felix Fietkau 2020-01-31 114 mt7615_reset_test_set(void *data, u64 val)
35492cd28f2a06 Felix Fietkau 2020-01-31 115 {
35492cd28f2a06 Felix Fietkau 2020-01-31 116 struct mt7615_dev *dev = data;
35492cd28f2a06 Felix Fietkau 2020-01-31 117 struct sk_buff *skb;
35492cd28f2a06 Felix Fietkau 2020-01-31 118
35492cd28f2a06 Felix Fietkau 2020-01-31 119 if (!mt7615_wait_for_mcu_init(dev))
35492cd28f2a06 Felix Fietkau 2020-01-31 120 return 0;
35492cd28f2a06 Felix Fietkau 2020-01-31 121
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 122 mt7615_mutex_acquire(dev);
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 123
35492cd28f2a06 Felix Fietkau 2020-01-31 124 skb = alloc_skb(1, GFP_KERNEL);
35492cd28f2a06 Felix Fietkau 2020-01-31 125 if (!skb)
35492cd28f2a06 Felix Fietkau 2020-01-31 126 return -ENOMEM;
35492cd28f2a06 Felix Fietkau 2020-01-31 127
35492cd28f2a06 Felix Fietkau 2020-01-31 128 skb_put(skb, 1);
35492cd28f2a06 Felix Fietkau 2020-01-31 129 mt76_tx_queue_skb_raw(dev, 0, skb, 0);
35492cd28f2a06 Felix Fietkau 2020-01-31 130
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 131 mt7615_mutex_release(dev);
ea4906c4be4944 Lorenzo Bianconi 2020-07-03 132
35492cd28f2a06 Felix Fietkau 2020-01-31 @133 return 0;
35492cd28f2a06 Felix Fietkau 2020-01-31 134 }
35492cd28f2a06 Felix Fietkau 2020-01-31 135
:::::: The code at line 133 was first introduced by commit
:::::: 35492cd28f2a06623279a61955539fa6c5ae6067 mt76: mt7615: add support for testing hardware reset
:::::: TO: Felix Fietkau <nbd(a)nbd.name>
:::::: CC: Felix Fietkau <nbd(a)nbd.name>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/md/raid5.c:7902 raid5_start_reshape() warn: statement has no effect 31
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7c2a69f610e64c8dec6a06a66e721f4ce1dd783a
commit: 55f3560df975f557c48aa6afc636808f31ecb87a seqlock: Extend seqcount API with associated locks
date: 2 weeks ago
config: i386-randconfig-m031-20200811 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 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/md/raid5.c:7902 raid5_start_reshape() warn: statement has no effect 31
Old smatch warnings:
drivers/md/raid5.c:6693 alloc_thread_groups() warn: double check that we're allocating correct size: 108 vs 1
drivers/md/raid5.c:6913 setup_conf() warn: should 'mddev->new_chunk_sectors << 9' be a 64 bit type?
drivers/md/raid5.c:7978 raid5_start_reshape() warn: statement has no effect 31
vim +7902 drivers/md/raid5.c
63c70c4f3a30e77 NeilBrown 2006-03-27 7860
fd01b88c75a7180 NeilBrown 2011-10-11 7861 static int raid5_start_reshape(struct mddev *mddev)
63c70c4f3a30e77 NeilBrown 2006-03-27 7862 {
d1688a6d5515f19 NeilBrown 2011-10-11 7863 struct r5conf *conf = mddev->private;
3cb03002000f133 NeilBrown 2011-10-11 7864 struct md_rdev *rdev;
63c70c4f3a30e77 NeilBrown 2006-03-27 7865 int spares = 0;
c04be0aa82ff535 NeilBrown 2006-10-03 7866 unsigned long flags;
63c70c4f3a30e77 NeilBrown 2006-03-27 7867
f416885ef495050 NeilBrown 2007-02-28 7868 if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
63c70c4f3a30e77 NeilBrown 2006-03-27 7869 return -EBUSY;
63c70c4f3a30e77 NeilBrown 2006-03-27 7870
01ee22b496c4138 NeilBrown 2009-06-18 7871 if (!check_stripe_cache(mddev))
01ee22b496c4138 NeilBrown 2009-06-18 7872 return -ENOSPC;
01ee22b496c4138 NeilBrown 2009-06-18 7873
30b67645faadcdc NeilBrown 2012-05-22 7874 if (has_failed(conf))
30b67645faadcdc NeilBrown 2012-05-22 7875 return -EINVAL;
30b67645faadcdc NeilBrown 2012-05-22 7876
c6563a8c38fde3c NeilBrown 2012-05-21 7877 rdev_for_each(rdev, mddev) {
469518a3455c796 NeilBrown 2011-01-31 7878 if (!test_bit(In_sync, &rdev->flags)
1a940fcee31ec6c NeilBrown 2011-01-14 7879 && !test_bit(Faulty, &rdev->flags))
292695531ae4019 NeilBrown 2006-03-27 7880 spares++;
c6563a8c38fde3c NeilBrown 2012-05-21 7881 }
63c70c4f3a30e77 NeilBrown 2006-03-27 7882
f416885ef495050 NeilBrown 2007-02-28 7883 if (spares - mddev->degraded < mddev->delta_disks - conf->max_degraded)
292695531ae4019 NeilBrown 2006-03-27 7884 /* Not enough devices even to make a degraded array
292695531ae4019 NeilBrown 2006-03-27 7885 * of that size
292695531ae4019 NeilBrown 2006-03-27 7886 */
292695531ae4019 NeilBrown 2006-03-27 7887 return -EINVAL;
292695531ae4019 NeilBrown 2006-03-27 7888
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7889 /* Refuse to reduce size of the array. Any reductions in
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7890 * array size must be through explicit setting of array_size
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7891 * attribute.
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7892 */
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7893 if (raid5_size(mddev, 0, conf->raid_disks + mddev->delta_disks)
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7894 < mddev->array_sectors) {
cc6167b4f3b3caa NeilBrown 2016-11-02 7895 pr_warn("md/raid:%s: array size must be reduced before number of disks\n",
cc6167b4f3b3caa NeilBrown 2016-11-02 7896 mdname(mddev));
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7897 return -EINVAL;
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7898 }
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7899
f67055780caac6a NeilBrown 2006-03-27 7900 atomic_set(&conf->reshape_stripes, 0);
292695531ae4019 NeilBrown 2006-03-27 7901 spin_lock_irq(&conf->device_lock);
c46501b2deaa06e NeilBrown 2013-08-27 @7902 write_seqcount_begin(&conf->gen_lock);
292695531ae4019 NeilBrown 2006-03-27 7903 conf->previous_raid_disks = conf->raid_disks;
63c70c4f3a30e77 NeilBrown 2006-03-27 7904 conf->raid_disks += mddev->delta_disks;
09c9e5fa1b93ad5 Andre Noll 2009-06-18 7905 conf->prev_chunk_sectors = conf->chunk_sectors;
09c9e5fa1b93ad5 Andre Noll 2009-06-18 7906 conf->chunk_sectors = mddev->new_chunk_sectors;
88ce4930e2b8037 NeilBrown 2009-03-31 7907 conf->prev_algo = conf->algorithm;
88ce4930e2b8037 NeilBrown 2009-03-31 7908 conf->algorithm = mddev->new_layout;
05616be5e11f668 NeilBrown 2012-05-21 7909 conf->generation++;
05616be5e11f668 NeilBrown 2012-05-21 7910 /* Code that selects data_offset needs to see the generation update
05616be5e11f668 NeilBrown 2012-05-21 7911 * if reshape_progress has been set - so a memory barrier needed.
05616be5e11f668 NeilBrown 2012-05-21 7912 */
05616be5e11f668 NeilBrown 2012-05-21 7913 smp_mb();
2c810cddc44d6f9 NeilBrown 2012-05-21 7914 if (mddev->reshape_backwards)
fef9c61fdfabf97 NeilBrown 2009-03-31 7915 conf->reshape_progress = raid5_size(mddev, 0, 0);
fef9c61fdfabf97 NeilBrown 2009-03-31 7916 else
fef9c61fdfabf97 NeilBrown 2009-03-31 7917 conf->reshape_progress = 0;
fef9c61fdfabf97 NeilBrown 2009-03-31 7918 conf->reshape_safe = conf->reshape_progress;
c46501b2deaa06e NeilBrown 2013-08-27 7919 write_seqcount_end(&conf->gen_lock);
292695531ae4019 NeilBrown 2006-03-27 7920 spin_unlock_irq(&conf->device_lock);
292695531ae4019 NeilBrown 2006-03-27 7921
4d77e3ba88d0858 NeilBrown 2013-08-27 7922 /* Now make sure any requests that proceeded on the assumption
4d77e3ba88d0858 NeilBrown 2013-08-27 7923 * the reshape wasn't running - like Discard or Read - have
4d77e3ba88d0858 NeilBrown 2013-08-27 7924 * completed.
4d77e3ba88d0858 NeilBrown 2013-08-27 7925 */
4d77e3ba88d0858 NeilBrown 2013-08-27 7926 mddev_suspend(mddev);
4d77e3ba88d0858 NeilBrown 2013-08-27 7927 mddev_resume(mddev);
4d77e3ba88d0858 NeilBrown 2013-08-27 7928
292695531ae4019 NeilBrown 2006-03-27 7929 /* Add some new drives, as many as will fit.
292695531ae4019 NeilBrown 2006-03-27 7930 * We know there are enough to make the newly sized array work.
3424bf6a772cff6 NeilBrown 2010-06-17 7931 * Don't add devices if we are reducing the number of
3424bf6a772cff6 NeilBrown 2010-06-17 7932 * devices in the array. This is because it is not possible
3424bf6a772cff6 NeilBrown 2010-06-17 7933 * to correctly record the "partially reconstructed" state of
3424bf6a772cff6 NeilBrown 2010-06-17 7934 * such devices during the reshape and confusion could result.
292695531ae4019 NeilBrown 2006-03-27 7935 */
87a8dec91e15954 NeilBrown 2011-01-31 7936 if (mddev->delta_disks >= 0) {
dafb20fa34320a4 NeilBrown 2012-03-19 7937 rdev_for_each(rdev, mddev)
292695531ae4019 NeilBrown 2006-03-27 7938 if (rdev->raid_disk < 0 &&
292695531ae4019 NeilBrown 2006-03-27 7939 !test_bit(Faulty, &rdev->flags)) {
199050ea1ff2270 Neil Brown 2008-06-28 7940 if (raid5_add_disk(mddev, rdev) == 0) {
87a8dec91e15954 NeilBrown 2011-01-31 7941 if (rdev->raid_disk
9d4c7d8799c4188 NeilBrown 2012-03-13 7942 >= conf->previous_raid_disks)
292695531ae4019 NeilBrown 2006-03-27 7943 set_bit(In_sync, &rdev->flags);
9d4c7d8799c4188 NeilBrown 2012-03-13 7944 else
9eb07c259207d04 NeilBrown 2010-02-09 7945 rdev->recovery_offset = 0;
36fad858a7404a9 Namhyung Kim 2011-07-27 7946
36fad858a7404a9 Namhyung Kim 2011-07-27 7947 if (sysfs_link_rdev(mddev, rdev))
00bcb4ac7ee7e55 NeilBrown 2010-06-01 7948 /* Failure here is OK */;
50da08409654e03 NeilBrown 2011-01-31 7949 }
1a940fcee31ec6c NeilBrown 2011-01-14 7950 } else if (rdev->raid_disk >= conf->previous_raid_disks
1a940fcee31ec6c NeilBrown 2011-01-14 7951 && !test_bit(Faulty, &rdev->flags)) {
1a940fcee31ec6c NeilBrown 2011-01-14 7952 /* This is a spare that was manually added */
1a940fcee31ec6c NeilBrown 2011-01-14 7953 set_bit(In_sync, &rdev->flags);
292695531ae4019 NeilBrown 2006-03-27 7954 }
292695531ae4019 NeilBrown 2006-03-27 7955
87a8dec91e15954 NeilBrown 2011-01-31 7956 /* When a reshape changes the number of devices,
87a8dec91e15954 NeilBrown 2011-01-31 7957 * ->degraded is measured against the larger of the
87a8dec91e15954 NeilBrown 2011-01-31 7958 * pre and post number of devices.
87a8dec91e15954 NeilBrown 2011-01-31 7959 */
c04be0aa82ff535 NeilBrown 2006-10-03 7960 spin_lock_irqsave(&conf->device_lock, flags);
2e38a37f23c98d7 Song Liu 2017-01-24 7961 mddev->degraded = raid5_calc_degraded(conf);
c04be0aa82ff535 NeilBrown 2006-10-03 7962 spin_unlock_irqrestore(&conf->device_lock, flags);
ec32a2bd35bd6b9 NeilBrown 2009-03-31 7963 }
63c70c4f3a30e77 NeilBrown 2006-03-27 7964 mddev->raid_disks = conf->raid_disks;
e516402c0d4fc02 NeilBrown 2009-08-03 7965 mddev->reshape_position = conf->reshape_progress;
2953079c692da06 Shaohua Li 2016-12-08 7966 set_bit(MD_SB_CHANGE_DEVS, &mddev->sb_flags);
f67055780caac6a NeilBrown 2006-03-27 7967
292695531ae4019 NeilBrown 2006-03-27 7968 clear_bit(MD_RECOVERY_SYNC, &mddev->recovery);
292695531ae4019 NeilBrown 2006-03-27 7969 clear_bit(MD_RECOVERY_CHECK, &mddev->recovery);
ea358cd0d2c634f NeilBrown 2015-06-12 7970 clear_bit(MD_RECOVERY_DONE, &mddev->recovery);
292695531ae4019 NeilBrown 2006-03-27 7971 set_bit(MD_RECOVERY_RESHAPE, &mddev->recovery);
292695531ae4019 NeilBrown 2006-03-27 7972 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
292695531ae4019 NeilBrown 2006-03-27 7973 mddev->sync_thread = md_register_thread(md_do_sync, mddev,
0da3c6194ec2f32 NeilBrown 2009-09-23 7974 "reshape");
292695531ae4019 NeilBrown 2006-03-27 7975 if (!mddev->sync_thread) {
292695531ae4019 NeilBrown 2006-03-27 7976 mddev->recovery = 0;
292695531ae4019 NeilBrown 2006-03-27 7977 spin_lock_irq(&conf->device_lock);
ba8805b97320416 NeilBrown 2013-11-14 7978 write_seqcount_begin(&conf->gen_lock);
292695531ae4019 NeilBrown 2006-03-27 7979 mddev->raid_disks = conf->raid_disks = conf->previous_raid_disks;
ba8805b97320416 NeilBrown 2013-11-14 7980 mddev->new_chunk_sectors =
ba8805b97320416 NeilBrown 2013-11-14 7981 conf->chunk_sectors = conf->prev_chunk_sectors;
ba8805b97320416 NeilBrown 2013-11-14 7982 mddev->new_layout = conf->algorithm = conf->prev_algo;
05616be5e11f668 NeilBrown 2012-05-21 7983 rdev_for_each(rdev, mddev)
05616be5e11f668 NeilBrown 2012-05-21 7984 rdev->new_data_offset = rdev->data_offset;
05616be5e11f668 NeilBrown 2012-05-21 7985 smp_wmb();
ba8805b97320416 NeilBrown 2013-11-14 7986 conf->generation --;
fef9c61fdfabf97 NeilBrown 2009-03-31 7987 conf->reshape_progress = MaxSector;
1e3fa9bd5061778 NeilBrown 2012-03-13 7988 mddev->reshape_position = MaxSector;
ba8805b97320416 NeilBrown 2013-11-14 7989 write_seqcount_end(&conf->gen_lock);
292695531ae4019 NeilBrown 2006-03-27 7990 spin_unlock_irq(&conf->device_lock);
292695531ae4019 NeilBrown 2006-03-27 7991 return -EAGAIN;
292695531ae4019 NeilBrown 2006-03-27 7992 }
c8f517c444e4f9f NeilBrown 2009-03-31 7993 conf->reshape_checkpoint = jiffies;
292695531ae4019 NeilBrown 2006-03-27 7994 md_wakeup_thread(mddev->sync_thread);
292695531ae4019 NeilBrown 2006-03-27 7995 md_new_event(mddev);
292695531ae4019 NeilBrown 2006-03-27 7996 return 0;
292695531ae4019 NeilBrown 2006-03-27 7997 }
292695531ae4019 NeilBrown 2006-03-27 7998
:::::: The code at line 7902 was first introduced by commit
:::::: c46501b2deaa06efcaaf82917281941f02c6b307 md/raid5: use seqcount to protect access to shape in make_request.
:::::: TO: NeilBrown <neilb(a)suse.de>
:::::: CC: NeilBrown <neilb(a)suse.de>
---
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 v6] fuse: Add support for passthrough read/write
by kernel test robot
Hi Alessio,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on fuse/for-next]
[also build test WARNING on v5.8 next-20200812]
[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/Alessio-Balsini/fuse-Add-support...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git for-next
compiler: h8300-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>
cppcheck warnings: (new ones prefixed by >>)
>> fs/fuse/passthrough.c:74:7: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = call_write_iter(passthrough_filp, iocb, iter);
^
fs/fuse/passthrough.c:63:0: note: Variable 'ret' is reassigned a value before the old one has been used.
ssize_t ret = -EIO;
^
fs/fuse/passthrough.c:74:7: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = call_write_iter(passthrough_filp, iocb, iter);
^
vim +/ret +74 fs/fuse/passthrough.c
53
54 static inline ssize_t fuse_passthrough_read_write_iter(struct kiocb *iocb,
55 struct iov_iter *iter,
56 bool write)
57 {
58 struct file *fuse_filp = iocb->ki_filp;
59 struct fuse_file *ff = fuse_filp->private_data;
60 struct file *passthrough_filp = ff->passthrough_filp;
61 struct inode *passthrough_inode;
62 struct inode *fuse_inode;
63 ssize_t ret = -EIO;
64
65 fuse_inode = fuse_filp->f_path.dentry->d_inode;
66 passthrough_inode = file_inode(passthrough_filp);
67
68 iocb->ki_filp = passthrough_filp;
69
70 if (write) {
71 if (!passthrough_filp->f_op->write_iter)
72 goto out;
73
> 74 ret = call_write_iter(passthrough_filp, iocb, iter);
75 if (ret >= 0 || ret == -EIOCBQUEUED) {
76 fsstack_copy_inode_size(fuse_inode, passthrough_inode);
77 fsstack_copy_attr_times(fuse_inode, passthrough_inode);
78 }
79 } else {
80 if (!passthrough_filp->f_op->read_iter)
81 goto out;
82
83 ret = call_read_iter(passthrough_filp, iocb, iter);
84 if (ret >= 0 || ret == -EIOCBQUEUED)
85 fsstack_copy_attr_atime(fuse_inode, passthrough_inode);
86 }
87
88 out:
89 iocb->ki_filp = fuse_filp;
90
91 return ret;
92 }
93
---
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 3/3] usb: Add Kconfig and Makefile changes to build brcmstb-usb-pinmap
by kernel test robot
Hi Al,
I love your patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on linux/master linus/master v5.8 next-20200812]
[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/Al-Cooper/usb-Add-driver-for-USB...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: sh-allmodconfig (attached as .config)
compiler: sh4-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh
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 >>):
>> drivers/usb/host/brcmstb-usb-pinmap.c:219:6: warning: no previous prototype for 'sync_all_pins' [-Wmissing-prototypes]
219 | void sync_all_pins(struct brcmstb_usb_pinmap_data *pdata)
| ^~~~~~~~~~~~~
vim +/sync_all_pins +219 drivers/usb/host/brcmstb-usb-pinmap.c
06f59ffd15dd0d5 Al Cooper 2020-08-12 218
06f59ffd15dd0d5 Al Cooper 2020-08-12 @219 void sync_all_pins(struct brcmstb_usb_pinmap_data *pdata)
06f59ffd15dd0d5 Al Cooper 2020-08-12 220 {
06f59ffd15dd0d5 Al Cooper 2020-08-12 221 struct out_pin *pout;
06f59ffd15dd0d5 Al Cooper 2020-08-12 222 struct in_pin *pin;
06f59ffd15dd0d5 Al Cooper 2020-08-12 223 int val;
06f59ffd15dd0d5 Al Cooper 2020-08-12 224 int x;
06f59ffd15dd0d5 Al Cooper 2020-08-12 225
06f59ffd15dd0d5 Al Cooper 2020-08-12 226 /*
06f59ffd15dd0d5 Al Cooper 2020-08-12 227 * Enable the override, clear any changed condition and
06f59ffd15dd0d5 Al Cooper 2020-08-12 228 * propagate the state to the GPIO for all out pins.
06f59ffd15dd0d5 Al Cooper 2020-08-12 229 */
06f59ffd15dd0d5 Al Cooper 2020-08-12 230 pout = pdata->out_pins;
06f59ffd15dd0d5 Al Cooper 2020-08-12 231 for (x = 0; x < pdata->out_count; x++) {
06f59ffd15dd0d5 Al Cooper 2020-08-12 232 pinmap_set(pdata->regs, pout->enable_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 233 pinmap_set(pdata->regs, pout->clr_changed_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 234 pinmap_unset(pdata->regs, pout->clr_changed_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 235 val = readl(pdata->regs) & pout->value_mask;
06f59ffd15dd0d5 Al Cooper 2020-08-12 236 gpiod_set_value(pout->gpiod, val ? 1 : 0);
06f59ffd15dd0d5 Al Cooper 2020-08-12 237 pout++;
06f59ffd15dd0d5 Al Cooper 2020-08-12 238 }
06f59ffd15dd0d5 Al Cooper 2020-08-12 239
06f59ffd15dd0d5 Al Cooper 2020-08-12 240 /* sync and enable all in pins. */
06f59ffd15dd0d5 Al Cooper 2020-08-12 241 pin = pdata->in_pins;
06f59ffd15dd0d5 Al Cooper 2020-08-12 242 for (x = 0; x < pdata->in_count; x++) {
06f59ffd15dd0d5 Al Cooper 2020-08-12 243 sync_in_pin(pin);
06f59ffd15dd0d5 Al Cooper 2020-08-12 244 pinmap_set(pdata->regs, pin->enable_mask);
06f59ffd15dd0d5 Al Cooper 2020-08-12 245 pin++;
06f59ffd15dd0d5 Al Cooper 2020-08-12 246 }
06f59ffd15dd0d5 Al Cooper 2020-08-12 247 }
06f59ffd15dd0d5 Al Cooper 2020-08-12 248
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[rcu:dev.2020.08.10a 105/111] main.c:undefined reference to `rcu_read_unlock_strict'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev.2020.08.10a
head: 9dd4d242c535c30266a08806314ea6b016f94617
commit: 9e20110f8ef2745df8f4fe2d679114dccfaaa1af [105/111] rcu: Report QS for outermost PREEMPT=n rcu_read_unlock() for strict GPs
config: arm-mainstone_defconfig (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 9e20110f8ef2745df8f4fe2d679114dccfaaa1af
# 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 >>):
arm-linux-gnueabi-ld: init/main.o: in function `rest_init':
>> main.c:(.ref.text+0x34): undefined reference to `rcu_read_unlock_strict'
>> arm-linux-gnueabi-ld: main.c:(.ref.text+0x58): undefined reference to `rcu_read_unlock_strict'
arm-linux-gnueabi-ld: kernel/fork.o: in function `get_mm_exe_file':
>> fork.c:(.text+0x3ac): undefined reference to `rcu_read_unlock_strict'
arm-linux-gnueabi-ld: kernel/fork.o: in function `pidfd_poll':
fork.c:(.text+0x650): undefined reference to `rcu_read_unlock_strict'
arm-linux-gnueabi-ld: kernel/fork.o: in function `_do_fork':
fork.c:(.text+0x2e10): undefined reference to `rcu_read_unlock_strict'
arm-linux-gnueabi-ld: kernel/fork.o:fork.c:(.text+0x2e8c): more undefined references to `rcu_read_unlock_strict' follow
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1240 i40e_set_vsi_promisc() error: uninitialized symbol 'aq_ret'.
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: fb893de323e2d39f7a1f6df425703a2edbdf56ea
commit: 37d318d7805f25b672bfd74fc694f19a2ee9665d i40e: Remove scheduling while atomic possibility
date: 7 weeks 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>
smatch warnings:
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c:1240 i40e_set_vsi_promisc() error: uninitialized symbol 'aq_ret'.
vim +/aq_ret +1240 drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1158
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1159 /**
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1160 * i40e_set_vsi_promisc
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1161 * @vf: pointer to the VF struct
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1162 * @seid: VSI number
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1163 * @multi_enable: set MAC L2 layer multicast promiscuous enable/disable
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1164 * for a given VLAN
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1165 * @unicast_enable: set MAC L2 layer unicast promiscuous enable/disable
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1166 * for a given VLAN
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1167 * @vl: List of VLANs - apply filter for given VLANs
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1168 * @num_vlans: Number of elements in @vl
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1169 **/
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1170 static i40e_status
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1171 i40e_set_vsi_promisc(struct i40e_vf *vf, u16 seid, bool multi_enable,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1172 bool unicast_enable, s16 *vl, int num_vlans)
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1173 {
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1174 struct i40e_pf *pf = vf->pf;
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1175 struct i40e_hw *hw = &pf->hw;
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1176 i40e_status aq_ret;
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1177 int i;
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1178
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1179 /* No VLAN to set promisc on, set on VSI */
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1180 if (!num_vlans || !vl) {
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1181 aq_ret = i40e_aq_set_vsi_multicast_promiscuous(hw, seid,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1182 multi_enable,
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1183 NULL);
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1184 if (aq_ret) {
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1185 int aq_err = pf->hw.aq.asq_last_status;
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1186
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1187 dev_err(&pf->pdev->dev,
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1188 "VF %d failed to set multicast promiscuous mode err %s aq_err %s\n",
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1189 vf->vf_id,
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1190 i40e_stat_str(&pf->hw, aq_ret),
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1191 i40e_aq_str(&pf->hw, aq_err));
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1192
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1193 return aq_ret;
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1194 }
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1195
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1196 aq_ret = i40e_aq_set_vsi_unicast_promiscuous(hw, seid,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1197 unicast_enable,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1198 NULL, true);
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1199
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1200 if (aq_ret) {
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1201 int aq_err = pf->hw.aq.asq_last_status;
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1202
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1203 dev_err(&pf->pdev->dev,
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1204 "VF %d failed to set unicast promiscuous mode err %s aq_err %s\n",
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1205 vf->vf_id,
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1206 i40e_stat_str(&pf->hw, aq_ret),
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1207 i40e_aq_str(&pf->hw, aq_err));
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1208 }
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1209
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1210 return aq_ret;
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1211 }
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1212
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1213 for (i = 0; i < num_vlans; i++) {
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1214 aq_ret = i40e_aq_set_vsi_mc_promisc_on_vlan(hw, seid,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1215 multi_enable,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1216 vl[i], NULL);
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1217 if (aq_ret) {
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1218 int aq_err = pf->hw.aq.asq_last_status;
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1219
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1220 dev_err(&pf->pdev->dev,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1221 "VF %d failed to set multicast promiscuous mode err %s aq_err %s\n",
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1222 vf->vf_id,
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1223 i40e_stat_str(&pf->hw, aq_ret),
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1224 i40e_aq_str(&pf->hw, aq_err));
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1225 }
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1226
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1227 aq_ret = i40e_aq_set_vsi_uc_promisc_on_vlan(hw, seid,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1228 unicast_enable,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1229 vl[i], NULL);
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1230 if (aq_ret) {
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1231 int aq_err = pf->hw.aq.asq_last_status;
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1232
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1233 dev_err(&pf->pdev->dev,
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1234 "VF %d failed to set unicast promiscuous mode err %s aq_err %s\n",
37d318d7805f25 Aleksandr Loktionov 2020-05-29 1235 vf->vf_id,
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1236 i40e_stat_str(&pf->hw, aq_ret),
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1237 i40e_aq_str(&pf->hw, aq_err));
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1238 }
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1239 }
0ce5233e6c2afe Mariusz Stachura 2018-08-20 @1240 return aq_ret;
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1241 }
0ce5233e6c2afe Mariusz Stachura 2018-08-20 1242
:::::: The code at line 1240 was first introduced by commit
:::::: 0ce5233e6c2afeb39b9631961978a993a6d4e500 i40e: Unset promiscuous settings on VF reset
:::::: TO: Mariusz Stachura <mariusz.stachura(a)intel.com>
:::::: CC: Jeff Kirsher <jeffrey.t.kirsher(a)intel.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:4.19/android 16449/16450] drivers/cpufreq/cpufreq_times.c:354:5: warning: no previous prototype for 'cpufreq_table_get_closed_index'
by kernel test robot
tree: https://github.com/intel/linux-intel-lts.git 4.19/android
head: d4b48e23d743860d18c97d1b6900c779a488683a
commit: 045c4cc9854e44be23f27501c397c8d1783a0708 [16449/16450] cpufreq statistics: support cpufreq driver without freq table
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
git checkout 045c4cc9854e44be23f27501c397c8d1783a0708
# 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 >>):
>> drivers/cpufreq/cpufreq_times.c:354:5: warning: no previous prototype for 'cpufreq_table_get_closed_index' [-Wmissing-prototypes]
354 | int cpufreq_table_get_closed_index(int cpu, unsigned int freq)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/cpufreq/cpufreq_times.c:367:6: warning: no previous prototype for 'cpufreq_times_create_policy_no_freq_table' [-Wmissing-prototypes]
367 | void cpufreq_times_create_policy_no_freq_table(struct cpufreq_policy *policy)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/cpufreq_table_get_closed_index +354 drivers/cpufreq/cpufreq_times.c
350
351 #define CPU_FREQ_STEPS 100000
352 // Suppose all cores have same freq count
353 static int all_freq_count;
> 354 int cpufreq_table_get_closed_index(int cpu, unsigned int freq)
355 {
356 int i;
357 unsigned int rounded_freq;
358
359 rounded_freq = freq + CPU_FREQ_STEPS / 2;
360 for (i = 0; i < all_freq_count; i++) {
361 if ((rounded_freq - all_freqs[cpu]->freq_table[i]) / CPU_FREQ_STEPS == 0)
362 return i;
363 }
364 return -1;
365 }
366
> 367 void cpufreq_times_create_policy_no_freq_table(struct cpufreq_policy *policy)
368 {
369 int cpu, index, i;
370 unsigned int count = 0;
371 struct cpu_freqs *freqs;
372 void *tmp;
373
374 if (all_freqs[policy->cpu])
375 return;
376
377 count = (policy->max - policy->min) / CPU_FREQ_STEPS + 1;
378 if ((policy->max - policy->min) % CPU_FREQ_STEPS)
379 count++;
380
381 if (count > 100)
382 return;
383
384 tmp = kzalloc(sizeof(*freqs) + sizeof(freqs->freq_table[0]) * count,
385 GFP_KERNEL);
386 if (!tmp)
387 return;
388
389 freqs = tmp;
390 freqs->max_state = count;
391 all_freq_count = count;
392
393 freqs->freq_table[0] = policy->min;
394 freqs->freq_table[count - 1] = policy->max;
395 for (i = 1; i < count - 1; i++)
396 freqs->freq_table[i] = policy->min + i * CPU_FREQ_STEPS;
397 freqs->offset = next_offset;
398 WRITE_ONCE(next_offset, freqs->offset + count);
399 for_each_cpu(cpu, policy->related_cpus)
400 all_freqs[cpu] = freqs;
401
402 index = cpufreq_table_get_closed_index(policy->cpu, policy->cur);
403 if (index >= 0)
404 WRITE_ONCE(freqs->last_index, index);
405 }
406
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[PATCH] sched/debug: fix noderef.cocci warnings
by kernel test robot
From: kernel test robot <lkp(a)intel.com>
kernel/sched/debug.c:272:30-36: ERROR: application of sizeof to pointer
sizeof when applied to a pointer typed expression gives the size of
the pointer
Generated by: scripts/coccinelle/misc/noderef.cocci
CC: Valentin Schneider <valentin.schneider(a)arm.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
url: https://github.com/0day-ci/linux/commits/Valentin-Schneider/sched-Instrum...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 949bcb8135a96a6923e676646bd29cbe69e8350f
debug.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -269,7 +269,7 @@ static int sd_ctl_doflags(struct ctl_tab
return 0;
}
- tmp = kcalloc(data_size + 1, sizeof(tmp), GFP_KERNEL);
+ tmp = kcalloc(data_size + 1, sizeof(*tmp), GFP_KERNEL);
for_each_set_bit(idx, &flags, __SD_FLAG_CNT) {
char *name = sd_flag_debug[idx].name;
2 years, 1 month