[kbuild] Re: [RFC PATCH 2/2] acpi/pci_root: negotiate CXL _OSC

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
In-Reply-To: <20220317002704.1835870-3-vishal.l.ve...@intel.com>
References: <20220317002704.1835870-3-vishal.l.ve...@intel.com>
TO: Vishal Verma 

Hi Vishal,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on 74be98774dfbc5b8b795db726bd772e735d2edd4]

url:
https://github.com/0day-ci/linux/commits/Vishal-Verma/acpi-add-support-for-CXL-_OSC/20220317-082840
base:   74be98774dfbc5b8b795db726bd772e735d2edd4
:: branch date: 5 hours ago
:: commit date: 5 hours ago
config: x86_64-randconfig-m001 
(https://download.01.org/0day-ci/archive/20220317/202203171337.1o6vuotj-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/acpi/pci_root.c:450 acpi_pci_osc_control_set() error: uninitialized 
symbol 'cxl_ctrl'.
drivers/acpi/pci_root.c:564 calculate_cxl_control() error: uninitialized symbol 
'control'.
drivers/acpi/pci_root.c:619 negotiate_os_control() error: uninitialized symbol 
'cxl_support'.

Old smatch warnings:
drivers/acpi/pci_root.c:453 acpi_pci_osc_control_set() error: uninitialized 
symbol 'cxl_ctrl'.
drivers/acpi/pci_root.c:466 acpi_pci_osc_control_set() error: uninitialized 
symbol 'cxl_ctrl'.
drivers/acpi/pci_root.c:480 acpi_pci_osc_control_set() error: uninitialized 
symbol 'cxl_ctrl'.

vim +/cxl_ctrl +450 drivers/acpi/pci_root.c

2f7bbceb5b6aa93 Alexander Chiang   2009-06-10  401  
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  402  /**
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  403   * 
acpi_pci_osc_control_set - Request control of PCI root _OSC features.
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  404   * @handle: ACPI 
handle of a PCI root bridge (or PCIe Root Complex).
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  405   * @mask: Mask of 
_OSC bits to request control of, place to store control mask.
843438deebe247f Yang Li2021-12-23  406   * @support: _OSC 
supported capability.
8020d862c22d52b Vishal Verma   2022-03-16  407   * @cxl_mask: Mask 
of CXL _OSC control bits, place to store control mask.
8020d862c22d52b Vishal Verma   2022-03-16  408   * @cxl_support: 
CXL _OSC supported capability.
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  409   *
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  410   * Run _OSC query 
for @mask and if that is successful, compare the returned
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  411   * mask of control 
bits with @req.  If all of the @req bits are set in the
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  412   * returned mask, 
run _OSC request for it.
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  413   *
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  414   * The variable at 
the @mask address may be modified regardless of whether or
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  415   * not the function 
returns success.  On success it will contain the mask of
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  416   * _OSC bits the 
BIOS has granted control of, but its contents are meaningless
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  417   * on failure.
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  418   **/
8020d862c22d52b Vishal Verma   2022-03-16  419  static acpi_status 
acpi_pci_osc_control_set(acpi_handle handle, u32 *mask,
8020d862c22d52b Vishal Verma   2022-03-16  420  
u32 support, u32 *cxl_mask,
8020d862c22d52b Vishal Verma   2022-03-16  421  
u32 cxl_support)
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  422  {
6bc779ee05d4fa6 Joerg Roedel   2021-08-24  423  u32 req = 
OSC_PCI_EXPRESS_CAPABILITY_CONTROL;
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  424  struct 
acpi_pci_root *root;
866e61fc40c96e7 Bjorn Helgaas  2020-06-02  425  acpi_status 
status;
8020d862c22d52b Vishal Verma   2022-03-16  426  u32 ctrl, 
cxl_ctrl, capbuf[8];
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  427  
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  428  if (!mask)
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  429  return 
AE_BAD_PARAMETER;
75fb60f26befb59 Rafael J. Wysocki  2010-08-23  430  
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  431  root = 
acpi_pci_find_root(handle);
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  432  if (!root)
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  433  return 
AE_NOT_EXIST;
63f10f0f6df4e4e Kenji Kaneshige2009-02-09  434  
6bc779ee05d4fa6 Joerg Roedel   2021-08-24  435  ctrl   = *mask;
6bc779ee05d4

kbuild@lists.01.org

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Cai Huoqing 
CC: "Marc Kleine-Budde" 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: ac4224087312d7212bd3411f1e393f4b7cb1ff15 can: rcar: Kconfig: Add helper 
dependency on COMPILE_TEST
date:   7 months ago
:: branch date: 34 hours ago
:: commit date: 7 months ago
config: m68k-randconfig-m031-20220317 
(https://download.01.org/0day-ci/archive/20220317/202203171122.ssh7ns9h-...@intel.com/config)
compiler: m68k-linux-gcc (GCC) 11.2.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/net/can/rcar/rcar_can.c:256 rcar_can_error() warn: assigning (-65) to 
unsigned variable '(*(isa_mtb((&priv->regs->ecsr'
drivers/net/can/rcar/rcar_can.c:308 rcar_can_error() warn: assigning (-2) to 
unsigned variable '(*(isa_mtb((&priv->regs->eifr'

Old smatch warnings:
drivers/net/can/rcar/rcar_can.c:263 rcar_can_error() warn: assigning (-33) to 
unsigned variable '(*(isa_mtb((&priv->regs->ecsr'
drivers/net/can/rcar/rcar_can.c:270 rcar_can_error() warn: assigning (-17) to 
unsigned variable '(*(isa_mtb((&priv->regs->ecsr'
drivers/net/can/rcar/rcar_can.c:277 rcar_can_error() warn: assigning (-9) to 
unsigned variable '(*(isa_mtb((&priv->regs->ecsr'
drivers/net/can/rcar/rcar_can.c:284 rcar_can_error() warn: assigning (-5) to 
unsigned variable '(*(isa_mtb((&priv->regs->ecsr'
drivers/net/can/rcar/rcar_can.c:293 rcar_can_error() warn: assigning (-3) to 
unsigned variable '(*(isa_mtb((&priv->regs->ecsr'
drivers/net/can/rcar/rcar_can.c:300 rcar_can_error() warn: assigning (-2) to 
unsigned variable '(*(isa_mtb((&priv->regs->ecsr'
drivers/net/can/rcar/rcar_can.c:315 rcar_can_error() warn: assigning (-3) to 
unsigned variable '(*(isa_mtb((&priv->regs->eifr'
drivers/net/can/rcar/rcar_can.c:325 rcar_can_error() warn: assigning (-5) to 
unsigned variable '(*(isa_mtb((&priv->regs->eifr'
drivers/net/can/rcar/rcar_can.c:337 rcar_can_error() warn: assigning (-9) to 
unsigned variable '(*(isa_mtb((&priv->regs->eifr'
drivers/net/can/rcar/rcar_can.c:347 rcar_can_error() warn: assigning (-33) to 
unsigned variable '(*(isa_mtb((&priv->regs->eifr'
drivers/net/can/rcar/rcar_can.c:358 rcar_can_error() warn: assigning (-65) to 
unsigned variable '(*(isa_mtb((&priv->regs->eifr'

vim +256 drivers/net/can/rcar/rcar_can.c

fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  222 
 
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  223 
 static void rcar_can_error(struct net_device *ndev)
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  224 
 {
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  225 
struct rcar_can_priv *priv = netdev_priv(ndev);
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  226 
struct net_device_stats *stats = &ndev->stats;
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  227 
struct can_frame *cf;
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  228 
struct sk_buff *skb;
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  229 
u8 eifr, txerr = 0, rxerr = 0;
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  230 
 
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  231 
/* Propagate the error condition to the CAN stack */
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  232 
skb = alloc_can_err_skb(ndev, &cf);
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  233 
 
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  234 
eifr = readb(&priv->regs->eifr);
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  235 
if (eifr & (RCAR_CAN_EIFR_EWIF | RCAR_CAN_EIFR_EPIF)) {
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  236 
txerr = readb(&priv->regs->tecr);
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  237 
rxerr = readb(&priv->regs->recr);
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  238 
if (skb) {
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  239 
cf->can_id |= CAN_ERR_CRTL;
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  240 
cf->data[6] = txerr;
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  241 
cf->data[7] = rxerr;
fd1159318e55e90 drivers/net/can/rcar_can.c  Sergei Shtylyov 2014-05-17  

kbuild@lists.01.org

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: Linux Memory Management List 
TO: Fengnan Chang 
CC: Jaegeuk Kim 
CC: Chao Yu , Chao Yu 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   8a11187eb62b8b910d2c5484e1f5d160e8b11eb4
commit: a6f748c35eca6eedf2dda8b2a30abd640f1249dc [11491/13209] f2fs: fix 
compressed file start atomic write may cause data corruption
:: branch date: 16 hours ago
:: commit date: 6 days ago
config: parisc-randconfig-m031-20220317 
(https://download.01.org/0day-ci/archive/20220317/202203171137.0ldg0syz-...@intel.com/config)
compiler: hppa-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:
fs/f2fs/file.c:2057 f2fs_ioc_start_atomic_write() warn: inconsistent returns 
'&inode->i_rwsem'.

Old smatch warnings:
fs/f2fs/f2fs.h:2371 dec_valid_block_count() warn: should 'count << 3' be a 64 
bit type?
fs/f2fs/file.c:2942 f2fs_ioc_flush_device() warn: potential spectre issue 
'sbi->devs' [w] (local cap)
fs/f2fs/file.c:4665 f2fs_file_write_iter() warn: inconsistent returns 
'&inode->i_rwsem'.

vim +2057 fs/f2fs/file.c

d49f3e890290bd1 Chao Yu 2015-01-23  1988  
88b88a667971599 Jaegeuk Kim 2014-10-06  1989  static int 
f2fs_ioc_start_atomic_write(struct file *filp)
88b88a667971599 Jaegeuk Kim 2014-10-06  1990  {
88b88a667971599 Jaegeuk Kim 2014-10-06  1991struct inode *inode = 
file_inode(filp);
984fc4e76d63345 Chao Yu 2022-02-04  1992struct user_namespace 
*mnt_userns = file_mnt_user_ns(filp);
743b620cb0516f6 Jaegeuk Kim 2019-09-09  1993struct f2fs_inode_info 
*fi = F2FS_I(inode);
743b620cb0516f6 Jaegeuk Kim 2019-09-09  1994struct f2fs_sb_info 
*sbi = F2FS_I_SB(inode);
f4c9c743acedc2f Chao Yu 2015-07-17  1995int ret;
88b88a667971599 Jaegeuk Kim 2014-10-06  1996  
984fc4e76d63345 Chao Yu 2022-02-04  1997if 
(!inode_owner_or_capable(mnt_userns, inode))
88b88a667971599 Jaegeuk Kim 2014-10-06  1998return -EACCES;
88b88a667971599 Jaegeuk Kim 2014-10-06  1999  
e811898c97f83ae Jaegeuk Kim 2017-03-17  2000if 
(!S_ISREG(inode->i_mode))
e811898c97f83ae Jaegeuk Kim 2017-03-17  2001return -EINVAL;
e811898c97f83ae Jaegeuk Kim 2017-03-17  2002  
038d06984f5c50a Chao Yu 2019-07-25  2003if (filp->f_flags & 
O_DIRECT)
038d06984f5c50a Chao Yu 2019-07-25  2004return -EINVAL;
038d06984f5c50a Chao Yu 2019-07-25  2005  
7fb17fe44b70c85 Chao Yu 2016-05-09  2006ret = 
mnt_want_write_file(filp);
7fb17fe44b70c85 Chao Yu 2016-05-09  2007if (ret)
7fb17fe44b70c85 Chao Yu 2016-05-09  2008return ret;
7fb17fe44b70c85 Chao Yu 2016-05-09  2009  
0fac558b9658479 Chao Yu 2016-05-09  2010inode_lock(inode);
0fac558b9658479 Chao Yu 2016-05-09  2011  
a6f748c35eca6ee Fengnan Chang   2022-03-10  2012if 
(!f2fs_disable_compressed_file(inode))
a6f748c35eca6ee Fengnan Chang   2022-03-10  2013return -EINVAL;
4c8ff7095bef64f Chao Yu 2019-11-01  2014  
455e3a5887ee7eb Jaegeuk Kim 2018-07-27  2015if 
(f2fs_is_atomic_file(inode)) {
455e3a5887ee7eb Jaegeuk Kim 2018-07-27  2016if 
(is_inode_flag_set(inode, FI_ATOMIC_REVOKE_REQUEST))
455e3a5887ee7eb Jaegeuk Kim 2018-07-27  2017ret = 
-EINVAL;
7fb17fe44b70c85 Chao Yu 2016-05-09  2018goto out;
455e3a5887ee7eb Jaegeuk Kim 2018-07-27  2019}
88b88a667971599 Jaegeuk Kim 2014-10-06  2020  
f4c9c743acedc2f Chao Yu 2015-07-17  2021ret = 
f2fs_convert_inline_inode(inode);
f4c9c743acedc2f Chao Yu 2015-07-17  2022if (ret)
7fb17fe44b70c85 Chao Yu 2016-05-09  2023goto out;
88b88a667971599 Jaegeuk Kim 2014-10-06  2024  
e4544b63a7ee49e Tim Murray  2022-01-07  2025
f2fs_down_write(&F2FS_I(inode)->i_gc_rwsem[WRITE]);
6f8d4455060dfb0 Jaegeuk Kim 2018-07-25  2026  
31867b23d7d1ee3 Jaegeuk Kim 2018-12-28  2027/*
31867b23d7d1ee3 Jaegeuk Kim 2018-12-28  2028 * Should wait end_io 
to count F2FS_WB_CP_DATA correctly by
31867b23d7d1ee3 Jaegeuk Kim 2018-12-28  2029 * f2fs_is_atomic_file.
31867b23d7d1ee3 Jaegeuk Kim 2018-12-28  2030 */
31867b23d7d1ee3 Jaegeuk Kim 2018-12-28  2031if 
(get_dirty_pages(inode))
dcbb4c10e6d9693 Joe Perches 2019-06-18  2032
f2fs_warn(F2FS_I_SB(inode), "Unexpected flush for atomic writes: ino=%lu, 
npages=%u",
c27753d675fccd3 Jaegeuk Kim 2016-04-12  2033  
inode->i_ino, get_dirty_pages(inode));
c27753d675fccd3 Jaegeuk Kim 2016-04-12  2034ret = 
filemap_write_and_wait_range(inode->i_mapping, 0, LLONG_MAX);
6f8

[kbuild] [gfs2:for-next 9/11] fs/gfs2/file.c:796:24: sparse: unsigned int *

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: cluster-de...@redhat.com
CC: linux-ker...@vger.kernel.org
TO: Andreas Gruenbacher 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git 
for-next
head:   a20050c14edf19add5a9588cb196bb00aa410650
commit: 165d142ffacdef3e620819a1031df3d896aa29ab [9/11] gfs2: Fix 
should_fault_in_pages() logic
:: branch date: 10 hours ago
:: commit date: 12 hours ago
config: sh-randconfig-s032-20220313 
(https://download.01.org/0day-ci/archive/20220317/202203170954.vflmctje-...@intel.com/config)
compiler: sh4-linux-gcc (GCC) 11.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.4-dirty
# 
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/?id=165d142ffacdef3e620819a1031df3d896aa29ab
git remote add gfs2 
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
git fetch --no-tags gfs2 for-next
git checkout 165d142ffacdef3e620819a1031df3d896aa29ab
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sh SHELL=/bin/bash 
fs/gfs2/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


sparse warnings: (new ones prefixed by >>)
   fs/gfs2/file.c:796:24: sparse: sparse: incompatible types in comparison 
expression (different signedness):
>> fs/gfs2/file.c:796:24: sparse:unsigned int *
   fs/gfs2/file.c:796:24: sparse:int *
>> fs/gfs2/file.c:796:24: sparse: sparse: cannot size expression

vim +796 fs/gfs2/file.c

33c3de32872ef3 fs/gfs2/ops_file.c Steven Whitehouse   2006-11-30  772  
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  773  static 
inline bool should_fault_in_pages(ssize_t ret, struct iov_iter *i,
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  774   
 size_t *prev_count,
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  775   
 size_t *window_size)
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  776  {
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  777   size_t 
count = iov_iter_count(i);
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  778   size_t 
size, offs;
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  779  
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  780   if 
(likely(!count))
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  781   
return false;
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  782   if (ret 
<= 0 && ret != -EFAULT)
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  783   
return false;
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  784   if 
(!iter_is_iovec(i))
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  785   
return false;
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  786  
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  787   size = 
PAGE_SIZE;
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  788   offs = 
offset_in_page(i->iov[0].iov_base + i->iov_offset);
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  789   if 
(*prev_count != count || !*window_size) {
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  790   
int nr_dirtied;
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  791  
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  792   
size = ALIGN(offs + count, PAGE_SIZE);
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  793   
size = min_t(size_t, size, SZ_1M);
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  794   
nr_dirtied = max(current->nr_dirtied_pause -
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  795   
 current->nr_dirtied, 8);
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07 @796   
size = min(size, nr_dirtied << PAGE_SHIFT);
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  797   }
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  798  
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  799   
*prev_count = count;
165d142ffacdef fs/gfs2/file.c Andreas Gruenbacher 2022-03-07  800   
*window_size = size - offs;
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  801   return 
true;
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  802  }
00bfe02f479688 fs/gfs2/file.c Andreas Gruenbacher 2021-10-18  803  

--

[kbuild] sound/drivers/serial-u16550.c:609 snd_uart16550_output_byte() warn: ignoring unreachable code.

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Bart Van Assche 
CC: Helge Deller 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: 6968e707d371ef80511448c6771daf445b4a5cf5 parisc: io: Improve the 
outb(), outw() and outl() macros
date:   10 weeks ago
:: branch date: 32 hours ago
:: commit date: 10 weeks ago
config: parisc-randconfig-m031-20220317 
(https://download.01.org/0day-ci/archive/20220317/202203170934.4dupjlnq-...@intel.com/config)
compiler: hppa-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:
sound/drivers/serial-u16550.c:609 snd_uart16550_output_byte() warn: ignoring 
unreachable code.
sound/drivers/serial-u16550.c:806 snd_uart16550_create() warn: ignoring 
unreachable code.
sound/drivers/mpu401/mpu401_uart.c:47 mpu401_write_port() warn: ignoring 
unreachable code.
drivers/net/hamradio/baycom_ser_hdx.c:394 ser12_interrupt() warn: ignoring 
unreachable code.

Old smatch warnings:
sound/drivers/serial-u16550.c:179 snd_uart16550_buffer_output() warn: ignoring 
unreachable code.
sound/drivers/serial-u16550.c:333 snd_uart16550_detect() warn: ignoring 
unreachable code.
sound/drivers/serial-u16550.c:368 snd_uart16550_do_open() warn: ignoring 
unreachable code.
sound/drivers/serial-u16550.c:457 snd_uart16550_do_close() warn: ignoring 
unreachable code.
sound/drivers/serial-u16550.c:613 snd_uart16550_output_byte() warn: ignoring 
unreachable code.
sound/drivers/serial-u16550.c:811 snd_uart16550_create() warn: ignoring 
unreachable code.
drivers/net/hamradio/baycom_ser_hdx.c:193 ser12_tx() warn: ignoring unreachable 
code.
drivers/net/hamradio/baycom_ser_hdx.c:158 ser12_set_divisor() warn: ignoring 
unreachable code.
drivers/net/hamradio/baycom_ser_hdx.c:339 ser12_rx() warn: ignoring unreachable 
code.
drivers/net/hamradio/baycom_ser_hdx.c:431 ser12_check_uart() warn: ignoring 
unreachable code.
drivers/net/hamradio/baycom_ser_hdx.c:474 ser12_open() warn: ignoring 
unreachable code.
drivers/net/hamradio/baycom_ser_hdx.c:508 ser12_close() warn: ignoring 
unreachable code.

vim +609 sound/drivers/serial-u16550.c

^1da177e4c3f415 Linus Torvalds 2005-04-16  594  
0b830bac35dd6e3 Takashi Iwai   2006-11-24  595  static int 
snd_uart16550_output_byte(struct snd_uart16550 *uart,
0b830bac35dd6e3 Takashi Iwai   2006-11-24  596  
 struct snd_rawmidi_substream *substream,
0b830bac35dd6e3 Takashi Iwai   2006-11-24  597  
 unsigned char midi_byte)
^1da177e4c3f415 Linus Torvalds 2005-04-16  598  {
^1da177e4c3f415 Linus Torvalds 2005-04-16  599  if (uart->buff_in_count 
== 0/* Buffer empty? */
^1da177e4c3f415 Linus Torvalds 2005-04-16  600  && ((uart->adaptor 
!= SNDRV_SERIAL_MS124W_SA &&
^1da177e4c3f415 Linus Torvalds 2005-04-16  601  uart->adaptor != 
SNDRV_SERIAL_GENERIC) ||
^1da177e4c3f415 Linus Torvalds 2005-04-16  602  
(uart->fifo_count == 0  /* FIFO empty? */
^1da177e4c3f415 Linus Torvalds 2005-04-16  603   && 
(inb(uart->base + UART_MSR) & UART_MSR_CTS { /* CTS? */
^1da177e4c3f415 Linus Torvalds 2005-04-16  604  
^1da177e4c3f415 Linus Torvalds 2005-04-16  605  /* Tx Buffer 
Empty - try to write immediately */
^1da177e4c3f415 Linus Torvalds 2005-04-16  606  if 
((inb(uart->base + UART_LSR) & UART_LSR_THRE) != 0) {
^1da177e4c3f415 Linus Torvalds 2005-04-16  607  /* 
Transmitter holding register (and Tx FIFO) empty */
^1da177e4c3f415 Linus Torvalds 2005-04-16  608  
uart->fifo_count = 1;
^1da177e4c3f415 Linus Torvalds 2005-04-16 @609  
outb(midi_byte, uart->base + UART_TX);
^1da177e4c3f415 Linus Torvalds 2005-04-16  610  } else {
^1da177e4c3f415 Linus Torvalds 2005-04-16  611  if 
(uart->fifo_count < uart->fifo_limit) {
^1da177e4c3f415 Linus Torvalds 2005-04-16  612  
uart->fifo_count++;
^1da177e4c3f415 Linus Torvalds 2005-04-16  613  
outb(midi_byte, uart->base + UART_TX);
^1da177e4c3f415 Linus Torvalds 2005-04-16  614  } else {
0b830bac35dd6e3 Takashi Iwai   2006-11-24  615  
/* Cannot write (buffer empty) -
0b830bac35dd6e3 Takashi Iwai   2006-11-24  616  
 * put char in buffer */
^1da177e4c3f415 Linus Torvalds 2005-04-16  617  
snd_uart16550_write_buffer(uart, midi_byte);
^1da177e4c3f415 Linus Torvalds 2005-04-16  618  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  619  }
^1da177e4c3f415 Linus Torvalds 2005-04-16  620  

[kbuild] [linux-next:master 5697/13209] drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link.c:4330:7: warning: Dereference of null pointer [clang-analyzer-core.NullDereference]

2022-03-16 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: Linux Memory Management List 
TO: Hersen Wu 
CC: Alex Deucher 
CC: Jerry Zuo 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   8a11187eb62b8b910d2c5484e1f5d160e8b11eb4
commit: fa39f936dbb96626d3345fd8d66af6be6f47ff9e [5697/13209] drm/amd/display: 
add dsc mst stream pbn log for debug
:: branch date: 13 hours ago
:: commit date: 4 weeks ago
config: riscv-randconfig-c006-20220310 
(https://download.01.org/0day-ci/archive/20220317/202203170721.szipp2pb-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
276ca87382b8f16a65bddac700202924228982f6)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=fa39f936dbb96626d3345fd8d66af6be6f47ff9e
git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout fa39f936dbb96626d3345fd8d66af6be6f47ff9e
# 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 >>)
   ^~
   net/nfc/nci/hci.c:245:2: note: Taking false branch
   if (r == NCI_STATUS_OK) {
   ^
   net/nfc/nci/hci.c:255:2: note: Returning without writing to '*'
   return r;
   ^
   net/nfc/nci/hci.c:531:12: note: Returning from 'nci_hci_send_cmd'
   *result = nci_hci_send_cmd(ndev, NCI_HCI_ADMIN_GATE,
 ^~
   net/nfc/nci/hci.c:534:6: note: Assuming the condition is false
   if (*result < 0)
   ^~~
   net/nfc/nci/hci.c:534:2: note: Taking false branch
   if (*result < 0)
   ^
   net/nfc/nci/hci.c:537:44: note: Access to field 'data' results in a 
dereference of an undefined pointer value (loaded from variable 'skb')
   resp = (struct nci_hci_create_pipe_resp *)skb->data;
 ^~~
   net/nfc/nci/hci.c:742:6: warning: Access to field 'len' results in a 
dereference of an undefined pointer value (loaded from variable 'skb') 
[clang-analyzer-core.NullDereference]
   if (skb->len &&
   ^~~
   net/nfc/nci/hci.c:712:2: note: 'skb' declared without an initial value
   struct sk_buff *skb;
   ^~~
   net/nfc/nci/hci.c:719:6: note: Assuming 'conn_info' is non-null
   if (!conn_info)
   ^~
   net/nfc/nci/hci.c:719:2: note: Taking false branch
   if (!conn_info)
   ^
   net/nfc/nci/hci.c:727:6: note: Assuming field 'gate' is equal to 
NCI_HCI_ADMIN_GATE
   if (ndev->hci_dev->init_data.gates[0].gate != NCI_HCI_ADMIN_GATE)
   ^~~~
   net/nfc/nci/hci.c:727:2: note: Taking false branch
   if (ndev->hci_dev->init_data.gates[0].gate != NCI_HCI_ADMIN_GATE)
   ^
   net/nfc/nci/hci.c:734:6: note: 'r' is >= 0
   if (r < 0)
   ^
   net/nfc/nci/hci.c:734:2: note: Taking false branch
   if (r < 0)
   ^
   net/nfc/nci/hci.c:737:6: note: Calling 'nci_hci_get_param'
   r = nci_hci_get_param(ndev, NCI_HCI_ADMIN_GATE,
   ^~~
   net/nfc/nci/hci.c:608:2: note: Taking false branch
   pr_debug("idx=%d to gate %d\n", idx, gate);
   ^
   include/linux/printk.h:576:2: note: expanded from macro 'pr_debug'
   no_printk(KERN_DEBUG pr_fmt(fmt), ##__VA_ARGS__)
   ^
   include/linux/printk.h:131:2: note: expanded from macro 'no_printk'
   if (0)  \
   ^
   net/nfc/nci/hci.c:610:6: note: Assuming 'pipe' is not equal to 
NCI_HCI_INVALID_PIPE
   if (pipe == NCI_HCI_INVALID_PIPE)
   ^~~~
   net/nfc/nci/hci.c:610:2: note: Taking false branch
   if (pipe == NCI_HCI_INVALID_PIPE)
   ^
   net/nfc/nci/hci.c:614:6: note: Assuming 'conn_info' is non-null
   if (!conn_info)
   ^~
   net/nfc/nci/hci.c:614:2: note: Taking false branch
   if (!conn_info)
   ^
   net/nfc/nci/hci.c:627:6: note: Assuming 'r' is not equal to NCI_STATUS_OK
   if (r == NCI_STATUS_OK) {
   ^~
   net/nfc/nci/hci.c:627:2: note: Taking false branch
   

[kbuild] [linux-stable-rc:linux-5.10.y 7449/9999] arch/x86/kernel/head_64.o: warning: objtool: .text+0x5: unreachable instruction

2022-03-16 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: Peter Zijlstra 
CC: "Greg Kroah-Hartman" 
CC: Juergen Gross 
CC: Miroslav Benes 
CC: Sasha Levin 

tree:   
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git 
linux-5.10.y
head:   1ef0e2b3149031c288a85198919cc1778754e515
commit: b36ab509e1817e60f73ce297494f0de1b7ed2c08 [7449/] x86/xen: Mark 
cpu_bringup_and_idle() as dead_end_function
:: branch date: 3 days ago
:: commit date: 4 months ago
config: x86_64-randconfig-c007-20220307 
(https://download.01.org/0day-ci/archive/20220317/202203170750.vieiiafh-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git/commit/?id=b36ab509e1817e60f73ce297494f0de1b7ed2c08
git remote add linux-stable-rc 
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-5.10.y
git checkout b36ab509e1817e60f73ce297494f0de1b7ed2c08
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 

All warnings (new ones prefixed by >>):

>> arch/x86/kernel/head_64.o: warning: objtool: .text+0x5: unreachable 
>> instruction

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


[kbuild] Re: [PATCH RFC v5 08/21] dept: Apply Dept to seqlock

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
In-Reply-To: <1647397593-16747-9-git-send-email-byungchul.p...@lge.com>
References: <1647397593-16747-9-git-send-email-byungchul.p...@lge.com>
TO: Byungchul Park 

Hi Byungchul,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linux/master]
[also build test WARNING on linus/master v5.17-rc8]
[cannot apply to tip/locking/core tip/sched/core hnaz-mm/master next-20220316]
[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/Byungchul-Park/DEPT-Dependency-Tracker/20220316-102853
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
2c271fe77d52a0555161926c232cd5bc07178b39
:: branch date: 21 hours ago
:: commit date: 21 hours ago
config: x86_64-randconfig-m001-20220314 
(https://download.01.org/0day-ci/archive/20220317/202203170758.2sbllrrf-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
arch/x86/kvm/x86.c:2129 update_pvclock_gtod() warn: statement has no effect 31

Old smatch warnings:
arch/x86/kvm/x86.c:2845 kvm_end_pvclock_update() warn: statement has no effect 
31
arch/x86/kvm/x86.c:5066 kvm_arch_tsc_set_attr() warn: check for integer 
overflow 'offset'
arch/x86/kvm/x86.c:5107 kvm_vcpu_ioctl_device_attr() error: uninitialized 
symbol 'r'.

vim +2129 arch/x86/kvm/x86.c

16e8d74d2da992 Marcelo Tosatti 2012-11-27  2101  
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2102  static void 
update_pvclock_gtod(struct timekeeper *tk)
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2103  {
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2104 struct 
pvclock_gtod_data *vdata = &pvclock_gtod_data;
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2105  
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2106 
write_seqcount_begin(&vdata->seq);
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2107  
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2108 /* copy pvclock gtod 
data */
b95a8a27c300d1 Thomas Gleixner 2020-02-07  2109 
vdata->clock.vclock_mode= tk->tkr_mono.clock->vdso_clock_mode;
876e78818def29 Peter Zijlstra  2015-03-19  2110 vdata->clock.cycle_last 
= tk->tkr_mono.cycle_last;
876e78818def29 Peter Zijlstra  2015-03-19  2111 vdata->clock.mask   
= tk->tkr_mono.mask;
876e78818def29 Peter Zijlstra  2015-03-19  2112 vdata->clock.mult   
= tk->tkr_mono.mult;
876e78818def29 Peter Zijlstra  2015-03-19  2113 vdata->clock.shift  
= tk->tkr_mono.shift;
917f9475c0a8ab Paolo Bonzini   2020-01-22  2114 
vdata->clock.base_cycles= tk->tkr_mono.xtime_nsec;
917f9475c0a8ab Paolo Bonzini   2020-01-22  2115 vdata->clock.offset 
= tk->tkr_mono.base;
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2116  
b95a8a27c300d1 Thomas Gleixner 2020-02-07  2117 
vdata->raw_clock.vclock_mode= tk->tkr_raw.clock->vdso_clock_mode;
53fafdbb8b21fa Marcelo Tosatti 2019-10-28  2118 
vdata->raw_clock.cycle_last = tk->tkr_raw.cycle_last;
53fafdbb8b21fa Marcelo Tosatti 2019-10-28  2119 vdata->raw_clock.mask   
= tk->tkr_raw.mask;
53fafdbb8b21fa Marcelo Tosatti 2019-10-28  2120 vdata->raw_clock.mult   
= tk->tkr_raw.mult;
53fafdbb8b21fa Marcelo Tosatti 2019-10-28  2121 vdata->raw_clock.shift  
= tk->tkr_raw.shift;
917f9475c0a8ab Paolo Bonzini   2020-01-22  2122 
vdata->raw_clock.base_cycles= tk->tkr_raw.xtime_nsec;
917f9475c0a8ab Paolo Bonzini   2020-01-22  2123 vdata->raw_clock.offset 
= tk->tkr_raw.base;
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2124  
55dd00a73a5182 Marcelo Tosatti 2017-01-24  2125 vdata->wall_time_sec
= tk->xtime_sec;
55dd00a73a5182 Marcelo Tosatti 2017-01-24  2126  
917f9475c0a8ab Paolo Bonzini   2020-01-22  2127 vdata->offs_boot
= tk->offs_boot;
53fafdbb8b21fa Marcelo Tosatti 2019-10-28  2128  
16e8d74d2da992 Marcelo Tosatti 2012-11-27 @2129 
write_seqcount_end(&vdata->seq);
16e8d74d2da992 Marcelo Tosatti 2012-11-27  2130  }
8171cd68806bd2 Paolo Bonzini   2020-01-22  2131  

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


[kbuild] drivers/of/property.c:1445:22: warning: Value stored to 'con_np' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

2022-03-16 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: Saravana Kannan 
CC: Rob Herring 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: 4a48b66b3f52aa1a8aaa8a8863891eed35769731 of: property: Disable 
fw_devlink DT support for X86
date:   6 months ago
:: branch date: 30 hours ago
:: commit date: 6 months ago
config: x86_64-randconfig-c007-20220307 
(https://download.01.org/0day-ci/archive/20220317/202203170654.gtyhhgdu-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4a48b66b3f52aa1a8aaa8a8863891eed35769731
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 4a48b66b3f52aa1a8aaa8a8863891eed35769731
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


clang-analyzer warnings: (new ones prefixed by >>)
   drivers/net/ethernet/intel/e1000/e1000_hw.c:4234:7: note: Calling 
'e1000_read_eeprom'
   if (e1000_read_eeprom(hw, offset, 1, &eeprom_data) < 0) {
   ^~
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3854:8: note: Calling 
'e1000_do_read_eeprom'
   ret = e1000_do_read_eeprom(hw, offset, words, data);
 ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3865:6: note: Assuming field 
'mac_type' is not equal to e1000_ce4100
   if (hw->mac_type == e1000_ce4100) {
   ^~~~
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3865:2: note: Taking false branch
   if (hw->mac_type == e1000_ce4100) {
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3874:7: note: Assuming 'offset' 
is < field 'word_size'
   if ((offset >= eeprom->word_size) ||
^~~
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3874:6: note: Left side of '||' 
is false
   if ((offset >= eeprom->word_size) ||
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3874:6: note: Left side of '||' 
is false
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3876:7: note: 'words' is not 
equal to 0
   (words == 0)) {
^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3874:2: note: Taking false branch
   if ((offset >= eeprom->word_size) ||
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3887:6: note: Assuming the 
condition is false
   if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3887:2: note: Taking false branch
   if (e1000_acquire_eeprom(hw) != E1000_SUCCESS)
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3893:6: note: Assuming field 
'type' is not equal to e1000_eeprom_spi
   if (eeprom->type == e1000_eeprom_spi) {
   ^~~~
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3893:2: note: Taking false branch
   if (eeprom->type == e1000_eeprom_spi) {
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3926:13: note: Assuming field 
'type' is not equal to e1000_eeprom_microwire
   } else if (eeprom->type == e1000_eeprom_microwire) {
  ^~
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3926:9: note: Taking false branch
   } else if (eeprom->type == e1000_eeprom_microwire) {
  ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3947:2: note: Returning without 
writing to '*data'
   return E1000_SUCCESS;
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3854:8: note: Returning from 
'e1000_do_read_eeprom'
   ret = e1000_do_read_eeprom(hw, offset, words, data);
 ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:3856:2: note: Returning without 
writing to '*data'
   return ret;
   ^
   drivers/net/ethernet/intel/e1000/e1000_hw.c:4234:7: note: Returning from 
'e1000_read_eeprom'
   if (e1000_read_eeprom(hw, offset, 1, &eeprom_data) < 0) {
   ^~
   drivers/net/ethernet/intel/e1000/e1000_hw.c:4234:3: note: Taking fals

[kbuild] fs/ntfs3/ntfs_fs.h:1004:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Konstantin Komarov 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: 6e5be40d32fb1907285277c02e74493ed43d77fe fs/ntfs3: Add NTFS3 in 
fs/Kconfig and fs/Makefile
date:   7 months ago
:: branch date: 29 hours ago
:: commit date: 7 months ago
compiler: arc-elf-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)

   In file included from fs/ntfs3/fsntfs.c:
>> fs/ntfs3/ntfs_fs.h:1004:2: warning: Non-boolean value returned from function 
>> returning bool [returnNonBoolInBooleanFunction]
return ni->ni_flags & NI_FLAG_DEDUPLICATED;
^
>> fs/ntfs3/fsntfs.c:1289:2: warning: Possible null pointer dereference: nb 
>> [nullPointer]
nb->nbufs = 0;
^
   fs/ntfs3/fsntfs.c:2049:31: note: Calling function 'ntfs_read_run_nb', 6th 
argument 'NULL' value is 0
 sizeof(d_security), NULL);
 ^
   fs/ntfs3/fsntfs.c:1289:2: note: Null pointer dereference
nb->nbufs = 0;
^

vim +1004 fs/ntfs3/ntfs_fs.h

4534a70b7056fd4 Konstantin Komarov 2021-08-13  1001  
4534a70b7056fd4 Konstantin Komarov 2021-08-13  1002  static inline bool 
is_dedup(const struct ntfs_inode *ni)
4534a70b7056fd4 Konstantin Komarov 2021-08-13  1003  {
4534a70b7056fd4 Konstantin Komarov 2021-08-13 @1004 return ni->ni_flags & 
NI_FLAG_DEDUPLICATED;
4534a70b7056fd4 Konstantin Komarov 2021-08-13  1005  }
4534a70b7056fd4 Konstantin Komarov 2021-08-13  1006  

:: The code at line 1004 was first introduced by commit
:: 4534a70b7056fd4b9a1c6db5a4ce3c98546b291e fs/ntfs3: Add headers and misc 
files

:: TO: Konstantin Komarov 
:: CC: Konstantin Komarov 

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


[kbuild] Re: [PATCH] kunit: split resource API from test.h into new resource.h

2022-03-16 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
In-Reply-To: <20220316024432.1454366-1-dlaty...@google.com>
References: <20220316024432.1454366-1-dlaty...@google.com>
TO: Daniel Latypov 
TO: brendanhigg...@google.com
TO: david...@google.com
CC: linux-ker...@vger.kernel.org
CC: kunit-...@googlegroups.com
CC: linux-kselft...@vger.kernel.org
CC: sk...@linuxfoundation.org
CC: Daniel Latypov 

Hi Daniel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on 09688c0166e76ce2fb85e86b9d99be8b0084cdf9]

url:
https://github.com/0day-ci/linux/commits/Daniel-Latypov/kunit-split-resource-API-from-test-h-into-new-resource-h/20220316-104559
base:   09688c0166e76ce2fb85e86b9d99be8b0084cdf9
:: branch date: 19 hours ago
:: commit date: 19 hours ago
config: arm-randconfig-c002-20220313 
(https://download.01.org/0day-ci/archive/20220317/202203170501.ccagiyt2-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb)
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/132662b59a0f2d3d7b21c94ff6829725a6b606f5
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review 
Daniel-Latypov/kunit-split-resource-API-from-test-h-into-new-resource-h/20220316-104559
git checkout 132662b59a0f2d3d7b21c94ff6829725a6b606f5
# 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 >>)
   kernel/rcu/rcuscale.c:453:7: note: Left side of '&&' is true
   if (!started &&
   ^
   kernel/rcu/rcuscale.c:454:7: note: Assuming the condition is false
   atomic_read(&n_rcu_scale_writer_started) >= nrealwriters)
   ^~~~
   kernel/rcu/rcuscale.c:453:3: note: Taking false branch
   if (!started &&
   ^
   kernel/rcu/rcuscale.c:456:8: note: 'done' is false
   if (!done && i >= MIN_MEAS) {
^~~~
   kernel/rcu/rcuscale.c:456:7: note: Left side of '&&' is true
   if (!done && i >= MIN_MEAS) {
   ^
   kernel/rcu/rcuscale.c:456:16: note: 'i' is < MIN_MEAS
   if (!done && i >= MIN_MEAS) {
^
   kernel/rcu/rcuscale.c:456:3: note: Taking false branch
   if (!done && i >= MIN_MEAS) {
   ^
   kernel/rcu/rcuscale.c:480:7: note: 'done' is false
   if (done && !alldone &&
   ^~~~
   kernel/rcu/rcuscale.c:480:12: note: Left side of '&&' is false
   if (done && !alldone &&
^
   kernel/rcu/rcuscale.c:483:7: note: 'started' is false
   if (started && !alldone && i < MAX_MEAS - 1)
   ^~~
   kernel/rcu/rcuscale.c:483:15: note: Left side of '&&' is false
   if (started && !alldone && i < MAX_MEAS - 1)
   ^
   kernel/rcu/rcuscale.c:486:11: note: Assuming the condition is true
   } while (!torture_must_stop());
^~~~
   kernel/rcu/rcuscale.c:426:2: note: Loop condition is true. Execution 
continues on line 427
   do {
   ^
   kernel/rcu/rcuscale.c:427:7: note: Assuming 'writer_holdoff' is 0
   if (writer_holdoff)
   ^~
   kernel/rcu/rcuscale.c:427:3: note: Taking false branch
   if (writer_holdoff)
   ^
   kernel/rcu/rcuscale.c:431:7: note: Assuming 'gp_async' is true
   if (gp_async) {
   ^~~~
   kernel/rcu/rcuscale.c:431:3: note: Taking true branch
   if (gp_async) {
   ^
   kernel/rcu/rcuscale.c:433:9: note: 'rhp' is non-null
   if (!rhp)
^~~
   kernel/rcu/rcuscale.c:433:4: note: Taking false branch
   if (!rhp)
   ^
   kernel/rcu/rcuscale.c:435:8: note: 'rhp' is non-null
   

[kbuild] drivers/of/irq.c:567:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]

2022-03-16 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: Rasmus Villemoes 
CC: Miguel Ojeda 
CC: Nick Desaulniers 
CC: Andrew Morton 
CC: Linux Memory Management List 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: e1edc277e6f6dfb372216522dfc57f9381c39e35 linux/container_of.h: switch 
to static_assert
date:   4 months ago
:: branch date: 27 hours ago
:: commit date: 4 months ago
config: arm-randconfig-c002-20220308 
(https://download.01.org/0day-ci/archive/20220317/202203170319.8yvxwj4d-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install 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=e1edc277e6f6dfb372216522dfc57f9381c39e35
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e1edc277e6f6dfb372216522dfc57f9381c39e35
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 


clang-analyzer warnings: (new ones prefixed by >>)
   ^
   include/linux/printk.h:489:2: note: expanded from macro 'pr_err'
   printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
   ^
   include/linux/printk.h:446:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^
   include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap'
   __printk_index_emit(_fmt, NULL, NULL);  \
   ^
   include/linux/printk.h:370:7: note: expanded from macro '__printk_index_emit'
   if (__builtin_constant_p(_fmt) && 
__builtin_constant_p(_level)) { \
   ^
   drivers/of/irq.c:559:4: note: Taking true branch
   pr_err("of_irq_init: children remain, but no 
parents\n");
   ^
   include/linux/printk.h:489:2: note: expanded from macro 'pr_err'
   printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
   ^
   include/linux/printk.h:446:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^
   include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap'
   __printk_index_emit(_fmt, NULL, NULL);  \
   ^
   include/linux/printk.h:370:3: note: expanded from macro '__printk_index_emit'
   if (__builtin_constant_p(_fmt) && 
__builtin_constant_p(_level)) { \
   ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
 ^
   drivers/of/irq.c:559:4: note: '?' condition is true
   pr_err("of_irq_init: children remain, but no 
parents\n");
   ^
   include/linux/printk.h:489:2: note: expanded from macro 'pr_err'
   printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
   ^
   include/linux/printk.h:446:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^
   include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap'
   __printk_index_emit(_fmt, NULL, NULL);  \
   ^
   include/linux/printk.h:379:12: note: expanded from macro 
'__printk_index_emit'
   .fmt = __builtin_constant_p(_fmt) ? (_fmt) : 
NULL, \
  ^
   drivers/of/irq.c:559:4: note: '?' condition is true
   pr_err("of_irq_init: children remain, but no 
parents\n");
   ^
   include/linux/printk.h:489:2: note: expanded from macro 'pr_err'
   printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
   ^
   include/linux/printk.h:446:26: note: expanded from macro 'printk'
   #define printk(fmt, ...) printk_index_wrap(_printk, fmt, ##__VA_ARGS__)
^
   include/linux/printk.h:417:3: note: expanded from macro 'printk_index_wrap'
   __printk_index_emit(_fmt, NULL, NULL);  \
   ^
   include/linux/printk.h:383:14: note: expanded from ma

[kbuild] [kdave-btrfs-devel:for-next 147/195] fs/btrfs/inode.c:11309:21: warning: Value stored to 'root' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

2022-03-16 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: Filipe Manana 
CC: David Sterba 

tree:   https://github.com/kdave/btrfs-devel.git for-next
head:   274c7b59fbd77edddc488f5f408f432ca96fd390
commit: 9cf32bee81e4ad916e47326464234b265da3028b [147/195] btrfs: add and use 
helper to assert an inode range is clean
:: branch date: 26 hours ago
:: commit date: 28 hours ago
config: riscv-randconfig-c006-20220313 
(https://download.01.org/0day-ci/archive/20220317/202203170346.hztszyrv-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
a6ec1e3d798f8eab43fb3a91028c6ab04e115fcb)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://github.com/kdave/btrfs-devel/commit/9cf32bee81e4ad916e47326464234b265da3028b
git remote add kdave-btrfs-devel 
https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel for-next
git checkout 9cf32bee81e4ad916e47326464234b265da3028b
# 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 >>)
   ^
   include/asm-generic/bitops/non-atomic.h:120:18: note: expanded from macro 
'test_bit'
   #define test_bit arch_test_bit
^
   fs/btrfs/inode.c:10576:2: note: Taking false branch
   if (em->block_start == EXTENT_MAP_HOLE ||
   ^
   fs/btrfs/inode.c:10582:13: note: Assuming the condition is true
   } else if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
  ^
   include/asm-generic/bitops/non-atomic.h:120:18: note: expanded from macro 
'test_bit'
   #define test_bit arch_test_bit
^
   fs/btrfs/inode.c:10582:9: note: Taking true branch
   } else if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags)) {
  ^
   fs/btrfs/inode.c:10588:7: note: Assuming 'count' is >= field 'block_len'
   if (em->block_len > count) {
   ^
   fs/btrfs/inode.c:10588:3: note: Taking false branch
   if (em->block_len > count) {
   ^
   fs/btrfs/inode.c:10597:7: note: 'ret' is >= 0
   if (ret < 0)
   ^~~
   fs/btrfs/inode.c:10597:3: note: Taking false branch
   if (ret < 0)
   ^
   fs/btrfs/inode.c:10617:2: note: Taking false branch
   if (disk_bytenr == EXTENT_MAP_HOLE) {
   ^
   fs/btrfs/inode.c:10625:9: note: Calling 'btrfs_encoded_read_regular'
   ret = btrfs_encoded_read_regular(iocb, iter, start, lockend,
 ^~
   fs/btrfs/inode.c:10454:6: note: Assuming 'pages' is non-null
   if (!pages)
   ^~
   fs/btrfs/inode.c:10454:2: note: Taking false branch
   if (!pages)
   ^
   fs/btrfs/inode.c:10456:14: note: Assuming 'i' is >= 'nr_pages'
   for (i = 0; i < nr_pages; i++) {
   ^~~~
   fs/btrfs/inode.c:10456:2: note: Loop condition is false. Execution continues 
on line 10464
   for (i = 0; i < nr_pages; i++) {
   ^
   fs/btrfs/inode.c:10464:8: note: Calling 
'btrfs_encoded_read_regular_fill_pages'
   ret = btrfs_encoded_read_regular_fill_pages(inode, start, 
disk_bytenr,
 
^~~~
   fs/btrfs/inode.c:10372:2: note: Loop condition is false.  Exiting loop
   init_waitqueue_head(&priv.wait);
   ^
   include/linux/wait.h:67:2: note: expanded from macro 'init_waitqueue_head'
   do { 
   \
   ^
   fs/btrfs/inode.c:10377:9: note: Assuming 'cur' is < 'disk_io_size'
   while (cur < disk_io_size) {
  ^~
   fs/btrfs/inode.c:10377:2: note: Loop condition is true.  Entering loop body
   while (cur < disk_io_size) {
   ^
   fs/btrfs/inode.c:10385:7: note: Calling 'IS_ERR'
   if (IS_ERR(em)) {
   ^~
   include/linux/err.h:36:9: note: Assuming the condition is true
   return IS_ERR_VALUE((unsigned long)ptr);
  ^
   include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
   #define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned 
long)-MAX_ERRNO)
   
~^~~~

[kbuild] [linusw-pinctrl:devel 44/71] drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c:1562:26: warning: Value stored to 'npcm' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

2022-03-16 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-g...@vger.kernel.org
TO: "Jonathan Neuschäfer" 
CC: Linus Walleij 

tree:   
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
head:   89388f8730699c259f8090ec435fb43569efe4ac
commit: a1d1e0e3d80a870cc37a6c064994b89e963d2b58 [44/71] pinctrl: nuvoton: Add 
driver for WPCM450
:: branch date: 2 days ago
:: commit date: 2 days ago
config: riscv-randconfig-c006-20220313 
(https://download.01.org/0day-ci/archive/20220317/202203170101.edmxwknf-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
a6b2f50fb47da3baeee10b1906da6e30ac5d26ec)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git/commit/?id=a1d1e0e3d80a870cc37a6c064994b89e963d2b58
git remote add linusw-pinctrl 
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git
git fetch --no-tags linusw-pinctrl devel
git checkout a1d1e0e3d80a870cc37a6c064994b89e963d2b58
# save the config file to linux build tree
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 >>)
   ^
   lib/mpi/mpi-pow.c:71:6: note: Assuming 'mp' is non-null
   if (!mp)
   ^~~
   lib/mpi/mpi-pow.c:71:2: note: Taking false branch
   if (!mp)
   ^
   lib/mpi/mpi-pow.c:74:6: note: 'mod_shift_cnt' is 64
   if (mod_shift_cnt)
   ^
   lib/mpi/mpi-pow.c:74:2: note: Taking true branch
   if (mod_shift_cnt)
   ^
   lib/mpi/mpi-pow.c:81:6: note: Assuming 'bsize' is <= 'msize'
   if (bsize > msize) {/* The base is larger than the module. 
Reduce it. */
   ^
   lib/mpi/mpi-pow.c:81:2: note: Taking false branch
   if (bsize > msize) {/* The base is larger than the module. 
Reduce it. */
   ^
   lib/mpi/mpi-pow.c:98:6: note: Assuming 'bsize' is not equal to 0
   if (!bsize) {
   ^~
   lib/mpi/mpi-pow.c:98:2: note: Taking false branch
   if (!bsize) {
   ^
   lib/mpi/mpi-pow.c:104:6: note: Assuming 'size' is <= field 'alloced'
   if (res->alloced < size) {
   ^~~
   lib/mpi/mpi-pow.c:104:2: note: Taking false branch
   if (res->alloced < size) {
   ^
   lib/mpi/mpi-pow.c:119:7: note: Assuming 'rp' is not equal to 'bp'
   if (rp == bp) {
   ^~~~
   lib/mpi/mpi-pow.c:119:3: note: Taking false branch
   if (rp == bp) {
   ^
   lib/mpi/mpi-pow.c:127:7: note: Assuming 'rp' is not equal to 'ep'
   if (rp == ep) {
   ^~~~
   lib/mpi/mpi-pow.c:127:3: note: Taking false branch
   if (rp == ep) {
   ^
   lib/mpi/mpi-pow.c:134:7: note: Assuming 'rp' is not equal to 'mp'
   if (rp == mp) {
   ^~~~
   lib/mpi/mpi-pow.c:134:3: note: Taking false branch
   if (rp == mp) {
   ^
   lib/mpi/mpi-pow.c:144:2: note: Assuming '_i' is >= 'bsize'
   MPN_COPY(rp, bp, bsize);
   ^
   lib/mpi/mpi-internal.h:65:16: note: expanded from macro 'MPN_COPY'
   for (_i = 0; _i < (n); _i++)\
^~~~
   lib/mpi/mpi-pow.c:144:2: note: Loop condition is false. Execution continues 
on line 144
   MPN_COPY(rp, bp, bsize);
   ^
   lib/mpi/mpi-internal.h:65:3: note: expanded from macro 'MPN_COPY'
   for (_i = 0; _i < (n); _i++)\
   ^
   lib/mpi/mpi-pow.c:144:2: note: Loop condition is false.  Exiting loop
   MPN_COPY(rp, bp, bsize);
   ^
   lib/mpi/mpi-internal.h:63:2: note: expanded from macro 'MPN_COPY'
   do {\
   ^
   lib/mpi/mpi-pow.c:156:7: note: Assuming 'xp' is non-null
   if (!xp)
   ^~~
   lib/mpi/mpi-pow.c:156:3: note: Taking false branch
   if (!xp)
   ^
   lib/mpi/mpi-pow.c:159:22: note: Assuming the condition is false
   negative_result = (ep[0] & 1) && base->sign;
  ^
   lib/mpi/mpi-pow.c:159:33: note: Left side of '&&' is false
   negative_result = (ep[0] & 1) && base->sign;
 ^
   lib/mpi/mpi-pow.c:163:7: note: C

[kbuild] drivers/usb/storage/realtek_cr.c:264:20-21: WARNING opportunity for min()

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Denis Efremov 
CC: Julia Lawall 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax 
script
date:   11 months ago
:: branch date: 24 hours ago
:: commit date: 11 months ago
config: i386-randconfig-c021-20220314 
(https://download.01.org/0day-ci/archive/20220317/202203170021.merex2xn-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Julia Lawall 


cocci warnings: (new ones prefixed by >>)
>> drivers/usb/storage/realtek_cr.c:264:20-21: WARNING opportunity for min()

Please review and possibly fold the followup patch.

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


[kbuild] [PATCH] coccinelle: misc: fix minmax.cocci warnings

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Denis Efremov 
CC: Julia Lawall 
CC: Alan Stern 
CC: "Greg Kroah-Hartman" 
CC: linux-...@vger.kernel.org
CC: usb-stor...@lists.one-eyed-alien.net
CC: linux-ker...@vger.kernel.org

From: kernel test robot 

drivers/usb/storage/realtek_cr.c:264:20-21: WARNING opportunity for min()


 Check for opencoded min(), max() implementations.
 Generated patches sometimes require adding a cast to fix compile warning.
 Warnings/patches scope intentionally limited to a function body.

Generated by: scripts/coccinelle/misc/minmax.cocci

CC: Denis Efremov 
Reported-by: kernel test robot 
Signed-off-by: kernel test robot 
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: 5f66f73b9ff4dcabd4e2405ba9c32e80e02f9408 coccinelle: misc: add minmax 
script
:: branch date: 24 hours ago
:: commit date: 11 months ago

Please take the patch only if it's a positive warning. Thanks!

 drivers/usb/storage/realtek_cr.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/storage/realtek_cr.c
+++ b/drivers/usb/storage/realtek_cr.c
@@ -261,7 +261,7 @@ static int rts51x_bulk_transport(struct
 * was really transferred and what the device tells us
 */
if (residue)
-   residue = residue < buf_len ? residue : buf_len;
+   residue = min(residue, buf_len);
 
if (act_len)
*act_len = buf_len - residue;
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] [intel-tdx:guest-rebased 120/129] drivers/acpi/svkl.c:164 acpi_svkl_init() warn: '&acpi_svkl_dev' not released on lines: 157.

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: Kuppuswamy Sathyanarayanan 
CC: "Kirill A. Shutemov" 

tree:   https://github.com/intel/tdx.git guest-rebased
head:   6d6cab7288e23cfe0084bd1c214e3649146eb159
commit: 370c68664d53ff13dbd36847e140df02364387a5 [120/129] ACPI: Add SVKL table 
support
:: branch date: 2 days ago
:: commit date: 6 weeks ago
config: x86_64-randconfig-m001-20220314 
(https://download.01.org/0day-ci/archive/20220316/202203162327.0mhkaqed-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/acpi/svkl.c:164 acpi_svkl_init() warn: '&acpi_svkl_dev' not released on 
lines: 157.

vim +164 drivers/acpi/svkl.c

370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  139  
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  140  static int __init 
acpi_svkl_init(void)
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  141  {
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  142   acpi_status 
status = AE_OK;
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  143   int ret;
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  144  
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  145   ret = 
misc_register(&acpi_svkl_dev);
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  146   if (ret) {
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  147   
pr_err("SVKL: can't misc_register on minor=%d\n",
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  148  
MISC_DYNAMIC_MINOR);
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  149   return 
ret;
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  150   }
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  151  
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  152   
mutex_init(&svkl_lock);
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  153  
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  154   status = 
acpi_get_table(ACPI_SIG_SVKL, 0, &svkl_tbl_hdr);
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  155   if 
(ACPI_FAILURE(status) || !svkl_tbl_hdr) {
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  156   
pr_err("get table failed\n");
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  157   return 
-ENODEV;
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  158   }
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  159  
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  160   
dump_svkl_header();
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  161  
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  162   pr_info("ACPI: 
SVKL module loaded\n");
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  163  
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19 @164   return 0;
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  165  }
370c68664d53ff Kuppuswamy Sathyanarayanan 2020-06-19  166  

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


[kbuild] [willy-pagecache:for-next 174/179] fs/nilfs2/inode.c:232 nilfs_dirty_folio() error: uninitialized symbol 'nr_dirty'.

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: linux-ker...@vger.kernel.org
TO: "Matthew Wilcox (Oracle)" 

tree:   git://git.infradead.org/users/willy/pagecache for-next
head:   223ab4ed54499645015108bfbb3055e0f8c64613
commit: c5abb86e384b80b5b320c73668066e67142c706e [174/179] nilfs: Convert 
nilfs_set_page_dirty() to nilfs_dirty_folio()
:: branch date: 26 hours ago
:: commit date: 26 hours ago
config: x86_64-randconfig-m001-20220314 
(https://download.01.org/0day-ci/archive/20220316/202203162210.u0o3mmi4-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
fs/nilfs2/inode.c:232 nilfs_dirty_folio() error: uninitialized symbol 
'nr_dirty'.

Old smatch warnings:
fs/nilfs2/inode.c:1084 nilfs_fiemap() warn: should 'n << blkbits' be a 64 bit 
type?
fs/nilfs2/inode.c:1097 nilfs_fiemap() warn: should 'n << blkbits' be a 64 bit 
type?
fs/nilfs2/inode.c:1104 nilfs_fiemap() warn: should 'n << blkbits' be a 64 bit 
type?

vim +/nr_dirty +232 fs/nilfs2/inode.c

05fe58fdc10df9e Ryusuke Konishi 2009-04-06  201  
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  202) static bool 
nilfs_dirty_folio(struct address_space *mapping,
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  203)struct 
folio *folio)
05fe58fdc10df9e Ryusuke Konishi 2009-04-06  204  {
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  205)struct inode 
*inode = mapping->host;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  206)struct 
buffer_head *head;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  207)unsigned int 
nr_dirty;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  208)bool ret = 
filemap_dirty_folio(mapping, folio);
05fe58fdc10df9e Ryusuke Konishi 2009-04-06  209  
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  210 /*
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  211) * The page may 
not be locked, eg if called from try_to_unmap_one()
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  212  */
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  213)
spin_lock(&mapping->private_lock);
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  214)head = 
folio_buffers(folio);
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  215)if (head) {
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  216)struct 
buffer_head *bh = head;
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  217) 
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  218)
nr_dirty = 0;
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  219 do {
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  220 
/* Do not mark hole blocks dirty */
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  221 
if (buffer_dirty(bh) || !buffer_mapped(bh))
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  222 
continue;
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  223  
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  224 
set_buffer_dirty(bh);
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  225 
nr_dirty++;
136e8770cd5d1fe Ryusuke Konishi 2013-05-24  226 } while 
(bh = bh->b_this_page, bh != head);
56d7acc792c0d98 Andreas Rohner  2014-09-25  227 } else if (ret) 
{
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  228)
nr_dirty = 1 << (PAGE_SHIFT - inode->i_blkbits);
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  229)}
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09  230)
spin_unlock(&mapping->private_lock);
56d7acc792c0d98 Andreas Rohner  2014-09-25  231  
c5abb86e384b80b Matthew Wilcox (Oracle  2022-02-09 @232)if (nr_dirty)
bcbc8c648d6cc88 Ryusuke Konishi 2010-12-27  233 
nilfs_set_file_dirty(inode, nr_dirty);
05fe58fdc10df9e Ryusuke Konishi 2009-04-06  234 return ret;
05fe58fdc10df9e Ryusuke Konishi 2009-04-06  235  }
05fe58fdc10df9e Ryusuke Konishi 2009-04-06  236  

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


[kbuild] drivers/media/i2c/hi846.c:1494:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

2022-03-16 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: Martin Kepplinger 
CC: Mauro Carvalho Chehab 
CC: linux-me...@vger.kernel.org
CC: Pavel Machek 
CC: Sakari Ailus 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: e8c0882685f9152f0d729664a12bcbe749cb7736 media: i2c: add driver for the 
SK Hynix Hi-846 8M pixel camera
date:   5 months ago
:: branch date: 21 hours ago
:: commit date: 5 months ago
config: riscv-randconfig-c006-20220307 
(https://download.01.org/0day-ci/archive/20220316/202203162216.ysr2mny0-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
d271fc04d5b97b12e6b797c6067d3c96a8d7470e)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e8c0882685f9152f0d729664a12bcbe749cb7736
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e8c0882685f9152f0d729664a12bcbe749cb7736
# 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 >>)
   ^   ~
   fs/xfs/xfs_icache.c:746:2: note: Value stored to 'error' is never read
   error = 0;
   ^   ~
   fs/xfs/xfs_icache.c:1667:2: warning: Value stored to 'nr_found' is never 
read [clang-analyzer-deadcode.DeadStores]
   nr_found = 0;
   ^  ~
   fs/xfs/xfs_icache.c:1667:2: note: Value stored to 'nr_found' is never read
   nr_found = 0;
   ^  ~
   Suppressed 10 warnings (9 in non-user code, 1 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 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.
   Suppressed 9 warnings (9 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.
   Suppressed 9 warnings (9 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.
   Suppressed 9 warnings (9 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.
   Suppressed 9 warnings (9 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.
   12 warnings generated.
   Suppressed 12 warnings (9 in non-user code, 3 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (9 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.
   Suppressed 9 warnings (9 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.
   Suppressed 9 warnings (9 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.
   Suppressed 9 warnings (9 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   10 warnings generated.
   Suppressed 10 warnings (10 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.
   17 warnings generated.
   drivers/media/pci/saa7164/saa7164-encoder.c:597:2: warning: Value stored to 
'ret' is never read [clang-analyzer-deadcode.DeadStores]
   ret = saa7164_encoder_pause_port(port);
   ^ ~~~

[kbuild] drivers/perf/arm_smmuv3_pmu.c:349:17: warning: Value stored to 'dev' during its initialization is never read [clang-analyzer-deadcode.DeadStores]

2022-03-16 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: John Garry 
CC: Will Deacon 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   56e337f2cf1326323844927a04e9dbce9a244835
commit: e656972b69864348a747954ea187576808000c5a drivers/perf: Improve build 
test coverage
date:   5 months ago
:: branch date: 21 hours ago
:: commit date: 5 months ago
config: riscv-randconfig-c006-20220313 
(https://download.01.org/0day-ci/archive/20220316/202203162129.qyctdjxt-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
43f668b98e8d87290fc6bbf5ed13c3ab542e3497)
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=e656972b69864348a747954ea187576808000c5a
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout e656972b69864348a747954ea187576808000c5a
# 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 >>)
   fs/xfs/xfs_sysfs.c:633:25: note: Passing value via 1st parameter 'kobj'
   error = xfs_sysfs_init(&mp->m_error_kobj, &xfs_error_ktype,
  ^
   fs/xfs/xfs_sysfs.c:633:10: note: Calling 'xfs_sysfs_init'
   error = xfs_sysfs_init(&mp->m_error_kobj, &xfs_error_ktype,
   ^~~
   fs/xfs/xfs_sysfs.h:37:11: note: Assuming 'parent_kobj' is null
   parent = parent_kobj ? &parent_kobj->kobject : NULL;
^~~
   fs/xfs/xfs_sysfs.h:37:11: note: '?' condition is false
   fs/xfs/xfs_sysfs.h:38:18: note: Passing value via 1st parameter 'x'
   init_completion(&kobj->complete);
   ^~~
   fs/xfs/xfs_sysfs.h:38:2: note: Calling 'init_completion'
   init_completion(&kobj->complete);
   ^~~~
   include/linux/completion.h:86:10: note: Access to field 'done' results in a 
dereference of a null pointer (loaded from variable 'x')
   x->done = 0;
   ~   ^
   Suppressed 9 warnings (2 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (2 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (2 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   9 warnings generated.
   Suppressed 9 warnings (2 in non-user code, 7 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   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.
   crypto/pcbc.c:74:10: warning: Although the value stored to 'nbytes' is used 
in the enclosing expression, the value is never actually read from 'nbytes' 
[clang-analyzer-deadcode.DeadStores]
   while ((nbytes = walk.nbytes)) {
   ^~~~
   crypto/pcbc.c:74:10: note: Although the value stored to 'nbytes' is used in 
the enclosing expression, the value is never actually read from 'nbytes'
   while ((nbytes = walk.nbytes)) {
   ^~~~
 

[kbuild] [osandov:btrfs-send-encoded 5/7] fs/btrfs/send.c:7705 btrfs_ioctl_send() error: we previously assumed 'sctx->send_buf_pages' could be null (see line 7492)

2022-03-16 Thread kernel test robot
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: Omar Sandoval 
CC: linux-ker...@vger.kernel.org
TO: Omar Sandoval 
CC: Nikolay Borisov 

tree:   https://github.com/osandov/linux.git btrfs-send-encoded
head:   5b9ba5f160f0ee412cf4d94f8e15b54b1ba04758
commit: e11574dd48a2e1674f9d65592595283a9284115e [5/7] btrfs: send: allocate 
send buffer with alloc_page() and vmap() for v2
:: branch date: 15 hours ago
:: commit date: 15 hours ago
config: x86_64-randconfig-m001-20220314 
(https://download.01.org/0day-ci/archive/20220316/202203161918.yllxvwcm-...@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04) 9.4.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot 
Reported-by: Dan Carpenter 

smatch warnings:
fs/btrfs/send.c:7705 btrfs_ioctl_send() error: we previously assumed 
'sctx->send_buf_pages' could be null (see line 7492)

vim +7705 fs/btrfs/send.c

62d54f3a7fa27e Filipe Manana 2019-04-22  7387  
9ad1230533efb6 Sahil Kang2022-01-15  7388  long 
btrfs_ioctl_send(struct inode *inode, struct btrfs_ioctl_send_args *arg)
31db9f7c23fbf7 Alexander Block   2012-07-25  7389  {
31db9f7c23fbf7 Alexander Block   2012-07-25  7390   int ret = 0;
9ad1230533efb6 Sahil Kang2022-01-15  7391   struct 
btrfs_root *send_root = BTRFS_I(inode)->root;
0b246afa62b0cf Jeff Mahoney  2016-06-22  7392   struct 
btrfs_fs_info *fs_info = send_root->fs_info;
31db9f7c23fbf7 Alexander Block   2012-07-25  7393   struct 
btrfs_root *clone_root;
31db9f7c23fbf7 Alexander Block   2012-07-25  7394   struct send_ctx 
*sctx = NULL;
31db9f7c23fbf7 Alexander Block   2012-07-25  7395   u32 i;
e11574dd48a2e1 Omar Sandoval 2020-05-01  7396   u32 
send_buf_num_pages = 0;
31db9f7c23fbf7 Alexander Block   2012-07-25  7397   u64 
*clone_sources_tmp = NULL;
2c68653787f91c David Sterba  2013-12-16  7398   int 
clone_sources_to_rollback = 0;
bae12df966f0e1 Denis Efremov 2020-09-21  7399   size_t 
alloc_size;
896c14f97f700a Wang Shilong  2014-01-07  7400   int 
sort_clone_roots = 0;
31db9f7c23fbf7 Alexander Block   2012-07-25  7401  
31db9f7c23fbf7 Alexander Block   2012-07-25  7402   if 
(!capable(CAP_SYS_ADMIN))
31db9f7c23fbf7 Alexander Block   2012-07-25  7403   return 
-EPERM;
31db9f7c23fbf7 Alexander Block   2012-07-25  7404  
2c68653787f91c David Sterba  2013-12-16  7405   /*
2c68653787f91c David Sterba  2013-12-16  7406* The 
subvolume must remain read-only during send, protect against
521e0546c970c3 David Sterba  2014-04-15  7407* making it 
RW. This also protects against deletion.
2c68653787f91c David Sterba  2013-12-16  7408*/
2c68653787f91c David Sterba  2013-12-16  7409   
spin_lock(&send_root->root_item_lock);
62d54f3a7fa27e Filipe Manana 2019-04-22  7410   if 
(btrfs_root_readonly(send_root) && send_root->dedupe_in_progress) {
62d54f3a7fa27e Filipe Manana 2019-04-22  7411   
dedupe_in_progress_warn(send_root);
62d54f3a7fa27e Filipe Manana 2019-04-22  7412   
spin_unlock(&send_root->root_item_lock);
62d54f3a7fa27e Filipe Manana 2019-04-22  7413   return 
-EAGAIN;
62d54f3a7fa27e Filipe Manana 2019-04-22  7414   }
2c68653787f91c David Sterba  2013-12-16  7415   
send_root->send_in_progress++;
2c68653787f91c David Sterba  2013-12-16  7416   
spin_unlock(&send_root->root_item_lock);
2c68653787f91c David Sterba  2013-12-16  7417  
2c68653787f91c David Sterba  2013-12-16  7418   /*
2c68653787f91c David Sterba  2013-12-16  7419* Userspace 
tools do the checks and warn the user if it's
2c68653787f91c David Sterba  2013-12-16  7420* not RO.
2c68653787f91c David Sterba  2013-12-16  7421*/
2c68653787f91c David Sterba  2013-12-16  7422   if 
(!btrfs_root_readonly(send_root)) {
2c68653787f91c David Sterba  2013-12-16  7423   ret = 
-EPERM;
2c68653787f91c David Sterba  2013-12-16  7424   goto 
out;
2c68653787f91c David Sterba  2013-12-16  7425   }
2c68653787f91c David Sterba  2013-12-16  7426  
457ae7268b29c3 Dan Carpenter 2017-03-17  7427   /*
457ae7268b29c3 Dan Carpenter 2017-03-17  7428* Check that 
we don't overflow at later allocations, we request
457ae7268b29c3 Dan Carpenter 2017-03-17  7429* 
clone_sources_count + 1 items, and compare to unsigned long inside
457ae7268b29c3 Dan Carpenter 2017-03-17  7430* acce

[kbuild] [linux-next:master 4172/12845] drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:415:5: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]

2022-03-16 Thread kernel test robot
CC: l...@lists.linux.dev
CC: kbuild-...@lists.01.org
BCC: l...@intel.com
CC: Linux Memory Management List 
TO: Andrey Grodzovsky 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   a32cd981a6da2373c093d471ee4405a915e217d5
commit: cfbb6b0047448e2d986160d9f30d60f604d9ad0f [4172/12845] drm/amdgpu: 
Rework reset domain to be refcounted.
:: branch date: 20 hours ago
:: commit date: 5 weeks ago
config: riscv-randconfig-c006-20220310 
(https://download.01.org/0day-ci/archive/20220316/202203161739.aybuljdg-...@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 
276ca87382b8f16a65bddac700202924228982f6)
reproduce (this is a W=1 build):
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=cfbb6b0047448e2d986160d9f30d60f604d9ad0f
git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout cfbb6b0047448e2d986160d9f30d60f604d9ad0f
# 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/media/i2c/tvp7002.c:638:37: warning: The right operand of '&' is a 
garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
   cpln = cpl_lsb | ((TVP7002_CL_MASK & cpl_msb) << TVP7002_CL_SHIFT);
  ^
   drivers/media/i2c/tvp7002.c:753:2: note: Calling 'tvp7002_query_dv'
   tvp7002_query_dv(sd, &detected);
   ^~~
   drivers/media/i2c/tvp7002.c:618:2: note: 'cpl_msb' declared without an 
initial value
   u8 cpl_msb;
   ^~
   drivers/media/i2c/tvp7002.c:627:6: note: Assuming 'error' is >= 0
   if (error < 0)
   ^
   drivers/media/i2c/tvp7002.c:627:2: note: Taking false branch
   if (error < 0)
   ^
   drivers/media/i2c/tvp7002.c:631:2: note: Calling 'tvp7002_read_err'
   tvp7002_read_err(sd, TVP7002_CLK_L_STAT_MSBS, &cpl_msb, &error);
   ^~~
   drivers/media/i2c/tvp7002.c:475:2: note: Taking false branch
   if (!*err)
   ^
   drivers/media/i2c/tvp7002.c:477:1: note: Returning without writing to '*dst'
   }
   ^
   drivers/media/i2c/tvp7002.c:631:2: note: Returning from 'tvp7002_read_err'
   tvp7002_read_err(sd, TVP7002_CLK_L_STAT_MSBS, &cpl_msb, &error);
   ^~~
   drivers/media/i2c/tvp7002.c:633:6: note: 'error' is >= 0
   if (error < 0)
   ^
   drivers/media/i2c/tvp7002.c:633:2: note: Taking false branch
   if (error < 0)
   ^
   drivers/media/i2c/tvp7002.c:638:37: note: The right operand of '&' is a 
garbage value
   cpln = cpl_lsb | ((TVP7002_CL_MASK & cpl_msb) << TVP7002_CL_SHIFT);
  ^ ~~~
   drivers/media/i2c/tvp7002.c:1004:2: warning: Value stored to 'error' is 
never read [clang-analyzer-deadcode.DeadStores]
   error = tvp7002_s_dv_timings(sd, &timings);
   ^   ~~
   drivers/media/i2c/tvp7002.c:1004:2: note: Value stored to 'error' is never 
read
   error = tvp7002_s_dv_timings(sd, &timings);
   ^   ~~
   Suppressed 4 warnings (4 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.
   Suppressed 5 warnings (5 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   5 warnings generated.