[kbuild] drivers/net/ethernet/asix/ax88796c_main.c:50:5: warning: Uninitialized variable: ret [uninitvar]

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: "Łukasz Stelmach" 
CC: Jakub Kicinski 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   12119cfa1052d512a92524e90ebee85029a918f8
commit: a97c69ba4f30e46abb9cc7be8b98227cb468fdf9 net: ax88796c: ASIX AX88796C 
SPI Ethernet Adapter Driver
date:   6 weeks ago
:: branch date: 11 hours ago
:: commit date: 6 weeks ago
compiler: alpha-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)

>> drivers/net/ethernet/asix/ax88796c_main.c:50:5: warning: Uninitialized 
>> variable: ret [uninitvar]
   (ret & PSR_DEV_READY),
   ^
   drivers/net/ethernet/asix/ax88796c_main.c:79:5: warning: Uninitialized 
variable: ret [uninitvar]
   (ret & PSR_DEV_READY),
   ^

vim +50 drivers/net/ethernet/asix/ax88796c_main.c

a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  38  
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  39  static int 
ax88796c_soft_reset(struct ax88796c_device *ax_local)
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  40  {
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  41   u16 temp;
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  42   int ret;
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  43  
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  44   
lockdep_assert_held(_local->spi_lock);
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  45  
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  46   AX_WRITE(_local->ax_spi, 
PSR_RESET, P0_PSR);
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  47   AX_WRITE(_local->ax_spi, 
PSR_RESET_CLR, P0_PSR);
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  48  
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  49   ret = 
read_poll_timeout(AX_READ, ret,
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20 @50   (ret & 
PSR_DEV_READY),
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  51   0, 
jiffies_to_usecs(160 * HZ / 1000), false,
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  52   
_local->ax_spi, P0_PSR);
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  53   if (ret)
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  54   return ret;
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  55  
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  56   temp = 
AX_READ(_local->ax_spi, P4_SPICR);
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  57   if (ax_local->priv_flags & 
AX_CAP_COMP) {
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  58   
AX_WRITE(_local->ax_spi,
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  59(temp | 
SPICR_RCEN | SPICR_QCEN), P4_SPICR);
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  60   ax_local->ax_spi.comp = 
1;
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  61   } else {
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  62   
AX_WRITE(_local->ax_spi,
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  63(temp & 
~(SPICR_RCEN | SPICR_QCEN)), P4_SPICR);
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  64   ax_local->ax_spi.comp = 
0;
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  65   }
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  66  
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  67   return 0;
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  68  }
a97c69ba4f30e4 Łukasz Stelmach 2021-10-20  69  

---
0-DAY CI Kernel Test Service, Intel Corporation
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] Re: [PATCH v5 net-next 10/12] flow_offload: add reoffload process to update hw_count

2021-12-03 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
In-Reply-To: <20211203122444.11756-11-simon.hor...@corigine.com>
References: <20211203122444.11756-11-simon.hor...@corigine.com>
TO: Simon Horman 
TO: net...@vger.kernel.org
CC: Cong Wang 
CC: Ido Schimmel 
CC: Jamal Hadi Salim 
CC: Jiri Pirko 
CC: Oz Shlomo 
CC: Roi Dayan 
CC: Vlad Buslov 
CC: Baowen Zheng 
CC: Louis Peens 

Hi Simon,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:
https://github.com/0day-ci/linux/commits/Simon-Horman/allow-user-to-offload-tc-action-to-net-device/20211203-202602
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
43332cf97425a3e5508c827c82201ecc5ddd54e0
:: branch date: 18 hours ago
:: commit date: 18 hours ago
config: arm-randconfig-c002-20211203 
(https://download.01.org/0day-ci/archive/20211204/202112041452.e8urxhjp-...@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
d30fcadf07ee552f20156ea90be2fdb54cb9cb08)
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://github.com/0day-ci/linux/commit/d99abedd4989e77746fd533944253094f5e8965b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Simon-Horman/allow-user-to-offload-tc-action-to-net-device/20211203-202602
git checkout d99abedd4989e77746fd533944253094f5e8965b
# 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 >>)
   ^~
   net/core/dev.c:3122:4: warning: Value stored to 'name' is never read 
[clang-analyzer-deadcode.DeadStores]
   name = dev_driver_string(dev->dev.parent);
   ^  ~~
   net/core/dev.c:3122:4: note: Value stored to 'name' is never read
   name = dev_driver_string(dev->dev.parent);
   ^  ~~
   net/core/dev.c:3124:4: warning: Value stored to 'name' is never read 
[clang-analyzer-deadcode.DeadStores]
   name = netdev_name(dev);
   ^  
   net/core/dev.c:3124:4: note: Value stored to 'name' is never read
   name = netdev_name(dev);
   ^  
   net/core/dev.c:7145:19: warning: Access to field 'lower_level' results in a 
dereference of a null pointer (loaded from variable 'dev') 
[clang-analyzer-core.NullDereference]
   dev->lower_level = __netdev_lower_depth(dev) + 1;
^
   net/core/dev.c:7604:33: note: Passing value via 2nd parameter 'upper_dev'
   __netdev_upper_dev_unlink(dev, upper_dev, );
  ^
   net/core/dev.c:7604:2: note: Calling '__netdev_upper_dev_unlink'
   __netdev_upper_dev_unlink(dev, upper_dev, );
   ^~~~
   net/core/dev.c:7568:2: note: Assuming the condition is false
   ASSERT_RTNL();
   ^
   include/linux/rtnetlink.h:110:12: note: expanded from macro 'ASSERT_RTNL'
   WARN_ONCE(!rtnl_is_locked(), \
 ^
   include/asm-generic/bug.h:180:46: note: expanded from macro 'WARN_ONCE'
   #define WARN_ONCE(condition, format...) WARN(condition, format)
^
   include/asm-generic/bug.h:173:25: note: expanded from macro 'WARN'
   int __ret_warn_on = !!(condition);  \
  ^
   net/core/dev.c:7568:2: note: Taking false branch
   ASSERT_RTNL();
   ^
   include/linux/rtnetlink.h:110:2: note: expanded from macro 'ASSERT_RTNL'
   WARN_ONCE(!rtnl_is_locked(), \
   ^
   include/asm-generic/bug.h:180:41: note: expanded from macro 'WARN_ONCE'
   #define WARN_ONCE(condition, format...) WARN(condition, format)
   ^
   include/asm-generic/bug.h:174:2: note: expanded from macro 'WARN'
   no_printk(format);  \
   ^
   include/linux/printk.h:131:2: note: expanded from macro 'no_printk'
   if (0)  \
   ^
   net/core/dev.c:7570:28: note: Assuming pointer value is null
   changeupper_info.master = netdev_master_upper

[kbuild] include/asm-generic/bitops/fls64.h:21:14: warning: The result of the '>>' expression is undefined [clang-analyzer-core.UndefinedBinaryOperatorResult]

2021-12-03 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Jakub Jelinek 
CC: "Peter Zijlstra (Intel)" 
CC: Andrew Morton 
CC: Linux Memory Management List 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   12119cfa1052d512a92524e90ebee85029a918f8
commit: 2f78788b55baa3410b1ec91a576286abe1ad4d6a ilog2: improve ilog2 for 
constant arguments
date:   12 months ago
:: branch date: 10 hours ago
:: commit date: 12 months ago
config: riscv-randconfig-c006-20211128 
(https://download.01.org/0day-ci/archive/20211204/202112041446.zgvkgxj5-...@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
4b553297ef3ee4dc2119d5429adf3072e90fac38)
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=2f78788b55baa3410b1ec91a576286abe1ad4d6a
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2f78788b55baa3410b1ec91a576286abe1ad4d6a
# 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/gpu/drm/amd/amdgpu/amdgpu_vm.c:1636:6: note: Left side of '&&' is 
true
   if (!unlocked && !dma_fence_is_signaled(vm->last_unlocked)) {
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1636:2: note: Taking false branch
   if (!unlocked && !dma_fence_is_signaled(vm->last_unlocked)) {
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1645:6: note: Assuming 'r' is 0
   if (r)
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1645:2: note: Taking false branch
   if (r)
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1653:7: note: 'nodes' is null
   if (nodes) {
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1653:3: note: Taking false branch
   if (nodes) {
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1661:7: note: 'pages_addr' is null
   if (pages_addr) {
   ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1661:3: note: Taking false branch
   if (pages_addr) {
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1691:10: note: Taking true branch
   } else if (flags & (AMDGPU_PTE_VALID | AMDGPU_PTE_PRT)) {
  ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1697:7: note: Calling 
'amdgpu_vm_update_ptes'
   r = amdgpu_vm_update_ptes(, start, tmp, addr, flags);
   ^~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1442:2: note: Calling 
'amdgpu_vm_fragment'
   amdgpu_vm_fragment(params, frag_start, end, flags, , _end);
   ^~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1395:6: note: Assuming field 
'asic_type' is >= CHIP_VEGA10
   if (params->adev->asic_type < CHIP_VEGA10)
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1395:2: note: Taking false branch
   if (params->adev->asic_type < CHIP_VEGA10)
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1401:6: note: Assuming field 
'pages_addr' is non-null
   if (params->pages_addr) {
   ^~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1401:2: note: Taking true branch
   if (params->pages_addr) {
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1404:3: note: Returning without 
writing to 'params->unlocked', which participates in a condition later
   return;
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1442:2: note: Returning from 
'amdgpu_vm_fragment'
   amdgpu_vm_fragment(params, frag_start, end, flags, , _end);
   ^~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1446:9: note: Assuming 'end' is > 
field 'pfn'
   while (cursor.pfn < end) {
  ^~~~
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1446:2: note: Loop condition is true. 
 Entering loop body
   while (cursor.pfn < end) {
   ^
   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1451:7: note: Assuming field 
'unlocked' is true
   if (!params->unlocked) {
   

[kbuild] Re: [PATCH v9 3/3] media: i2c: isl7998x: Add driver for Intersil ISL7998x

2021-12-03 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
In-Reply-To: <20211129112708.3219754-4-m.tret...@pengutronix.de>
References: <20211129112708.3219754-4-m.tret...@pengutronix.de>
TO: Michael Tretter 
TO: linux-me...@vger.kernel.org
TO: devicet...@vger.kernel.org
TO: Marek Vasut 
CC: Rob Herring 
CC: Mauro Carvalho Chehab 
CC: Sakari Ailus 
CC: p.za...@pengutronix.de
CC: Ian Arkver 
CC: ker...@pengutronix.de
CC: Michael Tretter 

Hi Michael,

I love your patch! Perhaps something to improve:

[auto build test WARNING on media-tree/master]
[also build test WARNING on robh/for-next linus/master v5.16-rc3 next-20211203]
[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/Michael-Tretter/media-i2c-isl7998x-Add-driver-for-Intersil-ISL7998x/20211129-204304
base:   git://linuxtv.org/media_tree.git master
:: branch date: 5 days ago
:: commit date: 5 days ago
config: i386-randconfig-c001-20211130 
(https://download.01.org/0day-ci/archive/20211204/202112041345.avl2qjn6-...@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
25eb7fa01d7ebbe67648ea03841cda55b4239ab2)
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://github.com/0day-ci/linux/commit/0cd375b25d1d515c40b89e8aaffd0456a19ecffb
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Michael-Tretter/media-i2c-isl7998x-Add-driver-for-Intersil-ISL7998x/20211129-204304
git checkout 0cd375b25d1d515c40b89e8aaffd0456a19ecffb
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386 
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 >>)
 ^
   mm/mmap.c:3132:6: note: Assuming the condition is false
   if (unlikely(mm_is_oom_victim(mm))) {
   ^
   include/linux/compiler.h:78:22: note: expanded from macro 'unlikely'
   # define unlikely(x)__builtin_expect(!!(x), 0)
   ^~
   mm/mmap.c:3132:2: note: Taking false branch
   if (unlikely(mm_is_oom_victim(mm))) {
   ^
   mm/mmap.c:3156:6: note: Assuming field 'locked_vm' is 0
   if (mm->locked_vm)
   ^
   mm/mmap.c:3156:2: note: Taking false branch
   if (mm->locked_vm)
   ^
   mm/mmap.c:3159:2: note: Calling 'arch_exit_mmap'
   arch_exit_mmap(mm);
   ^~
   arch/x86/include/asm/mmu_context.h:176:2: note: Calling 
'paravirt_arch_exit_mmap'
   paravirt_arch_exit_mmap(mm);
   ^~~
   arch/x86/include/asm/paravirt.h:97:2: note: Assigned value is garbage or 
undefined
   PVOP_VCALL1(mmu.exit_mmap, mm);
   ^
   arch/x86/include/asm/paravirt_types.h:531:2: note: expanded from macro 
'PVOP_VCALL1'
   __PVOP_VCALL(op, PVOP_CALL_ARG1(arg1))
   ^~
   arch/x86/include/asm/paravirt_types.h:492:8: note: expanded from macro 
'__PVOP_VCALL'
   (void)PVOP_CALL(, op, CLBR_ANY, PVOP_VCALL_CLOBBERS,\
 ^~~
   arch/x86/include/asm/paravirt_types.h:447:3: note: expanded from macro 
'PVOP_CALL'
   PVOP_CALL_ARGS; \
   ^~
   arch/x86/include/asm/paravirt_types.h:387:16: note: expanded from macro 
'PVOP_CALL_ARGS'
   unsigned long __eax = __eax, __edx = __edx, __ecx = __ecx;
 ^   ~
   Suppressed 6 warnings (6 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.
   6 warnings generated.
   Suppressed 6 warnings (6 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.
   6 warnings generated.
   arch/x86/include/asm/paravirt.h:55:2: warning: Assigned value is garbage or 
undefined [clang-analyzer-core.uninitialized.Assign]
   PVOP_VCALL0(cpu.io_delay);
   ^
   arch/x86/include/asm/paravirt_types.h:512:2: note: expanded from macro 
'PVOP_VCALL0'
   __PVOP_VCALL(op)
   ^
   arch/x86/include/asm/paravirt_types.h:492:8: note: expanded from macro 
'__PVOP_VCALL'
   (void)PVOP_CALL(, op, CLBR_ANY, PVOP_VCALL_CLOBBERS,\
 ^
   arch/x86/include/as

[kbuild] Re: [PATCH 25/36] xfs: combine __xfs_alloc_vextent_this_ag and xfs_alloc_ag_vextent

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
In-Reply-To: <20211203000111.2800982-26-da...@fromorbit.com>
References: <20211203000111.2800982-26-da...@fromorbit.com>
TO: Dave Chinner 
TO: linux-...@vger.kernel.org

Hi Dave,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on xfs-linux/for-next]
[also build test WARNING on v5.16-rc3 next-20211203]
[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/Dave-Chinner/xfs-more-work-towards-shrinking/20211203-080331
base:   https://git.kernel.org/pub/scm/fs/xfs/xfs-linux.git for-next
:: branch date: 29 hours ago
:: commit date: 29 hours ago
config: x86_64-randconfig-m001-20211203 
(https://download.01.org/0day-ci/archive/20211204/202112041242.73kkirhp-...@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: Dan Carpenter 

New smatch warnings:
fs/xfs/libxfs/xfs_alloc.c:2746 xfs_alloc_fix_freelist() error: we previously 
assumed 'agbp' could be null (see line 2640)

Old smatch warnings:
fs/xfs/libxfs/xfs_alloc.c:2737 xfs_alloc_fix_freelist() warn: missing error 
code 'error'

vim +/agbp +2746 fs/xfs/libxfs/xfs_alloc.c

301519674699aa fs/xfs/libxfs/xfs_alloc.c Chandan Babu R2021-01-22  2586  
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2587  /*
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2588   * 
Decide whether to use this allocation group for this allocation.
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2589   * 
If so, fix up the btree freelist's size.
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2590   */
2e9101da604779 fs/xfs/libxfs/xfs_alloc.c Darrick J. Wong   2016-01-04  2591  
int/* error */
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2592  
xfs_alloc_fix_freelist(
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2593 
struct xfs_alloc_arg*args,  /* allocation argument structure */
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2594 
int flags)  /* XFS_ALLOC_FLAG_... */
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2595  {
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2596 
struct xfs_mount*mp = args->mp;
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2597 
struct xfs_perag*pag = args->pag;
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2598 
struct xfs_trans*tp = args->tp;
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2599 
struct xfs_buf  *agbp = NULL;
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2600 
struct xfs_buf  *agflbp = NULL;
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2601 
struct xfs_alloc_argtargs;  /* local allocation arguments */
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2602 
xfs_agblock_t   bno;/* freelist block */
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2603 
xfs_extlen_tneed;   /* total blocks needed in freelist */
c184f855c48342 fs/xfs/libxfs/xfs_alloc.c Jan Kara  2015-08-25  2604 
int error = 0;
^1da177e4c3f41 fs/xfs/xfs_alloc.cLinus Torvalds2005-04-16  2605  
362f5e745ae2ee fs/xfs/libxfs/xfs_alloc.c Brian Foster  2019-04-23  2606 
/* deferred ops (AGFL block frees) require permanent transactions */
362f5e745ae2ee fs/xfs/libxfs/xfs_alloc.c Brian Foster  2019-04-23  2607 
ASSERT(tp->t_flags & XFS_TRANS_PERM_LOG_RES);
362f5e745ae2ee fs/xfs/libxfs/xfs_alloc.c Brian Foster  2019-04-23  2608  
26473009ed961c fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2021-12-03  2609 
if (!xfs_perag_initialised_agf(pag)) {
bf14ac7fff281f fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2021-12-03  2610 
error = xfs_alloc_read_agf(pag, tp, flags, );
f48e2df8a877ca fs/xfs/libxfs/xfs_alloc.c Darrick J. Wong   2020-01-23  2611 
if (error) {
f48e2df8a877ca fs/xfs/libxfs/xfs_alloc.c Darrick J. Wong   2020-01-23  2612 
/* Couldn't lock the AGF so skip this AG. */
f48e2df8a877ca fs/xfs/libxfs/xfs_alloc.c Darrick J. Wong   2020-01-23  2613 
if (error == -EAGAIN)
f48e2df8a877ca fs/xfs/libxfs/xfs_alloc.c Darrick J. Wong   2020-01-23  2614 
error = 0;
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c Dave Chinner  2015-06-22  2615 
goto out_no_agbp;
396503fc8397e9 fs/xfs/libxfs/xfs_alloc.c 

[kbuild] drivers/mtd/nand/raw/atmel/nand-controller.c:1532 atmel_nand_setup_interface() warn: passing a valid pointer to 'PTR_ERR'

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Miquel Raynal 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   12119cfa1052d512a92524e90ebee85029a918f8
commit: ed2a491037116387f109e851a2b46adcb5feca3b mtd: rawnand: atmel: Check the 
proposed data interface is supported
date:   6 months ago
:: branch date: 7 hours ago
:: commit date: 6 months ago
config: nios2-randconfig-m031-20211202 
(https://download.01.org/0day-ci/archive/20211204/202112041148.r2lyxa8f-...@intel.com/config)
compiler: nios2-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/mtd/nand/raw/atmel/nand-controller.c:1532 atmel_nand_setup_interface() 
warn: passing a valid pointer to 'PTR_ERR'

vim +/PTR_ERR +1532 drivers/mtd/nand/raw/atmel/nand-controller.c

f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1522  
4c46667b3d6725 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2020-05-29  1523  static int atmel_nand_setup_interface(struct nand_chip *chip, 
int csline,
4c46667b3d6725 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2020-05-29  1524  const struct 
nand_interface_config *conf)
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1525  {
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1526struct atmel_nand *nand = to_atmel_nand(chip);
ed2a4910371163 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2021-05-05  1527const struct nand_sdr_timings *sdr;
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1528struct atmel_nand_controller *nc;
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1529  
ed2a4910371163 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2021-05-05  1530sdr = nand_get_sdr_timings(conf);
ed2a4910371163 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2021-05-05  1531if (IS_ERR(sdr))
ed2a4910371163 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2021-05-05 @1532return PTR_ERR(sdr);
ed2a4910371163 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2021-05-05  1533  
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1534nc = to_nand_controller(nand->base.controller);
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1535  
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1536if (csline >= nand->numcs ||
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1537(csline < 0 && csline != NAND_DATA_IFACE_CHECK_ONLY))
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1538return -EINVAL;
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1539  
4c46667b3d6725 drivers/mtd/nand/raw/atmel/nand-controller.c Miquel Raynal   
2020-05-29  1540return nc->caps->ops->setup_interface(nand, csline, conf);
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1541  }
f9ce2eddf1769a drivers/mtd/nand/atmel/nand-controller.c Boris Brezillon 
2017-03-16  1542  

---
0-DAY CI Kernel Test Service, Intel Corporation
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] [linux-next:master 4657/5128] block/blk-mq.c:2796 blk_mq_submit_bio() warn: variable dereferenced before check 'bio' (see line 2777)

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: Linux Memory Management List 
TO: Jens Axboe 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   7afeac307a9561e3a93682c1e7eb22f918aa1187
commit: f9786e04d49fd5c492152a4daf6b95a5da9973a2 [4657/5128] block: fix double 
bio queue when merging in cached request path
:: branch date: 14 hours ago
:: commit date: 27 hours ago
config: nios2-randconfig-m031-20211202 
(https://download.01.org/0day-ci/archive/20211204/202112040656.usl56oyt-...@intel.com/config)
compiler: nios2-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:
block/blk-mq.c:2796 blk_mq_submit_bio() warn: variable dereferenced before 
check 'bio' (see line 2777)

Old smatch warnings:
arch/nios2/include/asm/thread_info.h:71 current_thread_info() error: 
uninitialized symbol 'sp'.
block/blk-mq.c:2997 blk_rq_prep_clone() error: uninitialized symbol 'bio'.

vim +/bio +2796 block/blk-mq.c

71539717c10521 Jens Axboe2021-11-03  2761  
105663f73e71b5 André Almeida 2020-01-06  2762  /**
c62b37d96b6eb3 Christoph Hellwig 2020-07-01  2763   * blk_mq_submit_bio - 
Create and send a request to block device.
105663f73e71b5 André Almeida 2020-01-06  2764   * @bio: Bio pointer.
105663f73e71b5 André Almeida 2020-01-06  2765   *
105663f73e71b5 André Almeida 2020-01-06  2766   * Builds up a request 
structure from @q and @bio and send to the device. The
105663f73e71b5 André Almeida 2020-01-06  2767   * request may not be queued 
directly to hardware if:
105663f73e71b5 André Almeida 2020-01-06  2768   * * This request can be 
merged with another one
105663f73e71b5 André Almeida 2020-01-06  2769   * * We want to place 
request at plug queue for possible future merging
105663f73e71b5 André Almeida 2020-01-06  2770   * * There is an IO 
scheduler active at this queue
105663f73e71b5 André Almeida 2020-01-06  2771   *
105663f73e71b5 André Almeida 2020-01-06  2772   * It will not queue the 
request if there is an error with the bio, or at the
105663f73e71b5 André Almeida 2020-01-06  2773   * request creation.
105663f73e71b5 André Almeida 2020-01-06  2774   */
3e08773c3841e9 Christoph Hellwig 2021-10-12  2775  void 
blk_mq_submit_bio(struct bio *bio)
07068d5b8ed8fa Jens Axboe2014-05-22  2776  {
ed6cddefdfd361 Pavel Begunkov2021-10-14 @2777   struct request_queue *q 
= bdev_get_queue(bio->bi_bdev);
5b13bc8a3fd519 Christoph Hellwig 2021-11-24  2778   struct blk_plug *plug = 
blk_mq_plug(q, bio);
ef295ecf090d3e Christoph Hellwig 2016-10-28  2779   const int is_sync = 
op_is_sync(bio->bi_opf);
07068d5b8ed8fa Jens Axboe2014-05-22  2780   struct request *rq;
abd45c159df5fc Jens Axboe2021-10-13  2781   unsigned int nr_segs = 
1;
a892c8d52c0228 Satya Tangirala   2020-05-14  2782   blk_status_t ret;
07068d5b8ed8fa Jens Axboe2014-05-22  2783  
900e080752025f Jens Axboe2021-11-03  2784   if 
(unlikely(!blk_crypto_bio_prep()))
900e080752025f Jens Axboe2021-11-03  2785   return;
900e080752025f Jens Axboe2021-11-03  2786  
07068d5b8ed8fa Jens Axboe2014-05-22  2787   blk_queue_bounce(q, 
);
abd45c159df5fc Jens Axboe2021-10-13  2788   if (blk_may_split(q, 
bio))
abd45c159df5fc Jens Axboe2021-10-13  2789   
__blk_queue_split(q, , _segs);
f36ea50ca0043e Wen Xiong 2017-05-10  2790  
e23947bd76f007 Dmitry Monakhov   2017-06-29  2791   if 
(!bio_integrity_prep(bio))
900e080752025f Jens Axboe2021-11-03  2792   return;
87760e5eef3597 Jens Axboe2016-11-09  2793  
f9786e04d49fd5 Jens Axboe2021-12-02  2794   rq = 
blk_mq_get_cached_request(q, plug, , nr_segs);
5b13bc8a3fd519 Christoph Hellwig 2021-11-24  2795   if (!rq) {
f9786e04d49fd5 Jens Axboe2021-12-02 @2796   if (!bio)
f9786e04d49fd5 Jens Axboe2021-12-02  2797   return;
5b13bc8a3fd519 Christoph Hellwig 2021-11-24  2798   rq = 
blk_mq_get_new_requests(q, plug, bio, nr_segs);
71539717c10521 Jens Axboe2021-11-03  2799   if 
(unlikely(!rq))
900e080752025f Jens Axboe2021-11-03  2800   return;
5b13bc8a3fd519 Christoph Hellwig 2021-11-24  2801   }
87760e5eef3597 Jens Axboe2016-11-09  2802  
e8a676d61c07ec Christoph Hellwig 2020-12-03  2803   trace_block_getrq(bio);
d6f1dda2725190 Xiaoguang Wang2018-10-23  2804  
c1c80384c8f470 Josef Bacik   2018-07-03  2805   rq_qos_track(q, rq, 
bio);
320ae51feed5c2 Jens Axboe2013-10-24  2806  
14ccb66b3f585b Christoph Hellwig 2019-06-06  2807   
blk_mq_bio_to_request(rq, bio, nr_segs);
923218f6166a84 Ming Lei  2017-11-02  2808  
a892c8d52c0228 Satya Tangirala   2020-05-14  2809   ret = 

[kbuild] Re: [RFC][PATCH v6 1/5] trace: Add trace any kernel object

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
In-Reply-To: <20211129164951.220511-2-xiehua...@gmail.com>
References: <20211129164951.220511-2-xiehua...@gmail.com>
TO: Jeff Xie 

Hi Jeff,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on rostedt-trace/for-next]
[also build test WARNING on linux/master linus/master v5.16-rc3 next-20211203]
[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/Jeff-Xie/trace-Introduce-objtrace-trigger-to-trace-the-kernel-object/20211130-041958
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git 
for-next
:: branch date: 4 days ago
:: commit date: 4 days ago
config: i386-randconfig-m021-20211128 
(https://download.01.org/0day-ci/archive/20211204/202112040300.0gtw1wdi-...@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: Dan Carpenter 

smatch warnings:
kernel/trace/trace_object.c:533 exit_trace_object() error: uninitialized symbol 
'ret'.

vim +/ret +533 kernel/trace/trace_object.c

88ea43d691b098 Jeff Xie 2021-11-30  513  
88ea43d691b098 Jeff Xie 2021-11-30  514  static int exit_trace_object(void)
88ea43d691b098 Jeff Xie 2021-11-30  515  {
88ea43d691b098 Jeff Xie 2021-11-30  516 int ret;
88ea43d691b098 Jeff Xie 2021-11-30  517  
88ea43d691b098 Jeff Xie 2021-11-30  518 if 
(WARN_ON_ONCE(atomic_read(_object_ref) <= 0))
88ea43d691b098 Jeff Xie 2021-11-30  519 goto out;
88ea43d691b098 Jeff Xie 2021-11-30  520  
88ea43d691b098 Jeff Xie 2021-11-30  521 if 
(atomic_dec_return(_object_ref) != 0) {
88ea43d691b098 Jeff Xie 2021-11-30  522 ret = 0;
88ea43d691b098 Jeff Xie 2021-11-30  523 goto out;
88ea43d691b098 Jeff Xie 2021-11-30  524 }
88ea43d691b098 Jeff Xie 2021-11-30  525  
88ea43d691b098 Jeff Xie 2021-11-30  526 ret = 
unregister_ftrace_function(_ops);
88ea43d691b098 Jeff Xie 2021-11-30  527 if (ret) {
88ea43d691b098 Jeff Xie 2021-11-30  528 pr_err("can't 
unregister ftrace for trace object\n");
88ea43d691b098 Jeff Xie 2021-11-30  529 goto out;
88ea43d691b098 Jeff Xie 2021-11-30  530 }
88ea43d691b098 Jeff Xie 2021-11-30  531 free_object_pool();
88ea43d691b098 Jeff Xie 2021-11-30  532  out:
88ea43d691b098 Jeff Xie 2021-11-30 @533 return ret;

---
0-DAY CI Kernel Test Service, Intel Corporation
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] net/sched/sch_cake.c:1094 cake_tcph_may_drop() warn: masked condition '(((tcph)->words[3]) & (__builtin_bswap32(((255787008))))) != 4096' is always true.

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Luc Van Oostenryck 
CC: Andrew Morton 
CC: Linux Memory Management List 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   5f58da2befa58edf3a70b91ed87ed9bf77f1e70e
commit: d991bb1c8da842a2a0b9dc83b1005e655783f861 include/linux/compiler-gcc.h: 
sparse can do constant folding of __builtin_bswap*()
date:   7 months ago
:: branch date: 21 hours ago
:: commit date: 7 months ago
config: x86_64-randconfig-m001-20211203 
(https://download.01.org/0day-ci/archive/20211204/202112040327.ywgpbpdi-...@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: Dan Carpenter 

New smatch warnings:
net/sched/sch_cake.c:1094 cake_tcph_may_drop() warn: masked condition 
'(((tcph)->words[3]) & (__builtin_bswap32(((255787008) != 4096' is always 
true.

Old smatch warnings:
net/sched/sch_cake.c:776 cake_hash() error: buffer overflow 'q->flows' 1024 <= 
1030
net/sched/sch_cake.c:788 cake_hash() error: buffer overflow 'q->flows' 1024 <= 
1030
net/sched/sch_cake.c:811 cake_hash() error: buffer overflow 'q->hosts' 1024 <= 
1030
net/sched/sch_cake.c:814 cake_hash() error: buffer overflow 'q->hosts' 1024 <= 
1030
net/sched/sch_cake.c:834 cake_hash() error: buffer overflow 'q->hosts' 1024 <= 
1030
net/sched/sch_cake.c:837 cake_hash() error: buffer overflow 'q->hosts' 1024 <= 
1030
net/sched/sch_cake.c:1353 cake_overhead() warn: should 'off << 16' be a 64 bit 
type?

vim +1094 net/sched/sch_cake.c

8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1076  
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1077  static bool 
cake_tcph_may_drop(const struct tcphdr *tcph,
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1078  
   u32 tstamp_new, u32 tsecr_new)
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1079  {
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1080  /* inspired by 
tcp_parse_options in tcp_input.c */
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1081  int length = 
__tcp_hdrlen(tcph) - sizeof(struct tcphdr);
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1082  const u8 *ptr = 
(const u8 *)(tcph + 1);
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1083  u32 tstamp, 
tsecr;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1084  
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1085  /* 3 reserved 
flags must be unset to avoid future breakage
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1086   * ACK must be 
set
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1087   * ECE/CWR are 
handled separately
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1088   * All other 
flags URG/PSH/RST/SYN/FIN must be unset
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1089   * 0x0FFF = 
all TCP flags (confirm ACK=1, others zero)
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1090   * 0x00C0 = 
CWR/ECE (handled separately)
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1091   * 0x0F3F = 
0x0FFF & ~0x00C0
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1092   */
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1093  if 
(((tcp_flag_word(tcph) &
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06 @1094
cpu_to_be32(0x0F3F)) != TCP_FLAG_ACK))
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1095  return 
false;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1096  
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1097  while (length > 
0) {
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1098  int 
opcode = *ptr++;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1099  int 
opsize;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1100  
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1101  if 
(opcode == TCPOPT_EOL)
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1102  
break;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1103  if 
(opcode == TCPOPT_NOP) {
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1104  
length--;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1105  
continue;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1106  }
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1107  opsize 
= *ptr++;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1108  if 
(opsize < 2 || opsize > length)
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1109  
break;
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06  1110  
8b7138814f2993 Toke Høiland-Jørgensen 2018-07-06    switch 

[kbuild] drivers/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: should 'offset << 10' be a 64 bit type?

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: "Rafał Miłecki" 
CC: Miquel Raynal 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   5f58da2befa58edf3a70b91ed87ed9bf77f1e70e
commit: bb17230c61a6424b622e92006ec52ba23aa5a967 mtd: parsers: ofpart: support 
BCM4908 fixed partitions
date:   9 months ago
:: branch date: 20 hours ago
:: commit date: 9 months ago
config: nios2-randconfig-m031-20211202 
(https://download.01.org/0day-ci/archive/20211204/202112040342.avfc4sdj-...@intel.com/config)
compiler: nios2-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/mtd/parsers/ofpart_bcm4908.c:41 bcm4908_partitions_fw_offset() warn: 
should 'offset << 10' be a 64 bit type?

vim +41 drivers/mtd/parsers/ofpart_bcm4908.c

bb17230c61a642 Rafał Miłecki 2021-03-01  16  
bb17230c61a642 Rafał Miłecki 2021-03-01  17  static long long 
bcm4908_partitions_fw_offset(void)
bb17230c61a642 Rafał Miłecki 2021-03-01  18  {
bb17230c61a642 Rafał Miłecki 2021-03-01  19 struct device_node *root;
bb17230c61a642 Rafał Miłecki 2021-03-01  20 struct property *prop;
bb17230c61a642 Rafał Miłecki 2021-03-01  21 const char *s;
bb17230c61a642 Rafał Miłecki 2021-03-01  22  
bb17230c61a642 Rafał Miłecki 2021-03-01  23 root = 
of_find_node_by_path("/");
bb17230c61a642 Rafał Miłecki 2021-03-01  24 if (!root)
bb17230c61a642 Rafał Miłecki 2021-03-01  25 return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  26  
bb17230c61a642 Rafał Miłecki 2021-03-01  27 
of_property_for_each_string(root, "brcm_blparms", prop, s) {
bb17230c61a642 Rafał Miłecki 2021-03-01  28 size_t len = 
strlen(BLPARAMS_FW_OFFSET);
bb17230c61a642 Rafał Miłecki 2021-03-01  29 unsigned long offset;
bb17230c61a642 Rafał Miłecki 2021-03-01  30 int err;
bb17230c61a642 Rafał Miłecki 2021-03-01  31  
bb17230c61a642 Rafał Miłecki 2021-03-01  32 if (strncmp(s, 
BLPARAMS_FW_OFFSET, len) || s[len] != '=')
bb17230c61a642 Rafał Miłecki 2021-03-01  33 continue;
bb17230c61a642 Rafał Miłecki 2021-03-01  34  
bb17230c61a642 Rafał Miłecki 2021-03-01  35 err = kstrtoul(s + len 
+ 1, 0, );
bb17230c61a642 Rafał Miłecki 2021-03-01  36 if (err) {
bb17230c61a642 Rafał Miłecki 2021-03-01  37 pr_err("failed 
to parse %s\n", s + len + 1);
bb17230c61a642 Rafał Miłecki 2021-03-01  38 return err;
bb17230c61a642 Rafał Miłecki 2021-03-01  39 }
bb17230c61a642 Rafał Miłecki 2021-03-01  40  
bb17230c61a642 Rafał Miłecki 2021-03-01 @41 return offset << 10;
bb17230c61a642 Rafał Miłecki 2021-03-01  42 }
bb17230c61a642 Rafał Miłecki 2021-03-01  43  
bb17230c61a642 Rafał Miłecki 2021-03-01  44 return -ENOENT;
bb17230c61a642 Rafał Miłecki 2021-03-01  45  }
bb17230c61a642 Rafał Miłecki 2021-03-01  46  

---
0-DAY CI Kernel Test Service, Intel Corporation
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] [rui:amd-pstate-dev-v5 6/22] drivers/cpufreq/amd-pstate.c:206 amd_get_max_freq() warn: should 'max_perf << 10' be a 64 bit type?

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Huang Rui 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/rui/linux.git 
amd-pstate-dev-v5
head:   33ee93463b3b2fe05043d5be31bfb12475d7b142
commit: 912ee85e7c162de04823c6b061d5a9a482556d91 [6/22] cpufreq: amd: introduce 
a new amd pstate driver to support future processors
:: branch date: 3 days ago
:: commit date: 3 days ago
config: x86_64-randconfig-m001-20211202 
(https://download.01.org/0day-ci/archive/20211204/202112040034.407y1amq-...@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: Dan Carpenter 

smatch warnings:
drivers/cpufreq/amd-pstate.c:206 amd_get_max_freq() warn: should 'max_perf << 
10' be a 64 bit type?
drivers/cpufreq/amd-pstate.c:243 amd_get_lowest_nonlinear_freq() warn: should 
'lowest_nonlinear_perf << 10' be a 64 bit type?

vim +206 drivers/cpufreq/amd-pstate.c

912ee85e7c162de Huang Rui 2021-06-10  191  
912ee85e7c162de Huang Rui 2021-06-10  192  static int amd_get_max_freq(struct 
amd_cpudata *cpudata)
912ee85e7c162de Huang Rui 2021-06-10  193  {
912ee85e7c162de Huang Rui 2021-06-10  194   struct cppc_perf_caps cppc_perf;
912ee85e7c162de Huang Rui 2021-06-10  195   u32 max_perf, max_freq, 
nominal_freq, nominal_perf;
912ee85e7c162de Huang Rui 2021-06-10  196   u64 boost_ratio;
912ee85e7c162de Huang Rui 2021-06-10  197  
912ee85e7c162de Huang Rui 2021-06-10  198   int ret = 
cppc_get_perf_caps(cpudata->cpu, _perf);
912ee85e7c162de Huang Rui 2021-06-10  199   if (ret)
912ee85e7c162de Huang Rui 2021-06-10  200   return ret;
912ee85e7c162de Huang Rui 2021-06-10  201  
912ee85e7c162de Huang Rui 2021-06-10  202   nominal_freq = 
cppc_perf.nominal_freq;
912ee85e7c162de Huang Rui 2021-06-10  203   nominal_perf = 
READ_ONCE(cpudata->nominal_perf);
912ee85e7c162de Huang Rui 2021-06-10  204   max_perf = 
READ_ONCE(cpudata->highest_perf);
912ee85e7c162de Huang Rui 2021-06-10  205  
912ee85e7c162de Huang Rui 2021-06-10 @206   boost_ratio = div_u64(max_perf 
<< SCHED_CAPACITY_SHIFT,
912ee85e7c162de Huang Rui 2021-06-10  207 
nominal_perf);
912ee85e7c162de Huang Rui 2021-06-10  208  
912ee85e7c162de Huang Rui 2021-06-10  209   max_freq = nominal_freq * 
boost_ratio >> SCHED_CAPACITY_SHIFT;
912ee85e7c162de Huang Rui 2021-06-10  210  
912ee85e7c162de Huang Rui 2021-06-10  211   /* Switch to khz */
912ee85e7c162de Huang Rui 2021-06-10  212   return max_freq * 1000;
912ee85e7c162de Huang Rui 2021-06-10  213  }
912ee85e7c162de Huang Rui 2021-06-10  214  
912ee85e7c162de Huang Rui 2021-06-10  215  static int 
amd_get_nominal_freq(struct amd_cpudata *cpudata)
912ee85e7c162de Huang Rui 2021-06-10  216  {
912ee85e7c162de Huang Rui 2021-06-10  217   struct cppc_perf_caps cppc_perf;
912ee85e7c162de Huang Rui 2021-06-10  218  
912ee85e7c162de Huang Rui 2021-06-10  219   int ret = 
cppc_get_perf_caps(cpudata->cpu, _perf);
912ee85e7c162de Huang Rui 2021-06-10  220   if (ret)
912ee85e7c162de Huang Rui 2021-06-10  221   return ret;
912ee85e7c162de Huang Rui 2021-06-10  222  
912ee85e7c162de Huang Rui 2021-06-10  223   /* Switch to khz */
912ee85e7c162de Huang Rui 2021-06-10  224   return cppc_perf.nominal_freq * 
1000;
912ee85e7c162de Huang Rui 2021-06-10  225  }
912ee85e7c162de Huang Rui 2021-06-10  226  
912ee85e7c162de Huang Rui 2021-06-10  227  static int 
amd_get_lowest_nonlinear_freq(struct amd_cpudata *cpudata)
912ee85e7c162de Huang Rui 2021-06-10  228  {
912ee85e7c162de Huang Rui 2021-06-10  229   struct cppc_perf_caps cppc_perf;
912ee85e7c162de Huang Rui 2021-06-10  230   u32 lowest_nonlinear_freq, 
lowest_nonlinear_perf,
912ee85e7c162de Huang Rui 2021-06-10  231   nominal_freq, nominal_perf;
912ee85e7c162de Huang Rui 2021-06-10  232   u64 lowest_nonlinear_ratio;
912ee85e7c162de Huang Rui 2021-06-10  233  
912ee85e7c162de Huang Rui 2021-06-10  234   int ret = 
cppc_get_perf_caps(cpudata->cpu, _perf);
912ee85e7c162de Huang Rui 2021-06-10  235   if (ret)
912ee85e7c162de Huang Rui 2021-06-10  236   return ret;
912ee85e7c162de Huang Rui 2021-06-10  237  
912ee85e7c162de Huang Rui 2021-06-10  238   nominal_freq = 
cppc_perf.nominal_freq;
912ee85e7c162de Huang Rui 2021-06-10  239   nominal_perf = 
READ_ONCE(cpudata->nominal_perf);
912ee85e7c162de Huang Rui 2021-06-10  240  
912ee85e7c162de Huang Rui 2021-06-10  241   lowest_nonlinear_perf = 
cppc_perf.lowest_nonlinear_perf;
912ee85e7c162de Huang Rui 2021-06-10  242  
912ee85e7c162de Huang Rui 2021-06-10 @243   lowest_nonlinear_ratio = 
div_u64(lowest_nonlinear_perf << SCHED_CAPACITY_SHIFT,
912ee85e7c162de Huang Rui 2021-06-10  244   
 nominal_perf);
912ee85e7c162de Huang Rui 2021-06-10  245  
912ee85e7c162de Huang Rui 2021-06-10  246   

[kbuild] drivers/phy/xilinx/phy-zynqmp.c:941 xpsgtr_get_ref_clocks() warn: 'clk' not released on lines: 941.

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Manish Narani 
CC: Vinod Koul 
CC: Laurent Pinchart 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   5f58da2befa58edf3a70b91ed87ed9bf77f1e70e
commit: 67097754afc90a5def9d54c599d0862fe992f5a0 phy: zynqmp: Handle the clock 
enable/disable properly
date:   8 months ago
:: branch date: 17 hours ago
:: commit date: 8 months ago
config: nios2-randconfig-m031-20211202 
(https://download.01.org/0day-ci/archive/20211203/202112032347.rdsjvg3s-...@intel.com/config)
compiler: nios2-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/phy/xilinx/phy-zynqmp.c:941 xpsgtr_get_ref_clocks() warn: 'clk' not 
released on lines: 941.

vim +/clk +941 drivers/phy/xilinx/phy-zynqmp.c

4a33bea003144e Anurag Kumar Vulisha 2020-06-29  879  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  880  /*
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  881   * Probe & Platform Driver
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  882   */
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  883  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  884  static int 
xpsgtr_get_ref_clocks(struct xpsgtr_dev *gtr_dev)
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  885  {
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  886 unsigned int refclk;
67097754afc90a Manish Narani2021-03-24  887 int ret;
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  888  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  889 for (refclk = 0; refclk 
< ARRAY_SIZE(gtr_dev->refclk_sscs); ++refclk) {
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  890 unsigned long 
rate;
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  891 unsigned int i;
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  892 struct clk *clk;
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  893 char name[8];
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  894  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  895 snprintf(name, 
sizeof(name), "ref%u", refclk);
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  896 clk = 
devm_clk_get_optional(gtr_dev->dev, name);
67097754afc90a Manish Narani2021-03-24  897 if 
(IS_ERR(clk)) {
67097754afc90a Manish Narani2021-03-24  898 ret = 
dev_err_probe(gtr_dev->dev, PTR_ERR(clk),
3dbbc8e97cb267 Michal Simek 2021-02-04  899 
"Failed to get reference clock %u\n",
3dbbc8e97cb267 Michal Simek 2021-02-04  900 
refclk);
67097754afc90a Manish Narani2021-03-24  901 goto 
err_clk_put;
67097754afc90a Manish Narani2021-03-24  902 }
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  903  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  904 if (!clk)
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  905 
continue;
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  906  
67097754afc90a Manish Narani2021-03-24  907 ret = 
clk_prepare_enable(clk);
67097754afc90a Manish Narani2021-03-24  908 if (ret)
67097754afc90a Manish Narani2021-03-24  909 goto 
err_clk_put;
67097754afc90a Manish Narani2021-03-24  910  
67097754afc90a Manish Narani2021-03-24  911 
gtr_dev->clk[refclk] = clk;
67097754afc90a Manish Narani2021-03-24  912  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  913 /*
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  914  * Get the 
spread spectrum (SSC) settings for the reference
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  915  * clock rate.
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  916  */
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  917 rate = 
clk_get_rate(clk);
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  918  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  919 for (i = 0 ; i 
< ARRAY_SIZE(ssc_lookup); i++) {
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  920 if 
(rate == ssc_lookup[i].refclk_rate) {
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  921 
gtr_dev->refclk_sscs[refclk] = _lookup[i];
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  922 
break;
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  923 }
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  924 }
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  925  
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  926 if (i == 
ARRAY_SIZE(ssc_lookup)) {
4a33bea003144e Anurag Kumar Vulisha 2020-06-29  927 
dev_err(gtr_dev->dev,
4a3

[kbuild] drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c:568:59: warning: Uninitialized variable: peer_adev [uninitvar]

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: Jonathan Kim 
CC: Alex Deucher 
CC: Felix Kuehling 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   5f58da2befa58edf3a70b91ed87ed9bf77f1e70e
commit: 3f46c4e9ce25bbcb9d619dbce57c8737c856b272 drm/amdkfd: report xgmi 
bandwidth between direct peers to the kfd
date:   4 months ago
:: branch date: 17 hours ago
:: commit date: 4 months ago
compiler: alpha-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)

>> drivers/gpu/drm/radeon/r600.c:2655:0: warning: failed to expand 'WREG32', it 
>> is invalid to use a preprocessor directive as macro parameter 
>> [preprocessorErrorDirective]
   #ifdef __BIG_ENDIAN
   ^
--
>> drivers/gpu/drm/radeon/evergreen.c:2970:0: warning: failed to expand 
>> 'WREG32', it is invalid to use a preprocessor directive as macro parameter 
>> [preprocessorErrorDirective]
   #ifdef __BIG_ENDIAN
   ^
--
>> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:4115:7: warning: Identical inner 'if' 
>> condition is always true. [identicalInnerCondition]
 if (grbm_soft_reset) {
 ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:4104:6: note: outer condition: 
grbm_soft_reset
if (grbm_soft_reset) {
^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:4115:7: note: identical inner 
condition: grbm_soft_reset
 if (grbm_soft_reset) {
 ^
>> drivers/gpu/drm/radeon/cik.c:9712:7: warning: Identical inner 'if' condition 
>> is always true. [identicalInnerCondition]
 if (!disable_plloff_in_l1) {
 ^
   drivers/gpu/drm/radeon/cik.c:9671:41: note: 'disable_l1' is assigned value 
'false' here.
bool disable_l0s = false, disable_l1 = false, disable_plloff_in_l1 = false;
   ^
   drivers/gpu/drm/radeon/cik.c:9671:71: note: 'disable_plloff_in_l1' is 
assigned value 'false' here.
bool disable_l0s = false, disable_l1 = false, disable_plloff_in_l1 = false;
 ^
   drivers/gpu/drm/radeon/cik.c:9706:6: note: outer condition: !disable_l1
if (!disable_l1) {
^
   drivers/gpu/drm/radeon/cik.c:9712:7: note: identical inner condition: 
!disable_plloff_in_l1
 if (!disable_plloff_in_l1) {
 ^
>> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:7589:7: warning: Identical inner 'if' 
>> condition is always true. [identicalInnerCondition]
 if (grbm_soft_reset) {
 ^
   drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:7579:6: note: outer condition: 
grbm_soft_reset
if (grbm_soft_reset) {
^
   drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:7589:7: note: identical inner 
condition: grbm_soft_reset
 if (grbm_soft_reset) {
 ^
>> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:7450:6: warning: Unused variable: r 
>> [unusedVariable]
int r;
^
>> drivers/gpu/drm/nouveau/dispnv04/hw.h:267:2: warning: Non-boolean value 
>> returned from function returning bool [returnNonBoolInBooleanFunction]
return NVReadVgaCrtc(dev, 0, NV_CIO_CRE_44) & 0x4;
^
   drivers/gpu/drm/nouveau/dispnv04/hw.h:283:2: warning: Non-boolean value 
returned from function returning bool [returnNonBoolInBooleanFunction]
return waslocked;
^
>> drivers/gpu/drm/nouveau/dispnv04/hw.h:379:15: warning: Same value in both 
>> branches of ternary operator. [duplicateValueTernary]
 *curctl1 |= MASK(NV_CIO_CRE_HCUR_ADDR1_ENABLE);
 ^
   drivers/gpu/drm/nouveau/dispnv04/hw.h:381:16: warning: Same value in both 
branches of ternary operator. [duplicateValueTernary]
 *curctl1 &= ~MASK(NV_CIO_CRE_HCUR_ADDR1_ENABLE);
  ^
>> drivers/gpu/drm/nouveau/dispnv04/crtc.c:351:36: warning: Same value in both 
>> branches of ternary operator. [duplicateValueTernary]
regp->CRTC[NV_CIO_CR_HRE_INDEX] = XLATE(horizBlankEnd, 5, 
NV_CIO_CR_HRE_HBE_5) |
  ^
   drivers/gpu/drm/nouveau/dispnv04/crtc.c:354:36: warning: Same value in both 
branches of ternary operator. [duplicateValueTernary]
regp->CRTC[NV_CIO_CR_OVL_INDEX] = XLATE(vertStart, 9, NV_CIO_CR_OVL_VRS_9) |
  ^
   drivers/gpu/drm/nouveau/dispnv04/crtc.c:355:8: warning: Same value in both 
branches of ternary operator. [duplicateValueTernary]
  XLATE(vertDisplay, 9, NV_CIO_CR_OVL_VDE_9) |
  ^
   drivers/gpu/drm/nouveau/dispnv04/crtc.c:356:8: warning: Same value in both 
branches of ternary operator. [duplicateValueTernary]
  XLATE(vertTotal, 9, NV_CIO_CR_OVL_VDT_9) |
  ^
   drivers/gpu/drm/nouveau/dispnv04/crtc.c:358:8: warning: Same value in both 
branches of ternary operator. [duplicateValueTernary]
  XLATE(vertBlankStart, 8, NV_CIO_CR_OVL_VBS_8) |
  ^
   drivers/gpu/drm/nouveau/dispnv04/crtc.c:359:8: warning: Same value in both 
branches of 

[kbuild] Re: drivers/net/can/usb/peak_usb/pcan_usb.c:523 pcan_usb_decode_error() error: we previously assumed 'cf' could be null (see line 503)

2021-12-03 Thread Dan Carpenter
On Fri, Dec 03, 2021 at 03:58:51PM +0100, Marc Kleine-Budde wrote:
> > 
> > 46be265d338833 Stephane Grosjean 2012-03-02  450  static int 
> > pcan_usb_decode_error(struct pcan_usb_msg_context *mc, u8 n,
> > 46be265d338833 Stephane Grosjean 2012-03-02  451
> >  u8 status_len)
> > 46be265d338833 Stephane Grosjean 2012-03-02  452  {
> > 46be265d338833 Stephane Grosjean 2012-03-02  453struct sk_buff *skb;
> > 46be265d338833 Stephane Grosjean 2012-03-02  454struct can_frame *cf;
> > c11dcee7583027 Stephane Grosjean 2021-07-15  455enum can_state 
> > new_state = CAN_STATE_ERROR_ACTIVE;
> > 46be265d338833 Stephane Grosjean 2012-03-02  456  
> > 46be265d338833 Stephane Grosjean 2012-03-02  457/* ignore this error 
> > until 1st ts received */
> > 46be265d338833 Stephane Grosjean 2012-03-02  458if (n == 
> > PCAN_USB_ERROR_QOVR)
> > 46be265d338833 Stephane Grosjean 2012-03-02  459if 
> > (!mc->pdev->time_ref.tick_count)
> > 46be265d338833 Stephane Grosjean 2012-03-02  460return 
> > 0;
> > 46be265d338833 Stephane Grosjean 2012-03-02  461  
> > c11dcee7583027 Stephane Grosjean 2021-07-15  462/* allocate an skb to 
> > store the error frame */
> > c11dcee7583027 Stephane Grosjean 2021-07-15  463skb = 
> > alloc_can_err_skb(mc->netdev, );
> 
> alloc_can_err_skb() ->
> alloc_canfd_skb()
> 
> https://elixir.bootlin.com/linux/v5.15/source/drivers/net/can/dev/skb.c#L210
> 
> If skb is NULL, cf is set to NULL, too.

Yeah.  Sorry about that.  The kbuild-bot doesn't do much cross function
analysis (none for functions that are not inline).  I saw that this
patch was old and could easily have checked it on my system which has
the cross function DB but I was in a rush.  :/  My bad.  Will try be a
more diligent person next time.

regards,
dan carpenter
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] [pinchartl-media:drm/du/v3u/sn65dsi86 7/11] drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:223 rcar_mipi_dsi_parameters_calc() error: buffer overflow 'hsfreqrange_table' 64 <= 64

2021-12-03 Thread kernel test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: LUU HOAI 
CC: Laurent Pinchart 
CC: Kieran Bingham 

tree:   git://linuxtv.org/pinchartl/media.git drm/du/v3u/sn65dsi86
head:   b24450a25b8c342e517f8c5804755b060cd6e7dc
commit: 9315788ce032979d6b3affb603891ec69090be72 [7/11] drm: rcar-du: Add R-Car 
DSI driver
:: branch date: 35 hours ago
:: commit date: 35 hours ago
config: nios2-randconfig-m031-20211203 
(https://download.01.org/0day-ci/archive/20211203/202112031631.op5iw0oj-...@intel.com/config)
compiler: nios2-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/gpu/drm/rcar-du/rcar_mipi_dsi.c:223 rcar_mipi_dsi_parameters_calc() 
error: buffer overflow 'hsfreqrange_table' 64 <= 64

Old smatch warnings:
drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c:224 rcar_mipi_dsi_parameters_calc() 
error: buffer overflow 'hsfreqrange_table' 64 <= 64

vim +/hsfreqrange_table +223 drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c

9315788ce03297 LUU HOAI 2020-02-25  183  
9315788ce03297 LUU HOAI 2020-02-25  184 const struct vco_cntrl_value 
*vco_cntrl;
9315788ce03297 LUU HOAI 2020-02-25  185 unsigned long fout_target;
9315788ce03297 LUU HOAI 2020-02-25  186 unsigned long fin, fout;
9315788ce03297 LUU HOAI 2020-02-25  187 unsigned long hsfreq;
9315788ce03297 LUU HOAI 2020-02-25  188 unsigned int best_err = -1;
9315788ce03297 LUU HOAI 2020-02-25  189 unsigned int divider;
9315788ce03297 LUU HOAI 2020-02-25  190 unsigned int n;
9315788ce03297 LUU HOAI 2020-02-25  191 unsigned int i;
9315788ce03297 LUU HOAI 2020-02-25  192 unsigned int err;
9315788ce03297 LUU HOAI 2020-02-25  193  
9315788ce03297 LUU HOAI 2020-02-25  194 /*
9315788ce03297 LUU HOAI 2020-02-25  195  * Calculate Fout = dot clock * 
ColorDepth / (2 * Lane Count)
9315788ce03297 LUU HOAI 2020-02-25  196  * The range out Fout is [40 - 
1250] Mhz
9315788ce03297 LUU HOAI 2020-02-25  197  */
9315788ce03297 LUU HOAI 2020-02-25  198 fout_target = target * 
mipi_dsi_pixel_format_to_bpp(dsi->format)
9315788ce03297 LUU HOAI 2020-02-25  199 / (2 * dsi->lanes);
9315788ce03297 LUU HOAI 2020-02-25  200 if (fout_target < 4000 || 
fout_target > 125000)
9315788ce03297 LUU HOAI 2020-02-25  201 return;
9315788ce03297 LUU HOAI 2020-02-25  202  
9315788ce03297 LUU HOAI 2020-02-25  203 /* Find vco_cntrl */
9315788ce03297 LUU HOAI 2020-02-25  204 for (vco_cntrl = 
vco_cntrl_table; vco_cntrl->min_freq != 0; vco_cntrl++) {
9315788ce03297 LUU HOAI 2020-02-25  205 if (fout_target > 
vco_cntrl->min_freq &&
9315788ce03297 LUU HOAI 2020-02-25  206 fout_target <= 
vco_cntrl->max_freq) {
9315788ce03297 LUU HOAI 2020-02-25  207 
setup_info->vco_cntrl = vco_cntrl->value;
9315788ce03297 LUU HOAI 2020-02-25  208 if (fout_target 
>= 115000)
9315788ce03297 LUU HOAI 2020-02-25  209 
setup_info->prop_cntrl = 0x0c;
9315788ce03297 LUU HOAI 2020-02-25  210 else
9315788ce03297 LUU HOAI 2020-02-25  211 
setup_info->prop_cntrl = 0x0b;
9315788ce03297 LUU HOAI 2020-02-25  212 break;
9315788ce03297 LUU HOAI 2020-02-25  213 }
9315788ce03297 LUU HOAI 2020-02-25  214 }
9315788ce03297 LUU HOAI 2020-02-25  215  
9315788ce03297 LUU HOAI 2020-02-25  216 /* Add divider */
9315788ce03297 LUU HOAI 2020-02-25  217 setup_info->div = 
(setup_info->vco_cntrl & 0x30) >> 4;
9315788ce03297 LUU HOAI 2020-02-25  218  
9315788ce03297 LUU HOAI 2020-02-25  219 /* Find hsfreqrange */
9315788ce03297 LUU HOAI 2020-02-25  220 hsfreq = fout_target * 2;
9315788ce03297 LUU HOAI 2020-02-25  221 for (i = 0; i < 
ARRAY_SIZE(hsfreqrange_table); i++) {
9315788ce03297 LUU HOAI 2020-02-25  222 if (hsfreq > 
hsfreqrange_table[i][0] &&
9315788ce03297 LUU HOAI 2020-02-25 @223 hsfreq <= 
hsfreqrange_table[i+1][0]) {
9315788ce03297 LUU HOAI 2020-02-25  224 
setup_info->hsfreqrange = hsfreqrange_table[i+1][1];
9315788ce03297 LUU HOAI 2020-02-25  225 break;
9315788ce03297 LUU HOAI 2020-02-25  226 }
9315788ce03297 LUU HOAI 2020-02-25  227 }
9315788ce03297 LUU HOAI 2020-02-25  228  
9315788ce03297 LUU HOAI 2020-02-25  229 /*
9315788ce03297 LUU HOAI 2020-02-25  230  * Calculate n and m for PLL 
clock
9315788ce03297 LUU HOAI 2020-02-25  231  * Following the HW manual the 
ranges of n and m are
9315788ce03297 LUU HOAI 2020-02-25  232  * n = [3-8] and m = [64

[kbuild] Re: [linux-next:master 4042/4626] net/ceph/messenger_v2.c:311 alloc_conn_buf() error: kvmalloc() only makes sense with GFP_KERNEL

2021-12-03 Thread Dan Carpenter
The mm devs have modified vmalloc() to all GFP_NOIO.  It's only
GFP_ATOMIC and GFP_SLEEP which aren't allowed now.  I have pushed an
update for this.

regards,
dan carpenter

On Wed, Dec 01, 2021 at 11:26:46PM +0800, kernel test robot wrote:
> CC: kbuild-...@lists.01.org
> CC: Linux Memory Management List 
> TO: Michal Hocko 
> CC: "Uladzislau Rezki (Sony)" 
> CC: Andrew Morton 
> CC: Linux Memory Management List 
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
> master
> head:   048aeae86c3967f4c40666cd26f2c1eb73a4b805
> commit: 232323e9a580d6b34f3a513602b21359a79a09dd [4042/4626] mm: allow 
> !GFP_KERNEL allocations for kvmalloc
> :: branch date: 10 hours ago
> :: commit date: 2 days ago
> config: arm-randconfig-m031-20211128 
> (https://download.01.org/0day-ci/archive/20211201/202112012323.erlbotlt-...@intel.com/config)
> compiler: arm-linux-gnueabi-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:
> net/ceph/messenger_v2.c:311 alloc_conn_buf() error: kvmalloc() only makes 
> sense with GFP_KERNEL
> net/ceph/osdmap.c:983 alloc_workspace() error: kvmalloc() only makes sense 
> with GFP_KERNEL
> net/ceph/osdmap.c:1193 osdmap_set_max_osd() error: kvmalloc() only makes 
> sense with GFP_KERNEL
> net/ceph/osdmap.c:1506 set_primary_affinity() error: kvmalloc() only makes 
> sense with GFP_KERNEL
> 
> Old smatch warnings:
> net/ceph/osdmap.c:1194 osdmap_set_max_osd() error: kvmalloc() only makes 
> sense with GFP_KERNEL
> net/ceph/osdmap.c:1195 osdmap_set_max_osd() error: kvmalloc() only makes 
> sense with GFP_KERNEL
> net/ceph/osdmap.c:1225 osdmap_set_max_osd() error: kvmalloc() only makes 
> sense with GFP_KERNEL
> 
> vim +311 net/ceph/messenger_v2.c
> 
> cd1a677cad9940 Ilya Dryomov 2020-11-19  301  
> cd1a677cad9940 Ilya Dryomov 2020-11-19  302  static void 
> *alloc_conn_buf(struct ceph_connection *con, int len)
> cd1a677cad9940 Ilya Dryomov 2020-11-19  303  {
> cd1a677cad9940 Ilya Dryomov 2020-11-19  304   void *buf;
> cd1a677cad9940 Ilya Dryomov 2020-11-19  305  
> cd1a677cad9940 Ilya Dryomov 2020-11-19  306   dout("%s con %p len %d\n", 
> __func__, con, len);
> cd1a677cad9940 Ilya Dryomov 2020-11-19  307  
> cd1a677cad9940 Ilya Dryomov 2020-11-19  308   if 
> (WARN_ON(con->v2.conn_buf_cnt >= ARRAY_SIZE(con->v2.conn_bufs)))
> cd1a677cad9940 Ilya Dryomov 2020-11-19  309   return NULL;
> cd1a677cad9940 Ilya Dryomov 2020-11-19  310  
> 232323e9a580d6 Michal Hocko 2021-11-30 @311   buf = kvmalloc(len, GFP_NOIO);
> cd1a677cad9940 Ilya Dryomov 2020-11-19  312   if (!buf)
> cd1a677cad9940 Ilya Dryomov 2020-11-19  313   return NULL;
> cd1a677cad9940 Ilya Dryomov 2020-11-19  314  
> cd1a677cad9940 Ilya Dryomov 2020-11-19  315   
> con->v2.conn_bufs[con->v2.conn_buf_cnt++] = buf;
> cd1a677cad9940 Ilya Dryomov 2020-11-19  316   return buf;
> cd1a677cad9940 Ilya Dryomov 2020-11-19  317  }
> cd1a677cad9940 Ilya Dryomov 2020-11-19  318  
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> 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