[kbuild] sound/usb/mixer_scarlett_gen2.c:211:8: warning: Excessive padding in 'struct scarlett2_port' (10 padding bytes, where 2 is optimal).
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: "Geoffrey D. Bennett" CC: Takashi Iwai tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 56e337f2cf1326323844927a04e9dbce9a244835 commit: e2cc91ac8f4e1b03a0e3e822c338401284c0b550 ALSA: usb-audio: scarlett2: Split struct scarlett2_ports date: 9 months ago :: branch date: 10 hours ago :: commit date: 9 months ago config: x86_64-randconfig-c007-20220307 (https://download.01.org/0day-ci/archive/20220316/202203161138.dvyr6t3d-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e2cc91ac8f4e1b03a0e3e822c338401284c0b550 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout e2cc91ac8f4e1b03a0e3e822c338401284c0b550 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) ^ fs/nfs/nfs4xdr.c:1187:4: note: Null pointer value stored to 'p' *p++ = cpu_to_be32(label->lfs); ^~~ fs/nfs/nfs4xdr.c:1187:8: note: Dereference of null pointer *p++ = cpu_to_be32(label->lfs); ~^ fs/nfs/nfs4xdr.c:1367:2: warning: Value stored to 'p' is never read [clang-analyzer-deadcode.DeadStores] p = xdr_encode_hyper(p, nfs4_lock_length(args->fl)); ^ ~~~ fs/nfs/nfs4xdr.c:1367:2: note: Value stored to 'p' is never read p = xdr_encode_hyper(p, nfs4_lock_length(args->fl)); ^ ~~~ fs/nfs/nfs4xdr.c:6768:17: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] res->op_status = hdr.status; ^ ~~ fs/nfs/nfs4xdr.c:6767:11: note: Calling 'decode_compound_hdr' status = decode_compound_hdr(xdr, &hdr); ^~ fs/nfs/nfs4xdr.c:3174:15: note: Assuming 'p' is null if (unlikely(!p)) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x)__builtin_expect(!!(x), 0) ^ fs/nfs/nfs4xdr.c:3174:2: note: Taking true branch if (unlikely(!p)) ^ fs/nfs/nfs4xdr.c:3175:3: note: Returning without writing to 'hdr->status' return -EIO; ^ fs/nfs/nfs4xdr.c:6767:11: note: Returning from 'decode_compound_hdr' status = decode_compound_hdr(xdr, &hdr); ^~ fs/nfs/nfs4xdr.c:6768:17: note: Assigned value is garbage or undefined res->op_status = hdr.status; ^ ~~ fs/nfs/nfs4xdr.c:6795:17: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] res->op_status = hdr.status; ^ ~~ fs/nfs/nfs4xdr.c:6794:11: note: Calling 'decode_compound_hdr' status = decode_compound_hdr(xdr, &hdr); ^~ fs/nfs/nfs4xdr.c:3174:15: note: Assuming 'p' is null if (unlikely(!p)) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x)__builtin_expect(!!(x), 0) ^ fs/nfs/nfs4xdr.c:3174:2: note: Taking true branch if (unlikely(!p)) ^ fs/nfs/nfs4xdr.c:3175:3: note: Returning without writing to 'hdr->status' return -EIO; ^ fs/nfs/nfs4xdr.c:6794:11: note: Returning from 'decode_compound_hdr' status = decode_compound_hdr(xdr, &hdr); ^~ fs/nfs/nfs4xdr.c:6795:17: note: Assigned value is garbage or undefined res->op_status = hdr.status; ^ ~~ fs/nfs/nfs4xdr.c:6826:17: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign] res->op_status = hdr.status; ^ ~~ fs/nfs/nfs4xdr.c:6825:11: note: Calling 'decode_compound_hdr' status = decode_compound_hdr(xdr, &
[kbuild] drivers/infiniband/core/cma.c:4048:3: warning: Null pointer passed as 1st argument to memory copy function [clang-analyzer-unix.cstring.NullArg]
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: "Håkon Bugge" CC: Jason Gunthorpe CC: Leon Romanovsky tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: 8d0d2b0f41b1b2add8a30dbd816051a964efa497 RDMA/cma: Remove open coding of overflow checking for private_data_len date: 4 months ago :: branch date: 2 days ago :: commit date: 4 months ago config: arm-randconfig-c002-20220310 (https://download.01.org/0day-ci/archive/20220316/202203161044.lv767crh-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8d0d2b0f41b1b2add8a30dbd816051a964efa497 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout 8d0d2b0f41b1b2add8a30dbd816051a964efa497 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:335:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:323:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:315:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ drivers/infiniband/core/cma.c:4405:6: note: Loop condition is false. Exiting loop if (READ_ONCE(id_priv->state) != RDMA_CM_CONNECT) ^ include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE' compiletime_assert_rwonce_type(x); \ ^ include/asm-generic/rwonce.h:36:2: note: expanded from macro 'compiletime_assert_rwonce_type' compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long long), \ ^ include/linux/compiler_types.h:335:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:323:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:307:2: note: expanded from macro '__compiletime_assert' do {\ ^ drivers/infiniband/core/cma.c:4405:6: note: Assuming the condition is false if (READ_ONCE(id_priv->state) != RDMA_CM_CONNECT) ^ include/asm-generic/rwonce.h:47:28: note: expanded from macro 'READ_ONCE' #define READ_ONCE(x)\ ^ drivers/infiniband/core/cma.c:4405:2: note: Taking false branch if (READ_ONCE(id_priv->state) != RDMA_CM_CONNECT) ^ drivers/infiniband/core/cma.c:4408:6: note: Assuming field 'qp' is non-null if (!id->qp && conn_param) { ^~~ drivers/infiniband/core/cma.c:4408:14: note: Left side of '&&' is false if (!id->qp && conn_param) { ^ drivers/infiniband/core/cma.c:4413:6: note: Assuming the condition is true if (rdma_cap_ib_cm(id->device, id->port_num)) { ^~~~ drivers/infiniband/core/cma.c:4413:2: note: Taking true branch if (rdma_cap_ib_cm(id->device, id->port_num)) { ^ drivers/infiniband/core/cma.c:4414:7: note: Assuming field 'qp_type' is not equal to IB_QPT_UD if (id->qp_type == IB_QPT_UD) { ^~~~ drivers/infin
[kbuild] net/bluetooth/hci_event.c:3728:21: warning: Excessive padding in 'struct hci_cc' (10 padding bytes, where 2 is optimal).
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Luiz Augusto von Dentz CC: Marcel Holtmann tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 56e337f2cf1326323844927a04e9dbce9a244835 commit: c8992cffbe7411c6da4c4416d5eecfc6b78e0fec Bluetooth: hci_event: Use of a function table to handle Command Complete date: 3 months ago :: branch date: 9 hours ago :: commit date: 3 months ago config: riscv-randconfig-c006-20220310 (https://download.01.org/0day-ci/archive/20220316/202203160959.pc7lgbzc-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=c8992cffbe7411c6da4c4416d5eecfc6b78e0fec git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout c8992cffbe7411c6da4c4416d5eecfc6b78e0fec # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. Suppressed 5 warnings (5 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 3 warnings generated. Suppressed 3 warnings (3 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 4 warnings generated. Suppressed 4 warnings (4 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 4 warnings generated. Suppressed 4 warnings (4 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 4 warnings generated. Suppressed 4 warnings (4 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 4 warnings generated. Suppressed 4 warnings (4 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 4 warnings generated. Suppressed 4 warnings (4 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 5 warnings generated. drivers/media/i2c/imx258.c:781:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores] ret = imx258_write_reg(imx258, IMX258_REG_TEST_PATTERN, ^ ~ drivers/media/i2c/imx258.c:781:3: note: Value stored to 'ret' is never read
[kbuild] [linux-next:master 11036/12845] drivers/pci/vgaarb.c:235:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: Linux Memory Management List TO: Bjorn Helgaas tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: a32cd981a6da2373c093d471ee4405a915e217d5 commit: 1d38fe6ee6a874675ca3bba6b48e69a0e6176ffc [11036/12845] PCI/VGA: Move vgaarb to drivers/pci :: branch date: 12 hours ago :: commit date: 6 days ago config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220316/202203160941.xiagxvoz-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6b2f50fb47da3baeee10b1906da6e30ac5d26ec) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=1d38fe6ee6a874675ca3bba6b48e69a0e6176ffc git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 1d38fe6ee6a874675ca3bba6b48e69a0e6176ffc # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) fs/xfs/libxfs/xfs_rmap.c:2677:9: note: Assuming the condition is false ASSERT(XFS_RMAP_NON_INODE_OWNER(owner) || ^ fs/xfs/libxfs/xfs_format.h:1433:43: note: expanded from macro 'XFS_RMAP_NON_INODE_OWNER' #define XFS_RMAP_NON_INODE_OWNER(owner) (!!((owner) & (1ULL << 63))) ^ fs/xfs/xfs_linux.h:208:10: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : assfail(NULL, #expr, __FILE__, __LINE__)) ~~~^ include/linux/compiler.h:77:40: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_rmap.c:2677:41: note: Left side of '||' is true ASSERT(XFS_RMAP_NON_INODE_OWNER(owner) || ^ fs/xfs/libxfs/xfs_rmap.c:2677:2: note: '?' condition is true ASSERT(XFS_RMAP_NON_INODE_OWNER(owner) || ^ fs/xfs/xfs_linux.h:208:3: note: expanded from macro 'ASSERT' (likely(expr) ? (void)0 : assfail(NULL, #expr, __FILE__, __LINE__)) ^ include/linux/compiler.h:77:20: note: expanded from macro 'likely' # define likely(x) __builtin_expect(!!(x), 1) ^ fs/xfs/libxfs/xfs_rmap.c:2682:6: note: Assuming 'error' is 0 if (error) ^ fs/xfs/libxfs/xfs_rmap.c:2682:2: note: Taking false branch if (error) ^ fs/xfs/libxfs/xfs_rmap.c:2684:6: note: Assuming 'has_record' is not equal to 0 if (!has_record) { ^~~ fs/xfs/libxfs/xfs_rmap.c:2684:2: note: Taking false branch if (!has_record) { ^ fs/xfs/libxfs/xfs_rmap.c:2689:10: note: Calling 'xfs_rmap_get_rec' error = xfs_rmap_get_rec(cur, &irec, &has_record); ^ fs/xfs/libxfs/xfs_rmap.c:209:6: note: Assuming 'error' is 0 if (error || !*stat) ^ fs/xfs/libxfs/xfs_rmap.c:209:6: note: Left side of '||' is false fs/xfs/libxfs/xfs_rmap.c:209:15: note: Assuming the condition is false if (error || !*stat) ^~ fs/xfs/libxfs/xfs_rmap.c:209:2: note: Taking false branch if (error || !*stat) ^ fs/xfs/libxfs/xfs_rmap.c:212:6: note: Calling 'xfs_rmap_btrec_to_irec' if (xfs_rmap_btrec_to_irec(rec, irec)) ^ fs/xfs/libxfs/xfs_rmap.c:190:9: note: Calling 'xfs_rmap_irec_offset_unpack' return xfs_rmap_irec_offset_unpack(be64_to_cpu(rec->rmap.rm_offset), ^ fs/xfs/libxfs/xfs_rmap.h:70:6: note: Assuming the condition is true if (offset & ~(XFS_RMAP_OFF_MASK | XFS_RMAP_OFF_FLAGS)) ^~ fs/xfs/libxfs/xfs_rmap.h:70:2: note: Taking true branch if (offset & ~(XFS_RMAP_OFF_MASK | XFS_RMAP_OFF_FLAGS)) ^ fs/xfs/libxfs/xfs_rmap.h:71:3: note: Returning without writing to 'irec->rm_flags' return -EFSCORRUPTED; ^ fs/xfs/libxfs/xfs_rmap.h:71:3: note: Returning the value -117, which participates in a condition later return -EFSCORRUPTED; ^~~~ fs/xfs/libxfs/xfs_rmap.c:190:9: note: Returning
[kbuild] drivers/ata/pata_samsung_cf.c:117:34: warning: Division by zero [clang-analyzer-core.DivideZero]
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Damien Le Moal CC: Hannes Reinecke tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 56e337f2cf1326323844927a04e9dbce9a244835 commit: b6a64a860e1319dfbabc55b351c8b6583bd67413 ata: pata_samsung_cf: add compile test support date: 9 weeks ago :: branch date: 8 hours ago :: commit date: 9 weeks ago config: arm-randconfig-c002-20220312 (https://download.01.org/0day-ci/archive/20220316/202203160824.d9jkytvc-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b6a64a860e1319dfbabc55b351c8b6583bd67413 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout b6a64a860e1319dfbabc55b351c8b6583bd67413 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) ^~ drivers/tee/tee_core.c:582:2: note: Taking false branch if (rc) ^ drivers/tee/tee_core.c:585:6: note: Control jumps to 'case 4:' at line 585 if (put_user(arg.ret, &uarg->ret) || ^ arch/arm/include/asm/uaccess.h:369:2: note: expanded from macro 'put_user' __put_user_switch((x), (ptr), __pu_err, __put_user_check); \ ^ arch/arm/include/asm/uaccess.h:356:3: note: expanded from macro '__put_user_switch' switch (sizeof(*(ptr))) { \ ^ drivers/tee/tee_core.c:585:6: note: Execution continues on line 585 if (put_user(arg.ret, &uarg->ret) || ^ arch/arm/include/asm/uaccess.h:369:2: note: expanded from macro 'put_user' __put_user_switch((x), (ptr), __pu_err, __put_user_check); \ ^ arch/arm/include/asm/uaccess.h:359:47: note: expanded from macro '__put_user_switch' case 4: __fn(__pu_val, __pu_ptr, __err, 4); break; \ ^ drivers/tee/tee_core.c:585:6: note: Loop condition is false. Exiting loop if (put_user(arg.ret, &uarg->ret) || ^ arch/arm/include/asm/uaccess.h:369:2: note: expanded from macro 'put_user' __put_user_switch((x), (ptr), __pu_err, __put_user_check); \ ^ arch/arm/include/asm/uaccess.h:350:2: note: expanded from macro '__put_user_switch' do {\ ^ drivers/tee/tee_core.c:585:6: note: Assuming the condition is false if (put_user(arg.ret, &uarg->ret) || ^ arch/arm/include/asm/uaccess.h:366:31: note: expanded from macro 'put_user' #define put_user(x, ptr)\ ^ drivers/tee/tee_core.c:585:6: note: Left side of '||' is false if (put_user(arg.ret, &uarg->ret) || ^ arch/arm/include/asm/uaccess.h:366:31: note: expanded from macro 'put_user' #define put_user(x, ptr)\ ^ drivers/tee/tee_core.c:586:6: note: Control jumps to 'case 4:' at line 586 put_user(arg.ret_origin, &uarg->ret_origin)) { ^ arch/arm/include/asm/uaccess.h:369:2: note: expanded from macro 'put_user' __put_user_switch((x), (ptr), __pu_err, __put_user_check); \ ^ arch/arm/include/asm/uaccess.h:356:3: note: expanded from macro '__put_user_switch' switch (sizeof(*(ptr))) { \ ^ drivers/tee/tee_core.c:586:6: note: Execution continues on line 586 put_user(arg.ret_origin, &uarg->ret_origin)) { ^ arch/arm/include/asm/uaccess.h:369:2: note: expanded from macro 'put_user' __put_user_switch((x), (ptr), __pu_err, __put_user_check); \ ^ arch/arm/include/asm/uaccess.h:359:47: note: expanded from macro '__put_user_switch' case 4: __fn(__pu_val, __pu_ptr, __err, 4); break; \
[kbuild] Re: [PATCH] staging: rts5208: Resolve checkpath.pl issues.
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com In-Reply-To: References: TO: Charlie Sands TO: gre...@linuxfoundation.org CC: linux-stag...@lists.linux.dev CC: linux-ker...@vger.kernel.org Hi Charlie, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on staging/staging-testing] url: https://github.com/0day-ci/linux/commits/Charlie-Sands/staging-rts5208-Resolve-checkpath-pl-issues/20220315-102944 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 56955aae9fc2c59fa3c9b32f1f147cdbe05e5ac4 :: branch date: 22 hours ago :: commit date: 22 hours ago config: riscv-randconfig-c006-20220313 (https://download.01.org/0day-ci/archive/20220316/202203160807.k3ajx7fr-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6b2f50fb47da3baeee10b1906da6e30ac5d26ec) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://github.com/0day-ci/linux/commit/db68d91d62af3bfc71979b5fd01ca858a56a22ba git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Charlie-Sands/staging-rts5208-Resolve-checkpath-pl-issues/20220315-102944 git checkout db68d91d62af3bfc71979b5fd01ca858a56a22ba # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) Suppressed 10 warnings (3 in non-user code, 7 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 9 warnings generated. Suppressed 9 warnings (2 in non-user code, 7 with check filters). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 10 warnings generated. drivers/md/dm-kcopyd.c:246:10: warning: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'pl') [clang-analyzer-core.NullDereference] next = pl->next; ^ drivers/md/dm-kcopyd.c:913:6: note: Assuming 'kc' is non-null if (!kc) ^~~ drivers/md/dm-kcopyd.c:913:2: note: Taking false branch if (!kc) ^ drivers/md/dm-kcopyd.c:916:2: note: Loop condition is false. Exiting loop spin_lock_init(&kc->job_lock); ^ include/linux/spinlock.h:329:35: note: expanded from macro 'spin_lock_init' # define spin_lock_init(lock) \ ^ drivers/md/dm-kcopyd.c:924:6: note: Assuming 'r' is 0 if (r) ^ drivers/md/dm-kcopyd.c:924:2: note: Taking false branch if (r) ^ drivers/md/dm-kcopyd.c:927:2: note: Loop condition is false. Exiting loop INIT_WORK(&kc->kcopyd_work, do_work); ^ include/linux/workqueue.h:245:2: note: expanded from macro 'INIT_WORK' __INIT_WORK((_work), (_func), 0) ^ include/linux/workqueue.h:225:2: note: expanded from macro '__INIT_WORK' do {\ ^ drivers/md/dm-kcopyd.c:929:6: note: Assuming field 'kcopyd_wq' is non-null if (!kc->kcopyd_wq) { ^~ drivers/md/dm-kcopyd.c:929:2: note: Taking false branch if (!kc->kcopyd_wq) { ^ drivers/md/dm-kcopyd.c:939:6: note: Calling 'client_reserve_pages' r = client_reserve_pages(kc, reserve_pages); ^~~ drivers/md/dm-kcopyd.c:309:20: note: 'pl' initialized to a null pointer value struct page_list *pl = NULL, *next; ^~ drivers/md/dm-kcopyd.c:311:14: note: Assuming 'i' is >= 'nr_pages' for (i = 0; i < nr_pages; i++) { ^~~~ drivers/md/dm-kcopyd.c:311:2: note: Loop condition is false. Execution continues on line 322 for (i = 0; i < nr_pages; i++) { ^ drivers/md/dm-kcopyd.c:323:23: note: Passing null pointer value via 2nd parameter 'pl' kcopyd_put_pages(kc, pl); ^~ drivers/md/dm-kcopyd.c:323:2: note: Calling 'kcopyd_put_pages'
[kbuild] [linux-next:master 5182/12845] drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c:718:4: warning: Value stored to 'res' is never read [clang-analyzer-deadcode.DeadStores]
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: Linux Memory Management List TO: Luben Tuikov CC: Alex Deucher tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: a32cd981a6da2373c093d471ee4405a915e217d5 commit: a6c40b178092f41b9d6cc8615697c14b1e5a1c3a [5182/12845] drm/amdgpu: Show IP discovery in sysfs :: branch date: 6 hours ago :: commit date: 4 weeks ago config: riscv-randconfig-c006-20220310 (https://download.01.org/0day-ci/archive/20220316/202203160354.uzsrifrq-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a6c40b178092f41b9d6cc8615697c14b1e5a1c3a git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout a6c40b178092f41b9d6cc8615697c14b1e5a1c3a # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) ^~~~ drivers/nvmem/core.c:1481:2: note: Taking false branch if (!buf) ^ drivers/nvmem/core.c:1484:7: note: Calling '__nvmem_cell_read' rc = __nvmem_cell_read(nvmem, cell->entry, buf, len, cell->id); ^ drivers/nvmem/core.c:1441:6: note: Assuming 'rc' is not equal to 0 if (rc) ^~ drivers/nvmem/core.c:1441:2: note: Taking true branch if (rc) ^ drivers/nvmem/core.c:1484:7: note: Returning from '__nvmem_cell_read' rc = __nvmem_cell_read(nvmem, cell->entry, buf, len, cell->id); ^ drivers/nvmem/core.c:1485:6: note: 'rc' is not equal to 0 if (rc) { ^~ drivers/nvmem/core.c:1485:2: note: Taking true branch if (rc) { ^ drivers/nvmem/core.c:1691:8: note: Returning from 'nvmem_cell_read' buf = nvmem_cell_read(cell, len); ^~ drivers/nvmem/core.c:1693:6: note: Calling 'IS_ERR' if (IS_ERR(buf)) ^~~ include/linux/err.h:36:9: note: Assuming the condition is false return IS_ERR_VALUE((unsigned long)ptr); ^ include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE' #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO) ~^~~~ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x)__builtin_expect(!!(x), 0) ^ include/linux/err.h:36:2: note: Returning zero, which participates in a condition later return IS_ERR_VALUE((unsigned long)ptr); ^~~ drivers/nvmem/core.c:1693:6: note: Returning from 'IS_ERR' if (IS_ERR(buf)) ^~~ drivers/nvmem/core.c:1693:2: note: Taking false branch if (IS_ERR(buf)) ^ drivers/nvmem/core.c:1700:6: note: Assuming 'nbits' is 0 if (nbits) ^ drivers/nvmem/core.c:1700:2: note: Taking false branch if (nbits) ^ drivers/nvmem/core.c:1703:11: note: The left operand of '>' is a garbage value if (*len > max_len) { ^ Suppressed 4 warnings (4 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 3 warnings generated. Suppressed 3 warnings (3 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 3 warnings generated. Suppressed 3 warnings (3 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 3 warnings generated. Suppressed 3 warnings (3 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 3 warnings generated. Suppressed
[kbuild] [linusw-pinctrl:devel 44/71] drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:626:9: sparse: sparse: obsolete array initializer, use C99 syntax
CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-g...@vger.kernel.org TO: "Jonathan Neuschäfer" CC: Linus Walleij tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel head: 89388f8730699c259f8090ec435fb43569efe4ac commit: a1d1e0e3d80a870cc37a6c064994b89e963d2b58 [44/71] pinctrl: nuvoton: Add driver for WPCM450 :: branch date: 17 hours ago :: commit date: 18 hours ago config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20220316/202203160206.6tgmepac-...@intel.com/config) compiler: alpha-linux-gcc (GCC) 11.2.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.4-dirty # https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?id=a1d1e0e3d80a870cc37a6c064994b89e963d2b58 git remote add linusw-pinctrl https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git git fetch --no-tags linusw-pinctrl devel git checkout a1d1e0e3d80a870cc37a6c064994b89e963d2b58 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=alpha SHELL=/bin/bash drivers/pinctrl/nuvoton/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot sparse warnings: (new ones prefixed by >>) >> drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:626:9: sparse: sparse: obsolete >> array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:627:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:628:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:629:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:630:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:631:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:632:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:633:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:634:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:635:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:636:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:637:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:638:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:639:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:640:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:641:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:642:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:643:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:644:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:645:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:646:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:647:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:648:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:649:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:650:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:651:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:652:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:653:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:654:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:655:9: sparse: sparse: obsolete array initializer, use C99 syntax drivers/pinctrl/nuvoton/pinctrl-wpcm450.c:656:9: sparse: sp
[kbuild] [jlayton:ceph-fscrypt-sparse 72/74] fs/ceph/file.c:1032:9: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-an
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Jeff Layton tree: https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git ceph-fscrypt-sparse head: 0d355bda666e44314f11974167e8d9bb010a539e commit: cbe05f4053d9f2f72668b9385e0e14c11c9adf32 [72/74] ceph: use r_pp for sparse reads :: branch date: 21 hours ago :: commit date: 22 hours ago config: x86_64-randconfig-c007 (https://download.01.org/0day-ci/archive/20220316/202203160140.ightgrja-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project a6b2f50fb47da3baeee10b1906da6e30ac5d26ec) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git/commit/?id=cbe05f4053d9f2f72668b9385e0e14c11c9adf32 git remote add jlayton https://git.kernel.org/pub/scm/linux/kernel/git/jlayton/linux.git git fetch --no-tags jlayton ceph-fscrypt-sparse git checkout cbe05f4053d9f2f72668b9385e0e14c11c9adf32 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) ^ kernel/time/ntp.c:315:2: note: The value -5 is assigned to 'offset' offset = clamp(offset, -MAXPHASE, MAXPHASE); ^~~ kernel/time/ntp.c:322:6: note: Assuming the condition is true if (unlikely(time_status & STA_FREQHOLD)) ^ include/linux/compiler.h:78:40: note: expanded from macro 'unlikely' # define unlikely(x)__builtin_expect(!!(x), 0) ^~~~ kernel/time/ntp.c:322:2: note: Taking false branch if (unlikely(time_status & STA_FREQHOLD)) ^ kernel/time/ntp.c:327:2: note: The value -5 is assigned to 'offset64' offset64= offset; ^~~~ kernel/time/ntp.c:335:15: note: Assuming the condition is false if (unlikely(secs > 1 << (SHIFT_PLL + 1 + time_constant))) ^ include/linux/compiler.h:78:42: note: expanded from macro 'unlikely' # define unlikely(x)__builtin_expect(!!(x), 0) ^ kernel/time/ntp.c:335:2: note: Taking false branch if (unlikely(secs > 1 << (SHIFT_PLL + 1 + time_constant))) ^ kernel/time/ntp.c:341:16: note: Assuming '__UNIQUE_ID___x366' is >= '__UNIQUE_ID___y367' freq_adj= min(freq_adj + time_freq, MAXFREQ_SCALED); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^~ kernel/time/ntp.c:341:16: note: '?' condition is false freq_adj= min(freq_adj + time_freq, MAXFREQ_SCALED); ^ include/linux/minmax.h:45:19: note: expanded from macro 'min' #define min(x, y) __careful_cmp(x, y, <) ^ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^ include/linux/minmax.h:33:3: note: expanded from macro '__cmp_once' __cmp(unique_x, unique_y, op); }) ^ include/linux/minmax.h:28:26: note: expanded from macro '__cmp' #define __cmp(x, y, op) ((x) op (y) ? (x) : (y)) ^ kernel/time/ntp.c:343:16: note: '__UNIQUE_ID___x368' is > '__UNIQUE_ID___y369' time_freq = max(freq_adj, -MAXFREQ_SCALED); ^ include/linux/minmax.h:52:19: note: expanded from macro 'max' #define max(x, y) __careful_cmp(x, y, >) ^~ include/linux/minmax.h:38:3: note: expanded from macro '__careful_cmp' __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op)) ^~~~ include/linux/
[kbuild] sound/soc/codecs/cs35l41.c:1103:60: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition]
CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Charles Keepax CC: Mark Brown tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: fe1024d50477becf35128f3ef03bf3525a2cd140 ASoC: cs35l41: Combine adjacent register writes date: 6 months ago :: branch date: 2 days ago :: commit date: 6 months ago compiler: ia64-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> sound/soc/codecs/cs35l41.c:1103:60: warning: Boolean result is used in >> bitwise operation. Clarify expression with parentheses. [clarifyCondition] irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT | ^ sound/soc/codecs/cs35l41.c:1108:60: warning: Boolean result is used in bitwise operation. Clarify expression with parentheses. [clarifyCondition] irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT | ^ vim +1103 sound/soc/codecs/cs35l41.c 6450ef55905688 David Rhodes 2021-09-07 1094 6450ef55905688 David Rhodes 2021-09-07 1095 static int cs35l41_irq_gpio_config(struct cs35l41_private *cs35l41) 6450ef55905688 David Rhodes 2021-09-07 1096 { 6450ef55905688 David Rhodes 2021-09-07 1097 struct cs35l41_irq_cfg *irq_gpio_cfg1 = &cs35l41->pdata.irq_config1; 6450ef55905688 David Rhodes 2021-09-07 1098 struct cs35l41_irq_cfg *irq_gpio_cfg2 = &cs35l41->pdata.irq_config2; 6450ef55905688 David Rhodes 2021-09-07 1099 int irq_pol = IRQF_TRIGGER_NONE; 6450ef55905688 David Rhodes 2021-09-07 1100 fe1024d50477be Charles Keepax 2021-09-14 1101 regmap_update_bits(cs35l41->regmap, CS35L41_GPIO1_CTRL1, fe1024d50477be Charles Keepax 2021-09-14 1102 CS35L41_GPIO_POL_MASK | CS35L41_GPIO_DIR_MASK, fe1024d50477be Charles Keepax 2021-09-14 @1103 irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT | fe1024d50477be Charles Keepax 2021-09-14 1104 !irq_gpio_cfg1->irq_out_en << CS35L41_GPIO_DIR_SHIFT); fe1024d50477be Charles Keepax 2021-09-14 1105 fe1024d50477be Charles Keepax 2021-09-14 1106 regmap_update_bits(cs35l41->regmap, CS35L41_GPIO2_CTRL1, fe1024d50477be Charles Keepax 2021-09-14 1107 CS35L41_GPIO_POL_MASK | CS35L41_GPIO_DIR_MASK, fe1024d50477be Charles Keepax 2021-09-14 1108 irq_gpio_cfg1->irq_pol_inv << CS35L41_GPIO_POL_SHIFT | fe1024d50477be Charles Keepax 2021-09-14 1109 !irq_gpio_cfg1->irq_out_en << CS35L41_GPIO_DIR_SHIFT); fe1024d50477be Charles Keepax 2021-09-14 1110 fe1024d50477be Charles Keepax 2021-09-14 regmap_update_bits(cs35l41->regmap, CS35L41_GPIO_PAD_CONTROL, fe1024d50477be Charles Keepax 2021-09-14 1112 CS35L41_GPIO1_CTRL_MASK | CS35L41_GPIO2_CTRL_MASK, fe1024d50477be Charles Keepax 2021-09-14 1113 irq_gpio_cfg1->irq_src_sel << CS35L41_GPIO1_CTRL_SHIFT | fe1024d50477be Charles Keepax 2021-09-14 1114 irq_gpio_cfg2->irq_src_sel << CS35L41_GPIO2_CTRL_SHIFT); 6450ef55905688 David Rhodes 2021-09-07 1115 6450ef55905688 David Rhodes 2021-09-07 1116 if ((irq_gpio_cfg2->irq_src_sel == 6450ef55905688 David Rhodes 2021-09-07 1117 (CS35L41_GPIO_CTRL_ACTV_LO | CS35L41_VALID_PDATA)) || 6450ef55905688 David Rhodes 2021-09-07 1118 (irq_gpio_cfg2->irq_src_sel == 6450ef55905688 David Rhodes 2021-09-07 1119 (CS35L41_GPIO_CTRL_OPEN_INT | CS35L41_VALID_PDATA))) 6450ef55905688 David Rhodes 2021-09-07 1120 irq_pol = IRQF_TRIGGER_LOW; 6450ef55905688 David Rhodes 2021-09-07 1121 else if (irq_gpio_cfg2->irq_src_sel == 6450ef55905688 David Rhodes 2021-09-07 1122 (CS35L41_GPIO_CTRL_ACTV_HI | CS35L41_VALID_PDATA)) 6450ef55905688 David Rhodes 2021-09-07 1123 irq_pol = IRQF_TRIGGER_HIGH; 6450ef55905688 David Rhodes 2021-09-07 1124 6450ef55905688 David Rhodes 2021-09-07 1125 return irq_pol; 6450ef55905688 David Rhodes 2021-09-07 1126 } 6450ef55905688 David Rhodes 2021-09-07 1127 --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] drivers/ata/pata_bk3710.c:179:4: warning: Value stored to 'mode' is never read [clang-analyzer-deadcode.DeadStores]
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Damien Le Moal CC: Hannes Reinecke tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: a3d11c275b647b5b56b907011b432e00f7ddb683 ata: pata_bk3710: add compile test support date: 9 weeks ago :: branch date: 2 days ago :: commit date: 9 weeks ago config: arm-randconfig-c002-20220312 (https://download.01.org/0day-ci/archive/20220315/202203152104.ixpb2whf-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 276ca87382b8f16a65bddac700202924228982f6) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm cross compiling tool for clang build # apt-get install binutils-arm-linux-gnueabi # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a3d11c275b647b5b56b907011b432e00f7ddb683 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout a3d11c275b647b5b56b907011b432e00f7ddb683 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 8 warnings generated. Suppressed 8 warnings (8 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 10 warnings generated. drivers/crypto/hifn_795x.c:598:8: warning: Excessive padding in 'struct hifn_crypto_alg' (52 padding bytes, where 20 is optimal). Optimal fields order: alg, dev, entry, consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding] struct hifn_crypto_alg { ~~~^ drivers/crypto/hifn_795x.c:598:8: note: Excessive padding in 'struct hifn_crypto_alg' (52 padding bytes, where 20 is optimal). Optimal fields order: alg, dev, entry, consider reordering the fields or adding explicit padding members struct hifn_crypto_alg { ~~~^ drivers/crypto/hifn_795x.c:1103:3: warning: Null pointer passed as 2nd argument to memory copy function [clang-analyzer-unix.cstring.NullArg] memcpy(buf_pos, iv, ivsize); ^ drivers/crypto/hifn_795x.c:1125:2: note: Control jumps to 'case 1:' at line 1129 switch (rctx->op) { ^ drivers/crypto/hifn_795x.c:1131:3: note: Execution continues on line 1139 break; ^ drivers/crypto/hifn_795x.c:1142:12: note: Field 'op' is equal to ACRYPTO_OP_ENCRYPT if (rctx->op == ACRYPTO_OP_ENCRYPT || rctx->op == ACRYPTO_OP_DECRYPT) { ^ drivers/crypto/hifn_795x.c:1142:37: note: Left side of '||' is true if (rctx->op == ACRYPTO_OP_ENCRYPT || rctx->op == ACRYPTO_OP_DECRYPT) { ^ drivers/crypto/hifn_795x.c:1145:7: note: Assuming field 'keysize' is not equal to 0 if (ctx->keysize) ^~~~ drivers/crypto/hifn_795x.c:1145:3: note: Taking true branch if (ctx->keysize) ^ drivers/crypto/hifn_795x.c:1147:7: note: Assuming field 'iv' is null if (rctx->iv && rctx->mode != ACRYPTO_MODE_ECB) ^~~~ drivers/crypto/hifn_795x.c:1147:16: note: Left side of '&&' is false if (rctx->iv && rctx->mode != ACRYPTO_MODE_ECB) ^ drivers/crypto/hifn_795x.c:1150:3: note: Control jumps to 'case 3:' at line 1160 switch (rctx->mode) { ^ drivers/crypto/hifn_795x.c:1162:4: note: Execution continues on line 1167 break; ^ drivers/crypto/hifn_795x.c:1167:3: note: Control jumps to 'case 4:' at line 1191 switch (rctx->type) { ^ drivers/crypto/hifn_795x.c:1192:8: note:
[kbuild] drivers/net/ethernet/intel/ice/ice_main.c:5677 ice_update_vsi_tx_ring_stats() error: we previously assumed 'ring' could be null (see line 5673)
CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Maciej Fijalkowski CC: Tony Nguyen tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: e72bba21355dbb67512a0d666fec9f4b56dbfc2f ice: split ice_ring onto Tx/Rx separate structs date: 5 months ago :: branch date: 2 days ago :: commit date: 5 months ago config: riscv-randconfig-m031-20220313 (https://download.01.org/0day-ci/archive/20220315/202203151711.sjqusxnj-...@intel.com/config) compiler: riscv64-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: drivers/net/ethernet/intel/ice/ice_main.c:5677 ice_update_vsi_tx_ring_stats() error: we previously assumed 'ring' could be null (see line 5673) vim +/ring +5677 drivers/net/ethernet/intel/ice/ice_main.c fcea6f3da546b93 Anirudh Venkataramanan 2018-03-20 5654 49d358e0e746dc2 Marta Plantykow2020-05-15 5655 /** 49d358e0e746dc2 Marta Plantykow2020-05-15 5656 * ice_update_vsi_tx_ring_stats - Update VSI Tx ring stats counters 49d358e0e746dc2 Marta Plantykow2020-05-15 5657 * @vsi: the VSI to be updated 49d358e0e746dc2 Marta Plantykow2020-05-15 5658 * @rings: rings to work on 49d358e0e746dc2 Marta Plantykow2020-05-15 5659 * @count: number of rings 49d358e0e746dc2 Marta Plantykow2020-05-15 5660 */ 49d358e0e746dc2 Marta Plantykow2020-05-15 5661 static void e72bba21355dbb6 Maciej Fijalkowski 2021-08-19 5662 ice_update_vsi_tx_ring_stats(struct ice_vsi *vsi, struct ice_tx_ring **rings, 49d358e0e746dc2 Marta Plantykow2020-05-15 5663 u16 count) 49d358e0e746dc2 Marta Plantykow2020-05-15 5664 { 49d358e0e746dc2 Marta Plantykow2020-05-15 5665 struct rtnl_link_stats64 *vsi_stats = &vsi->net_stats; 49d358e0e746dc2 Marta Plantykow2020-05-15 5666 u16 i; 49d358e0e746dc2 Marta Plantykow2020-05-15 5667 49d358e0e746dc2 Marta Plantykow2020-05-15 5668 for (i = 0; i < count; i++) { e72bba21355dbb6 Maciej Fijalkowski 2021-08-19 5669 struct ice_tx_ring *ring; e72bba21355dbb6 Maciej Fijalkowski 2021-08-19 5670 u64 pkts = 0, bytes = 0; 49d358e0e746dc2 Marta Plantykow2020-05-15 5671 49d358e0e746dc2 Marta Plantykow2020-05-15 5672 ring = READ_ONCE(rings[i]); e72bba21355dbb6 Maciej Fijalkowski 2021-08-19 @5673 if (ring) e72bba21355dbb6 Maciej Fijalkowski 2021-08-19 5674 ice_fetch_u64_stats_per_ring(&ring->syncp, ring->stats, &pkts, &bytes); 49d358e0e746dc2 Marta Plantykow2020-05-15 5675 vsi_stats->tx_packets += pkts; 49d358e0e746dc2 Marta Plantykow2020-05-15 5676 vsi_stats->tx_bytes += bytes; 49d358e0e746dc2 Marta Plantykow2020-05-15 @5677 vsi->tx_restart += ring->tx_stats.restart_q; 49d358e0e746dc2 Marta Plantykow2020-05-15 5678 vsi->tx_busy += ring->tx_stats.tx_busy; 49d358e0e746dc2 Marta Plantykow2020-05-15 5679 vsi->tx_linearize += ring->tx_stats.tx_linearize; 49d358e0e746dc2 Marta Plantykow2020-05-15 5680 } 49d358e0e746dc2 Marta Plantykow2020-05-15 5681 } 49d358e0e746dc2 Marta Plantykow2020-05-15 5682 :: The code at line 5677 was first introduced by commit :: 49d358e0e746dc24bfb1b1cf98c17064e5177424 ice: Add XDP Tx to VSI ring stats :: TO: Marta Plantykow :: CC: Jeff Kirsher --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] drivers/md/dm-raid.c:3218:44-45: WARNING opportunity for min()
CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Denis Efremov CC: Julia Lawall tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script date: 11 months ago :: branch date: 2 days ago :: commit date: 11 months ago config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220315/202203151730.ficowvqr-...@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Julia Lawall cocci warnings: (new ones prefixed by >>) >> drivers/md/dm-raid.c:3218:44-45: WARNING opportunity for min() Please review and possibly fold the followup patch. --- 0-DAY CI Kernel Test Service https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] [PATCH] coccinelle: misc: fix minmax.cocci warnings
CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Denis Efremov CC: Julia Lawall CC: Alasdair Kergon CC: Mike Snitzer CC: dm-de...@redhat.com CC: linux-ker...@vger.kernel.org From: kernel test robot drivers/md/dm-raid.c:3218:44-45: WARNING opportunity for min() Check for opencoded min(), max() implementations. Generated patches sometimes require adding a cast to fix compile warning. Warnings/patches scope intentionally limited to a function body. Generated by: scripts/coccinelle/misc/minmax.cocci CC: Denis Efremov Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax script :: branch date: 2 days ago :: commit date: 11 months ago Please take the patch only if it's a positive warning. Thanks! drivers/md/dm-raid.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -3215,7 +3215,8 @@ size_check: if (r) goto bad; - rs_setup_recovery(rs, rs->md.recovery_cp < rs->md.dev_sectors ? rs->md.recovery_cp : rs->md.dev_sectors); + rs_setup_recovery(rs, + min(rs->md.recovery_cp, rs->md.dev_sectors)); } else { /* This is no size change or it is shrinking, update size and record in superblocks */ r = rs_set_dev_and_array_sectors(rs, rs->ti->len, false); ___ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org
[kbuild] drivers/pci/controller/pcie-mediatek-gen3.c:239:4: warning: Value stored to 'range_type' is never read [clang-analyzer-deadcode.DeadStores]
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Jianjun Wang CC: Lorenzo Pieralisi tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: d3bf75b579b980b9d83a76d3b4d8bfb9f55b24ca PCI: mediatek-gen3: Add MediaTek Gen3 driver for MT8192 date: 11 months ago :: branch date: 2 days ago :: commit date: 11 months ago config: riscv-randconfig-c006-20220307 (https://download.01.org/0day-ci/archive/20220315/202203151649.ilnvofk9-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install riscv cross compiling tool for clang build # apt-get install binutils-riscv64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d3bf75b579b980b9d83a76d3b4d8bfb9f55b24ca git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git fetch --no-tags linus master git checkout d3bf75b579b980b9d83a76d3b4d8bfb9f55b24ca # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) list_entry((ptr)->next, type, member) ^ include/linux/list.h:511:2: note: expanded from macro 'list_entry' container_of(ptr, type, member) ^ include/linux/kernel.h:709:61: note: expanded from macro 'container_of' BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \ ^ drivers/pci/controller/pcie-mediatek-gen3.c:229:2: note: Taking false branch resource_list_for_each_entry(entry, &host->windows) { ^ include/linux/resource_ext.h:64:2: note: expanded from macro 'resource_list_for_each_entry' list_for_each_entry((entry), (list), node) ^ include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member);\ ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:320:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:308:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:300:3: note: expanded from macro '__compiletime_assert' if (!(condition)) \ ^ drivers/pci/controller/pcie-mediatek-gen3.c:229:2: note: Loop condition is false. Exiting loop resource_list_for_each_entry(entry, &host->windows) { ^ include/linux/resource_ext.h:64:2: note: expanded from macro 'resource_list_for_each_entry' list_for_each_entry((entry), (list), node) ^ include/linux/list.h:628:13: note: expanded from macro 'list_for_each_entry' for (pos = list_first_entry(head, typeof(*pos), member);\ ^ include/linux/list.h:522:2: note: expanded from macro 'list_first_entry' list_entry((ptr)->next, type, member) ^ note: (skipping 3 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) include/linux/compiler_types.h:320:2: note: expanded from macro 'compiletime_assert' _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__) ^ include/linux/compiler_types.h:308:2: note: expanded from macro '_compiletime_assert' __compiletime_assert(condition, msg, prefix, suffix) ^ include/linux/compiler_types.h:298:2: note: expanded from macro '__compiletime_assert' do {\ ^ drivers/pci/controller/pcie-mediatek-gen3.c:229:2: note: Loop condition is true. Entering loop body resource_list_for_each_entry(entry, &host->windows) { ^ include/linux/resource_
[kbuild] [linux-next:master 8478/11953] lib/stackinit_kunit.c:259:8: warning: Excessive padding in 'struct test_big_hole' (124 padding bytes, where 60 is optimal).
CC: l...@lists.linux.dev CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: Linux Memory Management List TO: Kees Cook tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 71941773e143369a73c9c4a3b62fbb60736a1182 commit: 8d60400704e503ded9f0c2ea32c2303d22955888 [8478/11953] lib: stackinit: Convert to KUnit :: branch date: 5 days ago :: commit date: 2 weeks ago config: mips-randconfig-c004-20220302 (https://download.01.org/0day-ci/archive/20220315/202203151502.kyjfs2eg-...@intel.com/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project d271fc04d5b97b12e6b797c6067d3c96a8d7470e) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install mips cross compiling tool for clang build # apt-get install binutils-mips-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=8d60400704e503ded9f0c2ea32c2303d22955888 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout 8d60400704e503ded9f0c2ea32c2303d22955888 # save the config file to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips clang-analyzer If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot clang-analyzer warnings: (new ones prefixed by >>) kernel/rcu/rcuscale.c:431:3: note: Taking true branch if (gp_async) { ^ kernel/rcu/rcuscale.c:433:9: note: 'rhp' is non-null if (!rhp) ^~~ kernel/rcu/rcuscale.c:433:4: note: Taking false branch if (!rhp) ^ kernel/rcu/rcuscale.c:435:8: note: 'rhp' is non-null if (rhp && atomic_read(this_cpu_ptr(&n_async_inflight)) < gp_async_max) { ^~~ kernel/rcu/rcuscale.c:435:8: note: Left side of '&&' is true kernel/rcu/rcuscale.c:435:27: note: Loop condition is false. Exiting loop if (rhp && atomic_read(this_cpu_ptr(&n_async_inflight)) < gp_async_max) { ^ include/linux/percpu-defs.h:265:27: note: expanded from macro 'this_cpu_ptr' #define this_cpu_ptr(ptr) raw_cpu_ptr(ptr) ^ include/linux/percpu-defs.h:264:26: note: expanded from macro 'raw_cpu_ptr' #define raw_cpu_ptr(ptr)per_cpu_ptr(ptr, 0) ^ include/linux/percpu-defs.h:263:47: note: expanded from macro 'per_cpu_ptr' #define per_cpu_ptr(ptr, cpu) ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); }) ^ include/linux/percpu-defs.h:259:2: note: expanded from macro 'VERIFY_PERCPU_PTR' __verify_pcpu_ptr(__p); \ ^ include/linux/percpu-defs.h:217:37: note: expanded from macro '__verify_pcpu_ptr' #define __verify_pcpu_ptr(ptr) \ ^ kernel/rcu/rcuscale.c:435:15: note: Assuming the condition is false if (rhp && atomic_read(this_cpu_ptr(&n_async_inflight)) < gp_async_max) { ^~~ kernel/rcu/rcuscale.c:435:4: note: Taking false branch if (rhp && atomic_read(this_cpu_ptr(&n_async_inflight)) < gp_async_max) { ^ kernel/rcu/rcuscale.c:439:15: note: Assuming the condition is false } else if (!kthread_should_stop()) { ^~ kernel/rcu/rcuscale.c:439:11: note: Taking false branch } else if (!kthread_should_stop()) { ^ kernel/rcu/rcuscale.c:443:5: note: Attempt to free released memory kfree(rhp); /* Because we are stopping. */ ^~ Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppressed 1 warnings (1 in non-user code). Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well. 1 warning generated. Suppr
[kbuild] Re: [PATCH] NFSD: prevent integer overflow on 32 bit systems
CC: kbuild-...@lists.01.org BCC: l...@intel.com In-Reply-To: <20220314140958.GE30883@kili> References: <20220314140958.GE30883@kili> TO: Dan Carpenter TO: Chuck Lever TO: Trond Myklebust CC: Anna Schumaker CC: linux-...@vger.kernel.org CC: kernel-janit...@vger.kernel.org CC: Harshit Mogalapalli Hi Dan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on trondmy-nfs/linux-next] [also build test WARNING on linus/master v5.17-rc8 next-20220310] [cannot apply to cel-2.6/for-next] [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/Dan-Carpenter/NFSD-prevent-integer-overflow-on-32-bit-systems/20220314-221126 base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next :: branch date: 17 hours ago :: commit date: 17 hours ago config: x86_64-randconfig-m001-20220314 (https://download.01.org/0day-ci/archive/20220315/202203151552.rotmz4kf-...@intel.com/config) compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: include/linux/sunrpc/xdr.h:734 xdr_stream_decode_uint32_array() warn: impossible condition '(len > (~0) / 4) => (0-u32max > 4611686018427387903)' Old smatch warnings: fs/nfs/nfs4xdr.c:1194 encode_attrs() error: we previously assumed 'umask' could be null (see line 1103) vim +734 include/linux/sunrpc/xdr.h 37c88763def8474 Trond Myklebust 2018-03-20 712 37c88763def8474 Trond Myklebust 2018-03-20 713 /** 37c88763def8474 Trond Myklebust 2018-03-20 714 * xdr_stream_decode_uint32_array - Decode variable length array of integers 37c88763def8474 Trond Myklebust 2018-03-20 715 * @xdr: pointer to xdr_stream 37c88763def8474 Trond Myklebust 2018-03-20 716 * @array: location to store the integer array or NULL 37c88763def8474 Trond Myklebust 2018-03-20 717 * @array_size: number of elements to store 37c88763def8474 Trond Myklebust 2018-03-20 718 * 37c88763def8474 Trond Myklebust 2018-03-20 719 * Return values: 37c88763def8474 Trond Myklebust 2018-03-20 720 * On success, returns number of elements stored in @array 37c88763def8474 Trond Myklebust 2018-03-20 721 * %-EBADMSG on XDR buffer overflow 37c88763def8474 Trond Myklebust 2018-03-20 722 * %-EMSGSIZE if the size of the array exceeds @array_size 37c88763def8474 Trond Myklebust 2018-03-20 723 */ 37c88763def8474 Trond Myklebust 2018-03-20 724 static inline ssize_t 37c88763def8474 Trond Myklebust 2018-03-20 725 xdr_stream_decode_uint32_array(struct xdr_stream *xdr, 37c88763def8474 Trond Myklebust 2018-03-20 726 __u32 *array, size_t array_size) 37c88763def8474 Trond Myklebust 2018-03-20 727 { 37c88763def8474 Trond Myklebust 2018-03-20 728 __be32 *p; 37c88763def8474 Trond Myklebust 2018-03-20 729 __u32 len; 37c88763def8474 Trond Myklebust 2018-03-20 730 ssize_t retval; 37c88763def8474 Trond Myklebust 2018-03-20 731 37c88763def8474 Trond Myklebust 2018-03-20 732 if (unlikely(xdr_stream_decode_u32(xdr, &len) < 0)) 37c88763def8474 Trond Myklebust 2018-03-20 733 return -EBADMSG; 455f80f80ed3496 Dan Carpenter 2022-03-14 @734 if (len > ULONG_MAX / sizeof(*p)) 455f80f80ed3496 Dan Carpenter 2022-03-14 735 return -EBADMSG; 37c88763def8474 Trond Myklebust 2018-03-20 736 p = xdr_inline_decode(xdr, len * sizeof(*p)); 37c88763def8474 Trond Myklebust 2018-03-20 737 if (unlikely(!p)) 37c88763def8474 Trond Myklebust 2018-03-20 738 return -EBADMSG; 37c88763def8474 Trond Myklebust 2018-03-20 739 if (array == NULL) 37c88763def8474 Trond Myklebust 2018-03-20 740 return len; 37c88763def8474 Trond Myklebust 2018-03-20 741 if (len <= array_size) { 37c88763def8474 Trond Myklebust 2018-03-20 742 if (len < array_size) 37c88763def8474 Trond Myklebust 2018-03-20 743 memset(array+len, 0, (array_size-len)*sizeof(*array)); 37c88763def8474 Trond Myklebust 2018-03-20 744 array_size = len; 37c88763def8474 Trond Myklebust 2018-03-20 745 retval = len; 37c88763def8474 Trond Myklebust 2018-03-20 746 } else 37c88763def8474 Trond Myklebust 2018-03-20 747 retval = -EMSGSIZE; 37c88763def8474 Trond Myklebust 2018-03-20 748 for (; array_size > 0; p++, array++, array_size--) 37c88763def8474 Trond Myklebust 2018-03-20 749 *array = be32_to_cpup(p); 37c88763def8474 Trond Myklebust 2018-03-20 750 return retval; 37c88763def8474 Trond Myklebust 2018-03-20 751 } ^1da177e4c3f415 Linus Torvalds 20
[kbuild] drivers/net/ethernet/qlogic/qed/qed_debug.c:7955 format_feature() error: uninitialized symbol 'txt_size_bytes'.
CC: kbuild-...@lists.01.org BCC: l...@intel.com CC: linux-ker...@vger.kernel.org TO: Prabhakar Kushwaha CC: Ariel Elior CC: Shai Malin CC: Omkar Kulkarni tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 09688c0166e76ce2fb85e86b9d99be8b0084cdf9 commit: 6c95dd8f0aa1d983e857a755fca7001677d1dcb5 qed: Update debug related changes date: 5 months ago :: branch date: 35 hours ago :: commit date: 5 months ago config: riscv-randconfig-m031-20220313 (https://download.01.org/0day-ci/archive/20220315/202203151436.sd0ycwvt-...@intel.com/config) compiler: riscv64-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: drivers/net/ethernet/qlogic/qed/qed_debug.c:7955 format_feature() error: uninitialized symbol 'txt_size_bytes'. Old smatch warnings: drivers/net/ethernet/qlogic/qed/qed_debug.c:5262 qed_dbg_grc_config() warn: unsigned 'grc_param' is never less than zero. drivers/net/ethernet/qlogic/qed/qed_debug.c:8043 qed_dbg_dump() error: uninitialized symbol 'buf_size_dwords'. drivers/net/ethernet/qlogic/qed/qed_debug.c:8637 qed_dbg_feature_size() error: uninitialized symbol 'buf_size_dwords'. vim +/txt_size_bytes +7955 drivers/net/ethernet/qlogic/qed/qed_debug.c c965db44462919f Tomer Tayar2016-09-07 7924 c965db44462919f Tomer Tayar2016-09-07 7925 #define QED_RESULTS_BUF_MIN_SIZE 16 c965db44462919f Tomer Tayar2016-09-07 7926 /* Generic function for decoding debug feature info */ 8c93beaf5714b9d Yuval Mintz2016-10-13 7927 static enum dbg_status format_feature(struct qed_hwfn *p_hwfn, c965db44462919f Tomer Tayar2016-09-07 7928 enum qed_dbg_features feature_idx) c965db44462919f Tomer Tayar2016-09-07 7929 { c965db44462919f Tomer Tayar2016-09-07 7930 struct qed_dbg_feature *feature = ca352f00756e7bd Igor Russkikh 2020-05-14 7931 &p_hwfn->cdev->dbg_features[feature_idx]; 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7932 u32 txt_size_bytes, null_char_pos, i; 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7933 u32 *dbuf, dwords; c965db44462919f Tomer Tayar2016-09-07 7934 enum dbg_status rc; c965db44462919f Tomer Tayar2016-09-07 7935 char *text_buf; c965db44462919f Tomer Tayar2016-09-07 7936 c965db44462919f Tomer Tayar2016-09-07 7937 /* Check if feature supports formatting capability */ c965db44462919f Tomer Tayar2016-09-07 7938 if (!qed_features_lookup[feature_idx].results_buf_size) c965db44462919f Tomer Tayar2016-09-07 7939 return DBG_STATUS_OK; c965db44462919f Tomer Tayar2016-09-07 7940 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7941 dbuf = (u32 *)feature->dump_buf; 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7942 dwords = feature->dumped_dwords; 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7943 c965db44462919f Tomer Tayar2016-09-07 7944 /* Obtain size of formatted output */ 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7945 rc = qed_features_lookup[feature_idx].results_buf_size(p_hwfn, 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7946 dbuf, 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7947 dwords, 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7948 &txt_size_bytes); c965db44462919f Tomer Tayar2016-09-07 7949 if (rc != DBG_STATUS_OK) c965db44462919f Tomer Tayar2016-09-07 7950 return rc; c965db44462919f Tomer Tayar2016-09-07 7951 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7952 /* Make sure that the allocated size is a multiple of dword 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7953 * (4 bytes). 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7954 */ 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 @7955 null_char_pos = txt_size_bytes - 1; 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7956 txt_size_bytes = (txt_size_bytes + 3) & ~0x3; c965db44462919f Tomer Tayar2016-09-07 7957 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7958 if (txt_size_bytes < QED_RESULTS_BUF_MIN_SIZE) { c965db44462919f Tomer Tayar2016-09-07 7959 DP_NOTICE(p_hwfn->cdev, c965db44462919f Tomer Tayar2016-09-07 7960 "formatted size of feature was too small %d. Aborting\n", 6c95dd8f0aa1d98 Prabhakar Kushwaha 2021-10-04 7961 txt_size_bytes); c965db44462919f Tomer Tayar2016-09-07 7962 return DBG_STATUS_INVALID_ARGS; c965db44462919f Tomer Tayar2016-09-07