[kbuild] Re: [linux-next:master 408/8237] drivers/net/wireless/ath/ath11k/wow.c:712 ath11k_wow_op_resume() warn: inconsistent returns '>conf_mutex'.

2022-05-04 Thread Dan Carpenter
On Thu, May 05, 2022 at 09:29:40AM +0800, Carl Huang wrote:
> Hi Kalle,
> 
> Is the below the same fix that you have already applied to ath.git?
> 
> [-next] ath11k: fix missing unlock on error in ath11k_wow_op_resume() -
> Patchwork (kernel.org) 
>  >

That looks good.  It's sort of annoying for me to send a bug report a
month after the fix has been applied...  Sorry about that.

1) These are kbuild warnings.  The zero day bot generates the
warnings and I look them over and hit send.  I don't know why the kbuild
bot seems to get confused by -mm.  The subject says 408/8237 which is
pretty crazy.  Maybe I should just ignore the -mm patches?

2) The blamed patch came from a git tree but it had a Link tag to
lore.kernel.org so we could have used that as an In-Reply-to tag.
In an ideal world, all the bug reports for a patch would go to a
standard location.

Link: 
https://lore.kernel.org/r/1644308006-22784-5-git-send-email-quic_cjhu...@quicinc.com

3) Another idea is that the kbuild bot could search lore for Fixes to
the original commit and include links to those threads?

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


[kbuild] fs/fs-writeback.c:2467 __mark_inode_dirty() error: uninitialized symbol 'wb'.

2022-05-04 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Jchao Sun 
CC: 0day robot 

tree:   
https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220505-023756/Jchao-Sun/Add-assert-for-inode-i_io_list-in-inode_io_list_move_locked/20220503-180501
head:   af0b042e914fbaf7a7ac9d463c91b8566461c39f
commit: af0b042e914fbaf7a7ac9d463c91b8566461c39f writeback: Fix 
inode->i_io_list not be protected by inode->i_lock error
date:   9 hours ago
:: branch date: 9 hours ago
:: commit date: 9 hours ago
config: x86_64-randconfig-m001 
(https://download.01.org/0day-ci/archive/20220505/202205051122.4jkb3mhj-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 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:
fs/fs-writeback.c:2467 __mark_inode_dirty() error: uninitialized symbol 'wb'.

vim +/wb +2467 fs/fs-writeback.c

1efff914afac8a9 Theodore Ts'o 2015-03-17  2323  
03ba3782e8dcc5b Jens Axboe2009-09-09  2324  /**
35d14f278e530ec Eric Biggers  2021-01-12  2325   * __mark_inode_dirty - 
internal function to mark an inode dirty
0117d4272b1acd1 Mauro Carvalho Chehab 2017-05-12  2326   *
03ba3782e8dcc5b Jens Axboe2009-09-09  2327   * @inode: inode to mark
35d14f278e530ec Eric Biggers  2021-01-12  2328   * @flags: what kind of 
dirty, e.g. I_DIRTY_SYNC.  This can be a combination of
35d14f278e530ec Eric Biggers  2021-01-12  2329   * multiple 
I_DIRTY_* flags, except that I_DIRTY_TIME can't be combined
35d14f278e530ec Eric Biggers  2021-01-12  2330   * with 
I_DIRTY_PAGES.
0117d4272b1acd1 Mauro Carvalho Chehab 2017-05-12  2331   *
35d14f278e530ec Eric Biggers  2021-01-12  2332   * Mark an inode as 
dirty.  We notify the filesystem, then update the inode's
35d14f278e530ec Eric Biggers  2021-01-12  2333   * dirty flags.  Then, 
if needed we add the inode to the appropriate dirty list.
03ba3782e8dcc5b Jens Axboe2009-09-09  2334   *
35d14f278e530ec Eric Biggers  2021-01-12  2335   * Most callers should 
use mark_inode_dirty() or mark_inode_dirty_sync()
35d14f278e530ec Eric Biggers  2021-01-12  2336   * instead of calling 
this directly.
03ba3782e8dcc5b Jens Axboe2009-09-09  2337   *
35d14f278e530ec Eric Biggers  2021-01-12  2338   * CAREFUL!  We only 
add the inode to the dirty list if it is hashed or if it
35d14f278e530ec Eric Biggers  2021-01-12  2339   * refers to a 
blockdev.  Unhashed inodes will never be added to the dirty list
35d14f278e530ec Eric Biggers  2021-01-12  2340   * even if they are 
later hashed, as they will have been marked dirty already.
03ba3782e8dcc5b Jens Axboe2009-09-09  2341   *
35d14f278e530ec Eric Biggers  2021-01-12  2342   * In short, ensure you 
hash any inodes _before_ you start marking them dirty.
03ba3782e8dcc5b Jens Axboe2009-09-09  2343   *
03ba3782e8dcc5b Jens Axboe2009-09-09  2344   * Note that for 
blockdevs, inode->dirtied_when represents the dirtying time of
03ba3782e8dcc5b Jens Axboe2009-09-09  2345   * the block-special 
inode (/dev/hda1) itself.  And the ->dirtied_when field of
03ba3782e8dcc5b Jens Axboe2009-09-09  2346   * the kernel-internal 
blockdev inode represents the dirtying time of the
03ba3782e8dcc5b Jens Axboe2009-09-09  2347   * blockdev's pages.  
This is why for I_DIRTY_PAGES we always use
03ba3782e8dcc5b Jens Axboe2009-09-09  2348   * page->mapping->host, 
so the page-dirtying time is recorded in the internal
03ba3782e8dcc5b Jens Axboe2009-09-09  2349   * blockdev inode.
03ba3782e8dcc5b Jens Axboe2009-09-09  2350   */
03ba3782e8dcc5b Jens Axboe2009-09-09  2351  void 
__mark_inode_dirty(struct inode *inode, int flags)
03ba3782e8dcc5b Jens Axboe2009-09-09  2352  {
03ba3782e8dcc5b Jens Axboe2009-09-09  2353  struct 
super_block *sb = inode->i_sb;
35d14f278e530ec Eric Biggers  2021-01-12  2354  int dirtytime = 
0;
af0b042e914fbaf Jchao Sun 2022-05-04  2355  struct 
bdi_writeback *wb;
0ae45f63d4ef8d8 Theodore Ts'o 2015-02-02  2356  
0ae45f63d4ef8d8 Theodore Ts'o 2015-02-02  2357  
trace_writeback_mark_inode_dirty(inode, flags);
03ba3782e8dcc5b Jens Axboe2009-09-09  2358  
35d14f278e530ec Eric Biggers  2021-01-12  2359  if (flags & 
I_DIRTY_INODE) {
03ba3782e8dcc5b Jens Axboe2009-09-09  2360  /*
35d14f278e530ec Eric Biggers  2021-01-12  2361   * 
Notify the filesystem about the inode being dirtied, so that
35d14f278e530ec Eric Biggers  2021-01-12  2362   * (if 
needed) it can update on-disk fields and journal the
35d14f278e530ec Eric Biggers  2021-01-12  

[kbuild] drivers/iio/dac/ltc2688.c:84:8: warning: Excessive padding in 'struct ltc2688_state' (83 padding bytes, where 19 is optimal).

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: "Nuno Sá" 
CC: Jonathan Cameron 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   a7391ad3572431a354c927cf8896e86e50d7d0bf
commit: 832cb9eeb9312dd2e14133681d3920b773ef1eac iio: dac: add support for 
ltc2688
date:   9 weeks ago
:: branch date: 10 hours ago
:: commit date: 9 weeks ago
config: riscv-randconfig-c006-20220427 
(https://download.01.org/0day-ci/archive/20220505/202205051125.t74wrdnm-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
1cddcfdc3c683b393df1a5c9063252eb60e52818)
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=832cb9eeb9312dd2e14133681d3920b773ef1eac
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 832cb9eeb9312dd2e14133681d3920b773ef1eac
# save the config file
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/iio/adc/at91-sama5d2_adc.c:1556:3: warning: Value stored to 'ret' is 
never read [clang-analyzer-deadcode.DeadStores]
   ret = at91_adc_read_pressure(st, chan->channel,
   ^ ~
   drivers/iio/adc/at91-sama5d2_adc.c:1556:3: note: Value stored to 'ret' is 
never read
   ret = at91_adc_read_pressure(st, chan->channel,
   ^ ~
   include/linux/math64.h:42:24: warning: Division by zero 
[clang-analyzer-core.DivideZero]
   *remainder = dividend % divisor;
 ^
   drivers/iio/adc/at91-sama5d2_adc.c:1343:6: note: Assuming the condition is 
false
   if (iio_trigger_validate_own_device(indio_dev->trig, indio_dev))
   ^~~
   drivers/iio/adc/at91-sama5d2_adc.c:1343:2: note: Taking false branch
   if (iio_trigger_validate_own_device(indio_dev->trig, indio_dev))
   ^
   drivers/iio/adc/at91-sama5d2_adc.c:1346:6: note: Assuming field 'dma_chan' 
is non-null
   if (st->dma_st.dma_chan)
   ^~~
   drivers/iio/adc/at91-sama5d2_adc.c:1346:2: note: Taking true branch
   if (st->dma_st.dma_chan)
   ^
   drivers/iio/adc/at91-sama5d2_adc.c:1347:3: note: Calling 
'at91_adc_trigger_handler_dma'
   at91_adc_trigger_handler_dma(indio_dev);
   ^~~
   drivers/iio/adc/at91-sama5d2_adc.c:1292:15: note: Loop condition is false.  
Exiting loop
   u32 status = at91_adc_readl(st, ISR);
^
   drivers/iio/adc/at91-sama5d2_adc.c:387:2: note: expanded from macro 
'at91_adc_readl'
   readl_relaxed((st)->base + (st)->soc_info.platform->layout->reg)
   ^
   arch/riscv/include/asm/mmio.h:116:38: note: expanded from macro 
'readl_relaxed'
   #define readl_relaxed(c)({ u32 __v; __io_rbr(); __v = readl_cpu(c); 
__io_rar(); __v; })
   ^
   arch/riscv/include/asm/mmio.h:109:21: note: expanded from macro '__io_rbr'
   #define __io_rbr()  do {} while (0)
   ^
   drivers/iio/adc/at91-sama5d2_adc.c:1292:15: note: Loop condition is false.  
Exiting loop
   u32 status = at91_adc_readl(st, ISR);
^
   drivers/iio/adc/at91-sama5d2_adc.c:387:2: note: expanded from macro 
'at91_adc_readl'
   readl_relaxed((st)->base + (st)->soc_info.platform->layout->reg)
   ^
   arch/riscv/include/asm/mmio.h:116:70: note: expanded from macro 
'readl_relaxed'
   #define readl_relaxed(c)({ u32 __v; __io_rbr(); __v = readl_cpu(c); 
__io_rar(); __v; })
   ^
   arch/riscv/include/asm/mmio.h:110:21: note: expanded from macro '__io_rar'
   #define __io_rar()  do {} while (0)
   ^
   drivers/iio/adc/at91-sama5d2_adc.c:1294:6: note: Assuming the condition is 
false
   if (status & AT91_SAMA5D2_IER_GOVRE)
   ^~~
   drivers/iio/adc/at91-sama5d2_adc.c:1294:2: note: Taking false branch
   if (status & 

[kbuild] drivers/mtd/spi-nor/core.c:1512:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Chris Down 
CC: Petr Mladek 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   a7391ad3572431a354c927cf8896e86e50d7d0bf
commit: ad7d61f159db73974f1b0352f21afe04b0bbd920 printk: index: Add indexing 
support to dev_printk
date:   10 months ago
:: branch date: 9 hours ago
:: commit date: 10 months ago
config: arm-randconfig-c002-20220428 
(https://download.01.org/0day-ci/archive/20220505/202205051125.qgdf9rof-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
c59473aacce38cd7dd77eebceaf3c98c5707ab3b)
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=ad7d61f159db73974f1b0352f21afe04b0bbd920
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ad7d61f159db73974f1b0352f21afe04b0bbd920
# save the config file
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 >>)
   tmp = RREG32_SOC15(GC, 0, mmCP_MQD_CONTROL);
 ^
   drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:49:2: note: expanded 
from macro 'RREG32_SOC15'
   
__RREG32_SOC15_RLC__(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg, \
   ^
   drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:36:26: note: expanded 
from macro '__RREG32_SOC15_RLC__'
   ((amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs && 
adev->gfx.rlc.funcs->rlcg_rreg) ? \
   ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3531:8: note: Assuming the condition 
is false
   tmp = RREG32_SOC15(GC, 0, mmCP_HQD_PQ_CONTROL);
 ^
   drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:49:2: note: expanded 
from macro 'RREG32_SOC15'
   
__RREG32_SOC15_RLC__(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg, \
   
^~~
   drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:36:4: note: expanded 
from macro '__RREG32_SOC15_RLC__'
   ((amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs && 
adev->gfx.rlc.funcs->rlcg_rreg) ? \
 ^
   drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_virt.h:251:2: note: expanded 
from macro 'amdgpu_sriov_vf'
   ((adev)->virt.caps & AMDGPU_SRIOV_CAPS_IS_VF)
^~~
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3531:8: note: Left side of '&&' is 
false
   tmp = RREG32_SOC15(GC, 0, mmCP_HQD_PQ_CONTROL);
 ^
   drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:49:2: note: expanded 
from macro 'RREG32_SOC15'
   
__RREG32_SOC15_RLC__(adev->reg_offset[ip##_HWIP][inst][reg##_BASE_IDX] + reg, \
   ^
   drivers/gpu/drm/amd/amdgpu/../amdgpu/soc15_common.h:36:26: note: expanded 
from macro '__RREG32_SOC15_RLC__'
   ((amdgpu_sriov_vf(adev) && adev->gfx.rlc.funcs && 
adev->gfx.rlc.funcs->rlcg_rreg) ? \
   ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3533:9: note: '?' condition is false
   (order_base_2(ring->ring_size / 4) - 1));
^
   include/linux/log2.h:219:2: note: expanded from macro 'order_base_2'
   __builtin_constant_p(n) ? ( \
   ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3532:8: note: The result of the left 
shift is undefined because the left operand is negative
   tmp = REG_SET_FIELD(tmp, CP_HQD_PQ_CONTROL, QUEUE_SIZE,
 ^
   drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:1210:46: note: expanded from 
macro 'REG_SET_FIELD'
(REG_FIELD_MASK(reg, field) & ((field_val) << REG_FIELD_SHIFT(reg, 
field
   ~~~ ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:4126:4: warning: Value stored to 'tmp' 
is never read [clang-analyzer-deadcode.DeadStores]
   tmp = RREG32_SOC15(GC, 0, mmGRBM_SOFT_RESET);
   ^
   drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:4126:4: note: Value stored to 'tmp' is 
never read
   Suppressed 7 warnings (7 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.
   9 warnings generated.
   

[kbuild] Re: [PATCH 1/1] platform/x86: Drop the PMC_ATOM Kconfig option

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
In-Reply-To: <20220503114607.98844-2-hdego...@redhat.com>
References: <20220503114607.98844-2-hdego...@redhat.com>
TO: Hans de Goede 
TO: Mark Gross 
TO: Andy Shevchenko 
TO: Paul Gortmaker 
TO: Michael Turquette 
TO: Stephen Boyd 
CC: Hans de Goede 
CC: platform-driver-...@vger.kernel.org
CC: linux-...@vger.kernel.org

Hi Hans,

I love your patch! Perhaps something to improve:

[auto build test WARNING on next-20220503]
[also build test WARNING on v5.18-rc5]
[cannot apply to clk/clk-next linus/master v5.18-rc5 v5.18-rc4 v5.18-rc3]
[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/intel-lab-lkp/linux/commits/Hans-de-Goede/platform-x86-Drop-the-PMC_ATOM-Kconfig-option/20220503-234134
base:44a2f39e611ac0bc1f17c288a583d7f2e5684aa7
:: branch date: 35 hours ago
:: commit date: 35 hours ago
config: i386-randconfig-c001 
(https://download.01.org/0day-ci/archive/20220505/202205051053.ayrz7mcv-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
363b3a645a1e30011cc8da624f13dac5fd915628)
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/intel-lab-lkp/linux/commit/074b76210423b4d852e4eda6d80644787d8cfca9
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review 
Hans-de-Goede/platform-x86-Drop-the-PMC_ATOM-Kconfig-option/20220503-234134
git checkout 074b76210423b4d852e4eda6d80644787d8cfca9
# save the config file
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 >>)
   net/core/utils.c:196:2: warning: Call to function 'memset' is insecure as it 
does not provide security checks introduced in the C11 standard. Replace with 
analogous functions that support length arguments or provides boundary checks 
such as 'memset_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
   memset(dbuf, 0, sizeof(dbuf));
   ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
   ^~~~
   net/core/utils.c:196:2: note: Call to function 'memset' is insecure as it 
does not provide security checks introduced in the C11 standard. Replace with 
analogous functions that support length arguments or provides boundary checks 
such as 'memset_s' in case of C11
   memset(dbuf, 0, sizeof(dbuf));
   ^
   arch/x86/include/asm/string_32.h:195:29: note: expanded from macro 'memset'
   #define memset(s, c, count) __builtin_memset(s, c, count)
   ^~~~
   net/core/utils.c:291:3: warning: Call to function 'memcpy' is insecure as it 
does not provide security checks introduced in the C11 standard. Replace with 
analogous functions that support length arguments or provides boundary checks 
such as 'memcpy_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
   memcpy(dst, dbuf, sizeof(dbuf));
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   net/core/utils.c:291:3: note: Call to function 'memcpy' is insecure as it 
does not provide security checks introduced in the C11 standard. Replace with 
analogous functions that support length arguments or provides boundary checks 
such as 'memcpy_s' in case of C11
   memcpy(dst, dbuf, sizeof(dbuf));
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   net/core/utils.c:341:3: warning: Call to function 'memcpy' is insecure as it 
does not provide security checks introduced in the C11 standard. Replace with 
analogous functions that support length arguments or provides boundary checks 
such as 'memcpy_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
   memcpy(scope_id, scope_delim + 1, scope_len);
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   net/core/utils.c:341:3: note: Call to function 'memcpy' is insecure as it 
does not provide 

[kbuild] drivers/scsi/qla2xxx/qla_attr.c:2703:13: warning: Value stored to 'fcport' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Hannes Reinecke 
CC: "Martin K. Petersen" 
CC: Himanshu Madhani 
CC: Daniel Wagner 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   a7391ad3572431a354c927cf8896e86e50d7d0bf
commit: baea0e833f7612483dcb2351240da19f0d0bc011 scsi: qla2xxx: Synchronize 
rport dev_loss_tmo setting
date:   5 months ago
:: branch date: 6 hours ago
:: commit date: 5 months ago
config: x86_64-randconfig-c007-20220502 
(https://download.01.org/0day-ci/archive/20220505/202205050704.wwpseiqq-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
09325d36061e42b495d1f4c7e933e260eac260ed)
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=baea0e833f7612483dcb2351240da19f0d0bc011
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout baea0e833f7612483dcb2351240da19f0d0bc011
# save the config file
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 >>)
   include/linux/netdevice.h:5324:2: note: expanded from macro 'netdev_dbg'
   dynamic_netdev_dbg(__dev, format, ##args);  \
   ^
   include/linux/dynamic_debug.h:170:2: note: expanded from macro 
'dynamic_netdev_dbg'
   _dynamic_func_call(fmt, __dynamic_netdev_dbg,   \
   ^
   include/linux/dynamic_debug.h:152:2: note: expanded from macro 
'_dynamic_func_call'
   __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
   ^
   include/linux/dynamic_debug.h:133:2: note: expanded from macro 
'__dynamic_func_call'
   if (DYNAMIC_DEBUG_BRANCH(id))   \
   ^
   net/can/j1939/transport.c:272:2: note: Loop condition is false.  Exiting loop
   netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, session);
   ^
   include/linux/netdevice.h:5324:2: note: expanded from macro 'netdev_dbg'
   dynamic_netdev_dbg(__dev, format, ##args);  \
   ^
   include/linux/dynamic_debug.h:170:2: note: expanded from macro 
'dynamic_netdev_dbg'
   _dynamic_func_call(fmt, __dynamic_netdev_dbg,   \
   ^
   include/linux/dynamic_debug.h:152:2: note: expanded from macro 
'_dynamic_func_call'
   __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
   ^
   include/linux/dynamic_debug.h:131:49: note: expanded from macro 
'__dynamic_func_call'
   #define __dynamic_func_call(id, fmt, func, ...) do {\
   ^
   net/can/j1939/transport.c:272:2: note: Loop condition is false.  Exiting loop
   netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, session);
   ^
   include/linux/netdevice.h:5322:46: note: expanded from macro 'netdev_dbg'
   #define netdev_dbg(__dev, format, args...)  \
   ^
   net/can/j1939/transport.c:274:2: note: Assuming '__ret_warn_on' is 0
   WARN_ON_ONCE(!list_empty(>sk_session_queue_entry));
   ^
   include/asm-generic/bug.h:105:6: note: expanded from macro 'WARN_ON_ONCE'
   if (unlikely(__ret_warn_on))\
   ^~~
   include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
   # define unlikely(x)__builtin_expect(!!(x), 0)
 ^~~~
   net/can/j1939/transport.c:274:2: note: Taking false branch
   WARN_ON_ONCE(!list_empty(>sk_session_queue_entry));
   ^
   include/asm-generic/bug.h:105:2: note: expanded from macro 'WARN_ON_ONCE'
   if (unlikely(__ret_warn_on))\
   ^
   net/can/j1939/transport.c:275:2: note: Assuming '__ret_warn_on' is 0
   WARN_ON_ONCE(!list_empty(>active_session_list_entry));
   ^
   include/asm-generic/bug.h:105:6: note: expanded from macro 'WARN_ON_ONCE'
   if (unlikely(__ret_warn_on))\
   ^~~
   include/linux/compiler.h:78:40: note: expanded from macro 'unlikely'
   # define unlikely(x)__builtin_expect(!!(x), 0)
 ^~~~
   net/can/j1939/transport.c:275:2: note: Taking false branch
   WARN_ON_ONCE(!list_empty(>active_session_list_entry));
   ^
   include/asm-generic/bug.h:105:2: note: expanded from 

[kbuild] fs/fs-writeback.c:2463 __mark_inode_dirty() warn: inconsistent returns '>i_lock'.

2022-05-04 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Jchao Sun 
CC: 0day robot 
CC: Jan Kara 

tree:   
https://github.com/intel-lab-lkp/linux/commits/UPDATE-20220504-155717/Jchao-Sun/Add-assert-for-inode-i_io_list-in-inode_io_list_move_locked/20220503-180501
head:   3b06eceb315e6540fbea9600122a45ce6fa94106
commit: 3b06eceb315e6540fbea9600122a45ce6fa94106 writeback: Fix 
inode->i_io_list not be protected by inode->i_lock error
date:   14 hours ago
:: branch date: 14 hours ago
:: commit date: 14 hours ago
config: i386-randconfig-m021 
(https://download.01.org/0day-ci/archive/20220505/202205050634.9xsnbmqs-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 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:
fs/fs-writeback.c:2463 __mark_inode_dirty() warn: inconsistent returns 
'>i_lock'.

vim +2463 fs/fs-writeback.c

1efff914afac8a Theodore Ts'o 2015-03-17  2321  
03ba3782e8dcc5 Jens Axboe2009-09-09  2322  /**
35d14f278e530e Eric Biggers  2021-01-12  2323   * __mark_inode_dirty -  
internal function to mark an inode dirty
0117d4272b1acd Mauro Carvalho Chehab 2017-05-12  2324   *
03ba3782e8dcc5 Jens Axboe2009-09-09  2325   * @inode: inode to mark
35d14f278e530e Eric Biggers  2021-01-12  2326   * @flags: what kind of 
dirty, e.g. I_DIRTY_SYNC.  This can be a combination of
35d14f278e530e Eric Biggers  2021-01-12  2327   *  multiple 
I_DIRTY_* flags, except that I_DIRTY_TIME can't be combined
35d14f278e530e Eric Biggers  2021-01-12  2328   *  with 
I_DIRTY_PAGES.
0117d4272b1acd Mauro Carvalho Chehab 2017-05-12  2329   *
35d14f278e530e Eric Biggers  2021-01-12  2330   * Mark an inode as 
dirty.  We notify the filesystem, then update the inode's
35d14f278e530e Eric Biggers  2021-01-12  2331   * dirty flags.  Then, 
if needed we add the inode to the appropriate dirty list.
03ba3782e8dcc5 Jens Axboe2009-09-09  2332   *
35d14f278e530e Eric Biggers  2021-01-12  2333   * Most callers should 
use mark_inode_dirty() or mark_inode_dirty_sync()
35d14f278e530e Eric Biggers  2021-01-12  2334   * instead of calling 
this directly.
03ba3782e8dcc5 Jens Axboe2009-09-09  2335   *
35d14f278e530e Eric Biggers  2021-01-12  2336   * CAREFUL!  We only add 
the inode to the dirty list if it is hashed or if it
35d14f278e530e Eric Biggers  2021-01-12  2337   * refers to a blockdev. 
 Unhashed inodes will never be added to the dirty list
35d14f278e530e Eric Biggers  2021-01-12  2338   * even if they are 
later hashed, as they will have been marked dirty already.
03ba3782e8dcc5 Jens Axboe2009-09-09  2339   *
35d14f278e530e Eric Biggers  2021-01-12  2340   * In short, ensure you 
hash any inodes _before_ you start marking them dirty.
03ba3782e8dcc5 Jens Axboe2009-09-09  2341   *
03ba3782e8dcc5 Jens Axboe2009-09-09  2342   * Note that for 
blockdevs, inode->dirtied_when represents the dirtying time of
03ba3782e8dcc5 Jens Axboe2009-09-09  2343   * the block-special 
inode (/dev/hda1) itself.  And the ->dirtied_when field of
03ba3782e8dcc5 Jens Axboe2009-09-09  2344   * the kernel-internal 
blockdev inode represents the dirtying time of the
03ba3782e8dcc5 Jens Axboe2009-09-09  2345   * blockdev's pages.  
This is why for I_DIRTY_PAGES we always use
03ba3782e8dcc5 Jens Axboe2009-09-09  2346   * page->mapping->host, 
so the page-dirtying time is recorded in the internal
03ba3782e8dcc5 Jens Axboe2009-09-09  2347   * blockdev inode.
03ba3782e8dcc5 Jens Axboe2009-09-09  2348   */
03ba3782e8dcc5 Jens Axboe2009-09-09  2349  void 
__mark_inode_dirty(struct inode *inode, int flags)
03ba3782e8dcc5 Jens Axboe2009-09-09  2350  {
03ba3782e8dcc5 Jens Axboe2009-09-09  2351   struct super_block *sb 
= inode->i_sb;
35d14f278e530e Eric Biggers  2021-01-12  2352   int dirtytime = 0;
0ae45f63d4ef8d Theodore Ts'o 2015-02-02  2353  
0ae45f63d4ef8d Theodore Ts'o 2015-02-02  2354   
trace_writeback_mark_inode_dirty(inode, flags);
03ba3782e8dcc5 Jens Axboe2009-09-09  2355  
35d14f278e530e Eric Biggers  2021-01-12  2356   if (flags & 
I_DIRTY_INODE) {
03ba3782e8dcc5 Jens Axboe2009-09-09  2357   /*
35d14f278e530e Eric Biggers  2021-01-12  2358* Notify the 
filesystem about the inode being dirtied, so that
35d14f278e530e Eric Biggers  2021-01-12  2359* (if needed) 
it can update on-disk fields and journal the
35d14f278e530e Eric Biggers  2021-01-12  2360* inode.  This 
is only needed when the inode itself is being
35d14f278e530e Eric Biggers  2021-01-12  2361

[kbuild] drivers/soc/qcom/apr.c:159:16: warning: Uninitialized variable: adev [uninitvar]

2022-05-04 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Srinivas Kandagatla 
CC: Bjorn Andersson 
CC: "Pierre-Louis Bossart" 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   a7391ad3572431a354c927cf8896e86e50d7d0bf
commit: 99139b80c1b3d73026ed8be2de42c52e2976ab64 soc: qcom: apr: make code more 
reuseable
date:   7 months ago
:: branch date: 2 hours ago
:: commit date: 7 months ago
compiler: arm-linux-gnueabi-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
# apt-get install cppcheck
git checkout 99139b80c1b3d73026ed8be2de42c52e2976ab64
cppcheck --quiet --enable=style,performance,portability --template=gcc 
FILE

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/soc/qcom/apr.c:159:16: warning: Uninitialized variable: adev 
>> [uninitvar]
if (!adrv || !adev) {
  ^

vim +159 drivers/soc/qcom/apr.c

1ac19ad799f880 Srinivas Kandagatla 2019-02-08  107  
99139b80c1b3d7 Srinivas Kandagatla 2021-09-27  108  static int 
apr_do_rx_callback(struct packet_router *apr, struct apr_rx_buf *abuf)
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  109  {
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  110  uint16_t hdr_size, 
msg_type, ver, svc_id;
99139b80c1b3d7 Srinivas Kandagatla 2021-09-27  111  struct pkt_router_svc 
*svc;
99139b80c1b3d7 Srinivas Kandagatla 2021-09-27  112  struct apr_device *adev;
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  113  struct apr_driver *adrv 
= NULL;
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  114  struct apr_resp_pkt 
resp;
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  115  struct apr_hdr *hdr;
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  116  unsigned long flags;
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  117  void *buf = abuf->buf;
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  118  int len = abuf->len;
1ac19ad799f880 Srinivas Kandagatla 2019-02-08  119  
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  120  hdr = buf;
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  121  ver = 
APR_HDR_FIELD_VER(hdr->hdr_field);
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  122  if (ver > APR_PKT_VER + 
1)
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  123  return -EINVAL;
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  124  
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  125  hdr_size = 
APR_HDR_FIELD_SIZE_BYTES(hdr->hdr_field);
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  126  if (hdr_size < 
APR_HDR_SIZE) {
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  127  
dev_err(apr->dev, "APR: Wrong hdr size:%d\n", hdr_size);
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  128  return -EINVAL;
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  129  }
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  130  
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  131  if (hdr->pkt_size < 
APR_HDR_SIZE || hdr->pkt_size != len) {
35aac0ba88d55d Colin Ian King  2018-06-11  132  
dev_err(apr->dev, "APR: Wrong packet size\n");
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  133  return -EINVAL;
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  134  }
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  135  
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  136  msg_type = 
APR_HDR_FIELD_MT(hdr->hdr_field);
e744619d056e6e Srinivas Kandagatla 2018-05-17  137  if (msg_type >= 
APR_MSG_TYPE_MAX) {
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  138  
dev_err(apr->dev, "APR: Wrong message type: %d\n", msg_type);
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  139  return -EINVAL;
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  140  }
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  141  
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  142  if (hdr->src_domain >= 
APR_DOMAIN_MAX ||
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  143  
hdr->dest_domain >= APR_DOMAIN_MAX ||
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  144  
hdr->src_svc >= APR_SVC_MAX ||
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  145  
hdr->dest_svc >= APR_SVC_MAX) {
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  146  
dev_err(apr->dev, "APR: Wrong APR header\n");
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  147  return -EINVAL;
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  148  }
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  149  
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  150  svc_id = hdr->dest_svc;
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  151  
spin_lock_irqsave(>svcs_lock, flags);
6adba21eb434d8 Srinivas Kandagatla 2018-05-09  152  svc = 
idr_find(>svcs_idr, svc_id);
99139b80c1b3d7 Srinivas Kandagatla 2021-09-27  153  if (svc && 

[kbuild] drivers/net/wireless/ath/ath11k/qmi.c:2031 ath11k_qmi_load_file_target_mem() error: uninitialized symbol 'ret'.

2022-05-04 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Anilkumar Kolli 
CC: Kalle Valo 
CC: Jouni Malinen 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   107c948d1d3e61d10aee9d0f7c3d81bbee9842af
commit: 336e7b53c82fc74d261024773a0fab43623a94fb ath11k: clean up BDF download 
functions
date:   7 months ago
:: branch date: 21 hours ago
:: commit date: 7 months ago
config: i386-randconfig-m021-20220502 
(https://download.01.org/0day-ci/archive/20220505/202205050335.jioxls8m-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 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/wireless/ath/ath11k/qmi.c:2031 ath11k_qmi_load_file_target_mem() 
error: uninitialized symbol 'ret'.

vim +/ret +2031 drivers/net/wireless/ath/ath11k/qmi.c

d5c65159f289537 Kalle Valo  2019-11-23  1919  
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1920  static int 
ath11k_qmi_load_file_target_mem(struct ath11k_base *ab,
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1921
   const u8 *data, u32 len, u8 type)
d5c65159f289537 Kalle Valo  2019-11-23  1922  {
d5c65159f289537 Kalle Valo  2019-11-23  1923struct 
qmi_wlanfw_bdf_download_req_msg_v01 *req;
d5c65159f289537 Kalle Valo  2019-11-23  1924struct 
qmi_wlanfw_bdf_download_resp_msg_v01 resp;
d5c65159f289537 Kalle Valo  2019-11-23  1925struct qmi_txn txn = {};
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1926const u8 *temp = data;
d5c65159f289537 Kalle Valo  2019-11-23  1927void __iomem *bdf_addr 
= NULL;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1928int ret;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1929u32 remaining = len;
d5c65159f289537 Kalle Valo  2019-11-23  1930  
d5c65159f289537 Kalle Valo  2019-11-23  1931req = 
kzalloc(sizeof(*req), GFP_KERNEL);
d5c65159f289537 Kalle Valo  2019-11-23  1932if (!req)
d5c65159f289537 Kalle Valo  2019-11-23  1933return -ENOMEM;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1934  
d5c65159f289537 Kalle Valo  2019-11-23  1935memset(, 0, 
sizeof(resp));
d5c65159f289537 Kalle Valo  2019-11-23  1936  
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1937if 
(ab->bus_params.fixed_bdf_addr) {
c72aa32d6d1c04f Anilkumar Kolli 2021-09-28  1938bdf_addr = 
ioremap(ab->hw_params.bdf_addr, ab->hw_params.fw.board_size);
d5c65159f289537 Kalle Valo  2019-11-23  1939if (!bdf_addr) {
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1940
ath11k_warn(ab, "qmi ioremap error for bdf_addr\n");
d5c65159f289537 Kalle Valo  2019-11-23  1941ret = 
-EIO;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1942goto 
err_free_req;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1943}
d5c65159f289537 Kalle Valo  2019-11-23  1944}
d5c65159f289537 Kalle Valo  2019-11-23  1945  
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1946while (remaining) {
d5c65159f289537 Kalle Valo  2019-11-23  1947req->valid = 1;
d5c65159f289537 Kalle Valo  2019-11-23  1948
req->file_id_valid = 1;
d5c65159f289537 Kalle Valo  2019-11-23  1949req->file_id = 
ab->qmi.target.board_id;
d5c65159f289537 Kalle Valo  2019-11-23  1950
req->total_size_valid = 1;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1951req->total_size 
= remaining;
d5c65159f289537 Kalle Valo  2019-11-23  1952
req->seg_id_valid = 1;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1953req->data_valid 
= 1;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1954req->bdf_type = 
type;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1955
req->bdf_type_valid = 1;
d5c65159f289537 Kalle Valo  2019-11-23  1956req->end_valid 
= 1;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1957req->end = 0;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1958  
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1959if (remaining > 
QMI_WLANFW_MAX_DATA_SIZE_V01) {
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1960
req->data_len = QMI_WLANFW_MAX_DATA_SIZE_V01;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1961} else {
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1962
req->data_len = remaining;
d5c65159f289537 Kalle Valo  2019-11-23  1963
req->end = 1;
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1964}
d5c65159f289537 Kalle Valo  2019-11-23  1965  
336e7b53c82fc74 Anilkumar Kolli 2021-09-28  1966if 
(ab->bus_params.fixed_bdf_addr) {
336e7b53c82fc74 Anilkumar Kolli 

[kbuild] drivers/media/platform/renesas/sh_vou.c:371:24: warning: Value stored to 'vou_dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Mauro Carvalho Chehab 
CC: linux-me...@vger.kernel.org
CC: Laurent Pinchart 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   107c948d1d3e61d10aee9d0f7c3d81bbee9842af
commit: ee4a77a32b39064fdab0aa2b36bbd35ebf57e077 media: platform: place Renesas 
drivers on a separate dir
date:   7 weeks ago
:: branch date: 20 hours ago
:: commit date: 7 weeks ago
config: arm-randconfig-c002-20220427 
(https://download.01.org/0day-ci/archive/20220505/202205050256.cjt0rdws-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
1cddcfdc3c683b393df1a5c9063252eb60e52818)
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=ee4a77a32b39064fdab0aa2b36bbd35ebf57e077
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ee4a77a32b39064fdab0aa2b36bbd35ebf57e077
# save the config file
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/nvmem/core.c:1601:8: note: Returning from 'nvmem_cell_read'
   buf = nvmem_cell_read(cell, );
 ^~~
   drivers/nvmem/core.c:1602:2: note: Taking false branch
   if (IS_ERR(buf)) {
   ^
   drivers/nvmem/core.c:1606:10: note: The left operand of '!=' is a garbage 
value
   if (len != count) {
   ~~~ ^
   drivers/nvmem/core.c:1703:11: warning: The left operand of '>' is a garbage 
value [clang-analyzer-core.UndefinedBinaryOperatorResult]
   if (*len > max_len) {
^
   drivers/nvmem/core.c:1754:2: note: 'len' declared without an initial value
   size_t len;
   ^~
   drivers/nvmem/core.c:1758:8: note: Calling 'nvmem_cell_read_variable_common'
   buf = nvmem_cell_read_variable_common(dev, cell_id, sizeof(*val), 
);
 
^
   drivers/nvmem/core.c:1687:2: note: Taking false branch
   if (IS_ERR(cell))
   ^
   drivers/nvmem/core.c:1691:8: note: Calling 'nvmem_cell_read'
   buf = nvmem_cell_read(cell, len);
 ^~
   drivers/nvmem/core.c:1477:6: note: Assuming 'nvmem' is non-null
   if (!nvmem)
   ^~
   drivers/nvmem/core.c:1477:2: note: Taking false branch
   if (!nvmem)
   ^
   drivers/nvmem/core.c:1481:6: note: Assuming 'buf' is non-null
   if (!buf)
   ^~~~
   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: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) {
    ^
   1 warning generated.
   Suppressed 1 warnings (1 with check filters).
   2 warnings generated.
   drivers/media/platform/qcom/venus/venc.c:877:3: warning: Value stored to 
'ret' is never read [clang-analyzer-deadcode.DeadStores]
   ret = hfi_session_set_property(inst, ptype, );
   ^ 

[kbuild] [lunn:dsa-ci 22/47] drivers/net/phy/mdio_bus.c:710:9: warning: The expression is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Andrew Lunn 

tree:   https://github.com/lunn/linux.git dsa-ci
head:   1149273e5c97f04e2255421372a8a30c75c0b842
commit: e582444c20a13a52eabf1d982d1f7e96344be2a8 [22/47] net: mdiobus: Rework 
scanning of bus ready for quirks
:: branch date: 11 days ago
:: commit date: 2 weeks ago
config: i386-randconfig-c001 
(https://download.01.org/0day-ci/archive/20220504/202205042049.swdh4zxv-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
09325d36061e42b495d1f4c7e933e260eac260ed)
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/lunn/linux/commit/e582444c20a13a52eabf1d982d1f7e96344be2a8
git remote add lunn https://github.com/lunn/linux.git
git fetch --no-tags lunn dsa-ci
git checkout e582444c20a13a52eabf1d982d1f7e96344be2a8
# save the config file
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 >>)
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   drivers/nvme/target/discovery.c:120:2: warning: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
   memcpy(e->traddr, traddr, NVMF_TRADDR_SIZE);
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   drivers/nvme/target/discovery.c:120:2: note: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11
   memcpy(e->traddr, traddr, NVMF_TRADDR_SIZE);
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   drivers/nvme/target/discovery.c:121:2: warning: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
   memcpy(e->tsas.common, port->disc_addr.tsas.common, NVMF_TSAS_SIZE);
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   drivers/nvme/target/discovery.c:121:2: note: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' in case of C11
   memcpy(e->tsas.common, port->disc_addr.tsas.common, NVMF_TSAS_SIZE);
   ^
   arch/x86/include/asm/string_32.h:150:25: note: expanded from macro 'memcpy'
   #define memcpy(t, f, n) __builtin_memcpy(t, f, n)
   ^~~~
   drivers/nvme/target/discovery.c:122:2: warning: Call to function 'strncpy' 
is insecure as it does not provide security checks introduced in the C11 
standard. Replace with analogous functions that support length arguments or 
provides boundary checks such as 'strncpy_s' in case of C11 
[clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling]
   strncpy(e->subnqn, subsys_nqn, NVMF_NQN_SIZE);
   ^~~
   drivers/nvme/target/discovery.c:122:2: note: Call to function 'strncpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'strncpy_s' in case of C11
   strncpy(e->subnqn, subsys_nqn, NVMF_NQN_SIZE);
   ^~~
   drivers/nvme/target/discovery.c:141:3: warning: Call to function 'memcpy' is 
insecure as it does not provide security checks introduced in the C11 standard. 
Replace with analogous functions that support length arguments or provides 
boundary checks such as 'memcpy_s' i

[kbuild] [kees:flexcpy/next-20220502 6/34] net/ipv4/ip_options.c:154 __ip_options_echo() warn: potential spectre issue 'start' [r]

2022-05-04 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Kees Cook 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git 
flexcpy/next-20220502
head:   1dbd8181297512b190aca23477043ac635daba4e
commit: f72034cf9d13b64d3d457b6da825bde7fe758a27 [6/34] fortify: Add run-time 
WARN for cross-field memcpy()
:: branch date: 9 hours ago
:: commit date: 9 hours ago
config: x86_64-randconfig-m001 
(https://download.01.org/0day-ci/archive/20220504/202205041839.lcnmvkmn-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 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/ipv4/ip_options.c:154 __ip_options_echo() warn: potential spectre issue 
'start' [r]
net/ipv4/ip_options.c:616 ip_options_rcv_srr() warn: potential spectre issue 
'optptr' [r]

Old smatch warnings:
net/ipv4/ip_options.c:547 ip_forward_options() warn: potential spectre issue 
'optptr' [w]
net/ipv4/ip_options.c:556 ip_forward_options() warn: possible spectre second 
half.  'srrptr'
net/ipv4/ip_options.c:556 ip_forward_options() warn: possible spectre second 
half.  'srrspace'

vim +/start +154 net/ipv4/ip_options.c

^1da177e4c3f41 Linus Torvalds   2005-04-16   67  
^1da177e4c3f41 Linus Torvalds   2005-04-16   68  /*
^1da177e4c3f41 Linus Torvalds   2005-04-16   69   * Provided (sopt, 
skb) points to received options,
^1da177e4c3f41 Linus Torvalds   2005-04-16   70   * build in dopt 
compiled option set appropriate for answering.
^1da177e4c3f41 Linus Torvalds   2005-04-16   71   * i.e. invert SRR 
option, copy anothers,
^1da177e4c3f41 Linus Torvalds   2005-04-16   72   * and grab room in 
RR/TS options.
^1da177e4c3f41 Linus Torvalds   2005-04-16   73   *
^1da177e4c3f41 Linus Torvalds   2005-04-16   74   * NOTE: dopt cannot 
point to skb.
^1da177e4c3f41 Linus Torvalds   2005-04-16   75   */
^1da177e4c3f41 Linus Torvalds   2005-04-16   76  
91ed1e666a4ea2 Paolo Abeni  2017-08-03   77  int 
__ip_options_echo(struct net *net, struct ip_options *dopt,
91ed1e666a4ea2 Paolo Abeni  2017-08-03   78   
struct sk_buff *skb, const struct ip_options *sopt)
^1da177e4c3f41 Linus Torvalds   2005-04-16   79  {
^1da177e4c3f41 Linus Torvalds   2005-04-16   80 unsigned char 
*sptr, *dptr;
^1da177e4c3f41 Linus Torvalds   2005-04-16   81 int soffset, 
doffset;
^1da177e4c3f41 Linus Torvalds   2005-04-16   82 int optlen;
^1da177e4c3f41 Linus Torvalds   2005-04-16   83  
^1da177e4c3f41 Linus Torvalds   2005-04-16   84 memset(dopt, 0, 
sizeof(struct ip_options));
^1da177e4c3f41 Linus Torvalds   2005-04-16   85  
f6d8bd051c391c Eric Dumazet 2011-04-21   86 if 
(sopt->optlen == 0)
^1da177e4c3f41 Linus Torvalds   2005-04-16   87 return 
0;
^1da177e4c3f41 Linus Torvalds   2005-04-16   88  
d56f90a7c96da5 Arnaldo Carvalho de Melo 2007-04-10   89 sptr = 
skb_network_header(skb);
^1da177e4c3f41 Linus Torvalds   2005-04-16   90 dptr = 
dopt->__data;
^1da177e4c3f41 Linus Torvalds   2005-04-16   91  
^1da177e4c3f41 Linus Torvalds   2005-04-16   92 if (sopt->rr) {
^1da177e4c3f41 Linus Torvalds   2005-04-16   93 optlen  
= sptr[sopt->rr+1];
^1da177e4c3f41 Linus Torvalds   2005-04-16   94 soffset 
= sptr[sopt->rr+2];
^1da177e4c3f41 Linus Torvalds   2005-04-16   95 
dopt->rr = dopt->optlen + sizeof(struct iphdr);
^1da177e4c3f41 Linus Torvalds   2005-04-16   96 
memcpy(dptr, sptr+sopt->rr, optlen);
^1da177e4c3f41 Linus Torvalds   2005-04-16   97 if 
(sopt->rr_needaddr && soffset <= optlen) {
^1da177e4c3f41 Linus Torvalds   2005-04-16   98 
if (soffset + 3 > optlen)
^1da177e4c3f41 Linus Torvalds   2005-04-16   99 
return -EINVAL;
^1da177e4c3f41 Linus Torvalds   2005-04-16  100 
dptr[2] = soffset + 4;
^1da177e4c3f41 Linus Torvalds   2005-04-16  101 
dopt->rr_needaddr = 1;
^1da177e4c3f41 Linus Torvalds   2005-04-16  102 }
^1da177e4c3f41 Linus Torvalds   2005-04-16  103 dptr += 
optlen;
^1da177e4c3f41 Linus Torvalds   2005-04-16  104 
dopt->optlen += optlen;
^1da177e4c3f41 Linus Torvalds   2005-04-16  105 }
^1da177e4c3f41 Linus Torvalds   2005-04-16  106 if (sopt->ts) {
^1da177e4c3f41 Linus Torvalds   2005-04-16  107 optlen 
= sptr[sopt->ts+1];
^1da177e4c3f41 Linus Torvalds   2005-

[kbuild] [drm-misc:for-linux-next 1/7] drivers/gpu/drm/ast/ast_mode.c:1019 ast_crtc_dpms() warn: ignoring unreachable code.

2022-05-04 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: KuoHsiang Chou 
CC: Thomas Zimmermann 

tree:   git://anongit.freedesktop.org/drm/drm-misc for-linux-next
head:   d7442505de9259f8b975232470378d399c25b2fa
commit: 594e9c04b5864b4b8b151ef4ba9521c59e0f5c54 [1/7] drm/ast: Create the 
driver for ASPEED proprietory Display-Port
:: branch date: 20 hours ago
:: commit date: 20 hours ago
config: ia64-randconfig-m031-20220501 
(https://download.01.org/0day-ci/archive/20220504/202205041752.s96jbppp-...@intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.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/gpu/drm/ast/ast_mode.c:1019 ast_crtc_dpms() warn: ignoring unreachable 
code.

vim +1019 drivers/gpu/drm/ast/ast_mode.c

616048af6dde5c Thomas Zimmermann 2021-02-09   983  
a6ff807b71e3ff Thomas Zimmermann 2019-11-07   984  /*
a6ff807b71e3ff Thomas Zimmermann 2019-11-07   985   * CRTC
a6ff807b71e3ff Thomas Zimmermann 2019-11-07   986   */
a6ff807b71e3ff Thomas Zimmermann 2019-11-07   987  
312fec1405dd54 Dave Airlie   2012-02-29   988  static void 
ast_crtc_dpms(struct drm_crtc *crtc, int mode)
312fec1405dd54 Dave Airlie   2012-02-29   989  {
fa7dbd7688849d Thomas Zimmermann 2020-06-17   990   struct ast_private *ast 
= to_ast_private(crtc->dev);
594e9c04b5864b KuoHsiang Chou2022-04-28   991   u8 ch = 
AST_DPMS_VSYNC_OFF | AST_DPMS_HSYNC_OFF;
312fec1405dd54 Dave Airlie   2012-02-29   992  
2fbeec03e17165 Thomas Zimmermann 2019-12-02   993   /* TODO: Maybe control 
display signal generation with
2fbeec03e17165 Thomas Zimmermann 2019-12-02   994*   Sync Enable 
(bit CR17.7).
2fbeec03e17165 Thomas Zimmermann 2019-12-02   995*/
312fec1405dd54 Dave Airlie   2012-02-29   996   switch (mode) {
312fec1405dd54 Dave Airlie   2012-02-29   997   case DRM_MODE_DPMS_ON:
594e9c04b5864b KuoHsiang Chou2022-04-28   998   
ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT,  0x01, 0xdf, 0);
594e9c04b5864b KuoHsiang Chou2022-04-28   999   
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xfc, 0);
83c6620bae3f14 Dave Airlie   2014-03-28  1000   if 
(ast->tx_chip_type == AST_TX_DP501)
83c6620bae3f14 Dave Airlie   2014-03-28  1001   
ast_set_dp501_video_output(crtc->dev, 1);
594e9c04b5864b KuoHsiang Chou2022-04-28  1002  
594e9c04b5864b KuoHsiang Chou2022-04-28  1003   if 
(ast->tx_chip_type == AST_TX_ASTDP) {
594e9c04b5864b KuoHsiang Chou2022-04-28  1004   
ast_dp_power_on_off(crtc->dev, AST_DP_POWER_ON);
594e9c04b5864b KuoHsiang Chou2022-04-28  1005   
ast_wait_for_vretrace(ast);
594e9c04b5864b KuoHsiang Chou2022-04-28  1006   
ast_dp_set_on_off(crtc->dev, 1);
594e9c04b5864b KuoHsiang Chou2022-04-28  1007   }
594e9c04b5864b KuoHsiang Chou2022-04-28  1008  
594e9c04b5864b KuoHsiang Chou2022-04-28  1009   
ast_crtc_load_lut(ast, crtc);
312fec1405dd54 Dave Airlie   2012-02-29  1010   break;
594e9c04b5864b KuoHsiang Chou2022-04-28  1011   case 
DRM_MODE_DPMS_STANDBY:
594e9c04b5864b KuoHsiang Chou2022-04-28  1012   case 
DRM_MODE_DPMS_SUSPEND:
312fec1405dd54 Dave Airlie   2012-02-29  1013   case DRM_MODE_DPMS_OFF:
594e9c04b5864b KuoHsiang Chou2022-04-28  1014   ch = mode;
83c6620bae3f14 Dave Airlie   2014-03-28  1015   if 
(ast->tx_chip_type == AST_TX_DP501)
83c6620bae3f14 Dave Airlie   2014-03-28  1016   
ast_set_dp501_video_output(crtc->dev, 0);
312fec1405dd54 Dave Airlie   2012-02-29  1017   break;
594e9c04b5864b KuoHsiang Chou2022-04-28  1018  
594e9c04b5864b KuoHsiang Chou2022-04-28 @1019   if 
(ast->tx_chip_type == AST_TX_ASTDP) {
594e9c04b5864b KuoHsiang Chou2022-04-28  1020   
ast_dp_set_on_off(crtc->dev, 0);
594e9c04b5864b KuoHsiang Chou2022-04-28  1021   
ast_dp_power_on_off(crtc->dev, AST_DP_POWER_OFF);
594e9c04b5864b KuoHsiang Chou2022-04-28  1022   }
594e9c04b5864b KuoHsiang Chou2022-04-28  1023  
594e9c04b5864b KuoHsiang Chou2022-04-28  1024   
ast_set_index_reg_mask(ast, AST_IO_SEQ_PORT,  0x01, 0xdf, 0x20);
594e9c04b5864b KuoHsiang Chou2022-04-28  1025   
ast_set_index_reg_mask(ast, AST_IO_CRTC_PORT, 0xb6, 0xfc, ch);
312fec1405dd54 Dave Airlie   2012-02-29  1026   }
312fec1405dd54 Dave Airlie   2012-02-29  1027  }
312fec1405dd54 Dave Airlie   2012-02-29  1028  

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] drivers/iio/frequency/admv1014.c:119:8: warning: Excessive padding in 'struct admv1014_state' (88 padding bytes, where 24 is optimal).

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Antoniu Miclaus 
CC: Jonathan Cameron 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   107c948d1d3e61d10aee9d0f7c3d81bbee9842af
commit: f4eb9ac7842ff22370e262b8440edada40b1680a iio: frequency: admv1014: add 
support for ADMV1014
date:   2 months ago
:: branch date: 10 hours ago
:: commit date: 2 months ago
config: riscv-randconfig-c006-20220427 
(https://download.01.org/0day-ci/archive/20220504/202205041724.3mcr23sq-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
1cddcfdc3c683b393df1a5c9063252eb60e52818)
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=f4eb9ac7842ff22370e262b8440edada40b1680a
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f4eb9ac7842ff22370e262b8440edada40b1680a
# save the config file
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 >>)
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   drivers/iio/adc/bcm_iproc_adc.c:120:17: warning: Value stored to 'dev' 
during its initialization is never read [clang-analyzer-deadcode.DeadStores]
   struct device *dev = _dev->dev;
  ^~~   ~~~
   drivers/iio/adc/bcm_iproc_adc.c:120:17: note: Value stored to 'dev' during 
its initialization is never read
   struct device *dev = _dev->dev;
  ^~~   ~~~
   Suppressed 2 warnings (2 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   2 warnings generated.
   Suppressed 2 warnings (2 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.
   drivers/iio/adc/hi8435.c:43:8: warning: Excessive padding in 'struct 
hi8435_priv' (65 padding bytes, where 1 is optimal). 
   Optimal fields order: 
   reg_buffer, 
   event_prev_val, 
   spi, 
   event_scan_mask, 
   lock, 
   threshold_lo, 
   threshold_hi, 
   consider reordering the fields or adding explicit padding members 
[clang-analyzer-optin.performance.Padding]
   struct hi8435_priv {
   ~~~^
   drivers/iio/adc/hi8435.c:43:8: note: Excessive padding in 'struct 
hi8435_priv' (65 padding bytes, where 1 is optimal). Optimal fields order: 
reg_buffer, event_prev_val, spi, event_scan_mask, lock, threshold_lo, 
threshold_hi, consider reordering the fields or adding explicit padding members
   struct hi8435_priv {
   ~~~^
   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.
   drivers/iio/adc/hx711.c:536:2: warning: Value stored to 'ret' is never read 
[clang-analyzer-deadcode.DeadStores]
   ret = of_property_read_u32(np, "clock-frequency",
   ^ ~~~
   drivers/iio/adc/hx711.c:536:2: note: Value stored to 'ret' is never read
   ret = of_property_read_u32(np, "clock-frequency",
   ^ ~~~
   Suppressed 2 warnings (2 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.
   2 w

[kbuild] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dpcd.c:195:2: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]

2022-05-04 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Wesley Chalmers 
CC: Alex Deucher 
CC: Jun Lei 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   107c948d1d3e61d10aee9d0f7c3d81bbee9842af
commit: 9cf9498f668d4c78616ebd2fe2e5f3850b189c5b drm/amd/display: Partition 
DPCD address space and break up transactions
date:   11 months ago
:: branch date: 9 hours ago
:: commit date: 11 months ago
config: arm-randconfig-c002-20220428 
(https://download.01.org/0day-ci/archive/20220504/202205041616.xcnyrldi-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
c59473aacce38cd7dd77eebceaf3c98c5707ab3b)
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=9cf9498f668d4c78616ebd2fe2e5f3850b189c5b
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 9cf9498f668d4c78616ebd2fe2e5f3850b189c5b
# save the config file
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/base/cacheinfo.c:272:3: note: Loop condition is false. Execution 
continues on line 286
   for_each_cpu(sibling, _leaf->shared_cpu_map) {
   ^
   include/linux/cpumask.h:179:2: note: expanded from macro 'for_each_cpu'
   for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
   ^
   drivers/base/cacheinfo.c:286:3: note: Taking true branch
   if (of_have_populated_dt())
   ^
   drivers/base/cacheinfo.c:287:4: note: Value assigned to 
'ci_cpu_cacheinfo.info_list'
   of_node_put(this_leaf->fw_token);
   ^~~~
   drivers/base/cacheinfo.c:270:26: note: Loop condition is false.  Exiting loop
   for (index = 0; index < cache_leaves(cpu); index++) {
   ^
   drivers/base/cacheinfo.c:26:28: note: expanded from macro 'cache_leaves'
   #define cache_leaves(cpu)   (ci_cacheinfo(cpu)->num_leaves)
^
   drivers/base/cacheinfo.c:25:29: note: expanded from macro 'ci_cacheinfo'
   #define ci_cacheinfo(cpu)   (_cpu(ci_cpu_cacheinfo, cpu))
 ^
   include/linux/percpu-defs.h:269:29: note: expanded from macro 'per_cpu'
   #define per_cpu(var, cpu)   (*per_cpu_ptr(&(var), cpu))
 ^
   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)  \
   ^
   drivers/base/cacheinfo.c:270:18: note: Assuming 'index' is < field 
'num_leaves'
   for (index = 0; index < cache_leaves(cpu); index++) {
   ^
   drivers/base/cacheinfo.c:270:2: note: Loop condition is true.  Entering loop 
body
   for (index = 0; index < cache_leaves(cpu); index++) {
   ^
   drivers/base/cacheinfo.c:271:3: note: Value assigned to 'this_leaf'
   this_leaf = this_cpu_ci->info_list + index;
   ^~
   drivers/base/cacheinfo.c:272:3: note: Loop condition is true.  Entering loop 
body
   for_each_cpu(sibling, _leaf->shared_cpu_map) {
   ^
   include/linux/cpumask.h:179:2: note: expanded from macro 'for_each_cpu'
   for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)mask)
   ^
   drivers/base/cacheinfo.c:275:8: note: 'sibling' is not equal to 'cpu'
   if (sibling == cpu) /* skip itself */
   ^~~
   drivers/base/cacheinfo.c:275:4: note: Taking false branch
   if (sibling == cpu) /* skip itself */
   ^
   drivers/base/cacheinfo.c:279:8: note: Assuming field 'info_list' is null
  

[kbuild] Re: [PATCH 2/2] btrfs: Use btrfs_try_lock_balance in btrfs_ioctl_balance

2022-05-04 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
In-Reply-To: <20220503083637.1051023-3-nbori...@suse.com>
References: <20220503083637.1051023-3-nbori...@suse.com>
TO: Nikolay Borisov 
TO: linux-bt...@vger.kernel.org
CC: Nikolay Borisov 

Hi Nikolay,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on kdave/for-next]
[also build test WARNING on next-20220503]
[cannot apply to v5.18-rc5]
[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/intel-lab-lkp/linux/commits/Nikolay-Borisov/Refactor-btrfs_ioctl_balance/20220503-163837
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
:: branch date: 22 hours ago
:: commit date: 22 hours ago
config: i386-randconfig-m021-20220502 
(https://download.01.org/0day-ci/archive/20220504/202205041423.nvvjihsj-...@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 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:
fs/btrfs/ioctl.c:4493 btrfs_ioctl_balance() error: double free of 'bargs'

vim +/bargs +4493 fs/btrfs/ioctl.c

d383145190e87f Nikolay Borisov  2022-05-03  4402  
9ba1f6e44ed7a1 Liu Bo   2012-05-11  4403  static long 
btrfs_ioctl_balance(struct file *file, void __user *arg)
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4404  {
496ad9aa8ef448 Al Viro  2013-01-23  4405struct btrfs_root *root 
= BTRFS_I(file_inode(file))->root;
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4406struct btrfs_fs_info 
*fs_info = root->fs_info;
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4407struct 
btrfs_ioctl_balance_args *bargs;
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4408struct 
btrfs_balance_control *bctl;
c696e46e6ec2b3 Nikolay Borisov  2022-05-03  4409bool need_unlock = 
true; /* for mut. excl. ops lock */
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4410int ret;
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4411  
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4412if 
(!capable(CAP_SYS_ADMIN))
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4413return -EPERM;
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4414  
e54bfa31044d60 Liu Bo   2012-06-29  4415ret = 
mnt_want_write_file(file);
9ba1f6e44ed7a1 Liu Bo   2012-05-11  4416if (ret)
9ba1f6e44ed7a1 Liu Bo   2012-05-11  4417return ret;
9ba1f6e44ed7a1 Liu Bo   2012-05-11  4418  
c746db1b6ed99f Nikolay Borisov  2022-03-30  4419bargs = 
memdup_user(arg, sizeof(*bargs));
c746db1b6ed99f Nikolay Borisov  2022-03-30  4420if (IS_ERR(bargs)) {
c746db1b6ed99f Nikolay Borisov  2022-03-30  4421ret = 
PTR_ERR(bargs);
c746db1b6ed99f Nikolay Borisov  2022-03-30  4422bargs = NULL;
c746db1b6ed99f Nikolay Borisov  2022-03-30  4423goto out;
c746db1b6ed99f Nikolay Borisov  2022-03-30  4424}
c746db1b6ed99f Nikolay Borisov  2022-03-30  4425  
c696e46e6ec2b3 Nikolay Borisov  2022-05-03  4426ret = 
btrfs_try_lock_balance(fs_info, _unlock);
c696e46e6ec2b3 Nikolay Borisov  2022-05-03  4427if (ret)
ed0fb78fb6aa29 Ilya Dryomov 2013-01-20  4428goto out;
ed0fb78fb6aa29 Ilya Dryomov 2013-01-20  4429  
c696e46e6ec2b3 Nikolay Borisov  2022-05-03  4430
lockdep_assert_held(_info->balance_mutex);
c696e46e6ec2b3 Nikolay Borisov  2022-05-03  4431  
de322263d3a6d4 Ilya Dryomov 2012-01-16  4432if (bargs->flags & 
BTRFS_BALANCE_RESUME) {
de322263d3a6d4 Ilya Dryomov 2012-01-16  4433if 
(!fs_info->balance_ctl) {
de322263d3a6d4 Ilya Dryomov 2012-01-16  4434ret = 
-ENOTCONN;
c746db1b6ed99f Nikolay Borisov  2022-03-30  4435goto 
out_unlock;
de322263d3a6d4 Ilya Dryomov 2012-01-16  4436}
de322263d3a6d4 Ilya Dryomov 2012-01-16  4437  
de322263d3a6d4 Ilya Dryomov 2012-01-16  4438bctl = 
fs_info->balance_ctl;
de322263d3a6d4 Ilya Dryomov 2012-01-16  4439
spin_lock(_info->balance_lock);
de322263d3a6d4 Ilya Dryomov 2012-01-16  4440bctl->flags |= 
BTRFS_BALANCE_RESUME;
de322263d3a6d4 Ilya Dryomov 2012-01-16  4441
spin_unlock(_info->balance_lock);
efc0e69c2feab8 Nikolay Borisov  2021-11-25  4442
btrfs_exclop_balance(fs_info, BTRFS_EXCLOP_BALANCE);
de322263d3a6d4 Ilya Dryomov 2012-01-16  4443  
de322263d3a6d4 Ilya Dryomov 2012-01-16  goto do_balance;
de322263d3a6d4 Ilya Dryomov 2012-01-16  4445}
c9e9f97bdfb64d Ilya Dryomov 2012-01-16  4446  
c746db1b6ed99f Nikolay Boriso