Re: [kbuild] [ext4:dev 8/8] fs/ext4/indirect.c:1462 ext4_ind_remove_space() error: we previously assumed 'partial-bh' could be null (see line 1441)

2014-07-14 Thread Dan Carpenter
On Mon, Jul 14, 2014 at 01:29:02PM +0200, Lukáš Czerner wrote:
 On Sat, 12 Jul 2014, Dan Carpenter wrote:
 
  Date: Sat, 12 Jul 2014 12:34:09 +0300
  From: Dan Carpenter dan.carpen...@oracle.com
  To: Lukas Czerner lczer...@redhat.com, kbu...@01.org
  Cc: Theodore Ts'o ty...@mit.edu, Dan Carpenter dan.carpen...@oracle.com
  Subject: [ext4:dev 8/8] fs/ext4/indirect.c:1462 ext4_ind_remove_space() 
  error:
   we previously assumed 'partial-bh' could be null (see line 1441)
  
  tree:   git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
  head:   ae3a8a51e8906c552f8edfc7202c1b2bb6f73409
  commit: ae3a8a51e8906c552f8edfc7202c1b2bb6f73409 [8/8] ext4: fix punch hole 
  on files with indirect mapping
  
  fs/ext4/indirect.c:1462 ext4_ind_remove_space() error: we previously 
  assumed 'partial-bh' could be null (see line 1441)
  fs/ext4/indirect.c:1474 ext4_ind_remove_space() error: we previously 
  assumed 'partial2-bh' could be null (see line 1441)
 
 Both of those are false positives, because if ( partial  chain )
 then partial-bh will always be set. But I am wondering how to
 silence the warning without introducing more pointless checks.
 
 Maybe we can remove 
   if ((partial-bh  partial2-bh) 
 
 and substitute it with
   if (((partial  chain)  (partial2  chain2)) 
 
 I'll retest and resend the patch.

Normally I just say we should leave false positives there.  Eventually
the tools will get smarter.

regards,
dan carpenter

___
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild


[kbuild] [regulator:topic/da9211 1/1] drivers/regulator/da9211-regulator.c:268 da9211_regulator_init() warn: variable dereferenced before check 'chip-pdata' (see line 260)

2014-07-14 Thread kbuild test robot
TO: James Ban james.ban.opensou...@diasemi.com
CC: Mark Brown broo...@linaro.org

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git 
topic/da9211
head:   1028a37daa148cc6cf85aa2aecb4390ddf1e1e56
commit: 1028a37daa148cc6cf85aa2aecb4390ddf1e1e56 [1/1] regulator: da9211: new 
regulator driver
:: branch date: 38 minutes ago
:: commit date: 38 minutes ago

drivers/regulator/da9211-regulator.c:268 da9211_regulator_init() warn: variable 
dereferenced before check 'chip-pdata' (see line 260)

git remote add regulator 
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.git
git remote update regulator
git checkout 1028a37daa148cc6cf85aa2aecb4390ddf1e1e56
vim +268 drivers/regulator/da9211-regulator.c

1028a37d James Ban 2014-07-14  254   */
1028a37d James Ban 2014-07-14  255  if ((chip-pdata-num_buck == 2  data 
== 0x40)
1028a37d James Ban 2014-07-14  256  || (chip-pdata-num_buck == 1 
 data == 0x00)) {
1028a37d James Ban 2014-07-14  257  if (data == 0)
1028a37d James Ban 2014-07-14  258  chip-num_regulator = 1;
1028a37d James Ban 2014-07-14  259  else
1028a37d James Ban 2014-07-14 @260  chip-num_regulator = 2;
1028a37d James Ban 2014-07-14  261  } else {
1028a37d James Ban 2014-07-14  262  ret = -EINVAL;
1028a37d James Ban 2014-07-14  263  dev_err(chip-dev, 
Configuration is mismatched\n);
1028a37d James Ban 2014-07-14  264  goto err;
1028a37d James Ban 2014-07-14  265  }
1028a37d James Ban 2014-07-14  266  
1028a37d James Ban 2014-07-14  267  for (i = 0; i  chip-num_regulator; 
i++) {
1028a37d James Ban 2014-07-14 @268  if (chip-pdata)
1028a37d James Ban 2014-07-14  269  config.init_data =
1028a37d James Ban 2014-07-14  270  
(chip-pdata-init_data[i]);
1028a37d James Ban 2014-07-14  271  

---
0-DAY kernel build testing backend  Open Source Technology Center
http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
___
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild