[kbuild] [alexandrebelloni:rtc-misc 182/182] drivers/rtc/interface.c:146 rtc_set_time() error: we previously assumed 'rtc->ops' could be null (see line 144)

2019-05-01 Thread Dan Carpenter
tree:   https://github.com/alexandrebelloni/linux rtc-misc
head:   31de69b7fcd0e106d6019d25284ec89a014c237f
commit: 31de69b7fcd0e106d6019d25284ec89a014c237f [182/182] rtc: drop set_mms 
and set_mmss64

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

smatch warnings:
drivers/rtc/interface.c:146 rtc_set_time() error: we previously assumed 
'rtc->ops' could be null (see line 144)

# 
https://github.com/alexandrebelloni/linux/commit/31de69b7fcd0e106d6019d25284ec89a014c237f
git remote add alexandrebelloni https://github.com/alexandrebelloni/linux
git remote update alexandrebelloni
git checkout 31de69b7fcd0e106d6019d25284ec89a014c237f
vim +146 drivers/rtc/interface.c

0c86edc0 Alessandro Zummo  2006-03-27  125  
ab6a2d70 David Brownell2007-05-08  126  int rtc_set_time(struct rtc_device 
*rtc, struct rtc_time *tm)
0c86edc0 Alessandro Zummo  2006-03-27  127  {
0c86edc0 Alessandro Zummo  2006-03-27  128  int err;
0c86edc0 Alessandro Zummo  2006-03-27  129  
0c86edc0 Alessandro Zummo  2006-03-27  130  err = rtc_valid_tm(tm);
0c86edc0 Alessandro Zummo  2006-03-27  131  if (err != 0)
0c86edc0 Alessandro Zummo  2006-03-27  132  return err;
0c86edc0 Alessandro Zummo  2006-03-27  133  
4c4e5df1 Baolin Wang   2018-01-08  134  err = rtc_valid_range(rtc, tm);
4c4e5df1 Baolin Wang   2018-01-08  135  if (err)
4c4e5df1 Baolin Wang   2018-01-08  136  return err;
71db049e Alexandre Belloni 2018-02-17  137  
98951564 Baolin Wang   2018-01-08  138  rtc_subtract_offset(rtc, tm);
98951564 Baolin Wang   2018-01-08  139  
0c86edc0 Alessandro Zummo  2006-03-27  140  err = 
mutex_lock_interruptible(>ops_lock);
0c86edc0 Alessandro Zummo  2006-03-27  141  if (err)
b68bb263 David Brownell2008-07-29  142  return err;
0c86edc0 Alessandro Zummo  2006-03-27  143  
0c86edc0 Alessandro Zummo  2006-03-27 @144  if (!rtc->ops)
^

0c86edc0 Alessandro Zummo  2006-03-27  145  err = -ENODEV;
31de69b7 Alexandre Belloni 2019-04-30 @146  if (!rtc->ops->set_time)
^^^

bbccf83f Alessandro Zummo  2009-01-06  147  err = -EINVAL;
0c86edc0 Alessandro Zummo  2006-03-27  148  
31de69b7 Alexandre Belloni 2019-04-30  149  err = 
rtc->ops->set_time(rtc->dev.parent, tm);
  ^^

31de69b7 Alexandre Belloni 2019-04-30  150  
14d0e347 Zoran Markovic2013-06-26  151  pm_stay_awake(rtc->dev.parent);
0c86edc0 Alessandro Zummo  2006-03-27  152  mutex_unlock(>ops_lock);
5f9679d2 NeilBrown 2011-12-09  153  /* A timer might have just 
expired */
5f9679d2 NeilBrown 2011-12-09  154  schedule_work(>irqwork);
29a1f599 Baolin Wang   2017-12-14  155  
29a1f599 Baolin Wang   2017-12-14  156  
trace_rtc_set_time(rtc_tm_to_time64(tm), err);
0c86edc0 Alessandro Zummo  2006-03-27  157  return err;
0c86edc0 Alessandro Zummo  2006-03-27  158  }
0c86edc0 Alessandro Zummo  2006-03-27  159  EXPORT_SYMBOL_GPL(rtc_set_time);
0c86edc0 Alessandro Zummo  2006-03-27  160  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild


[kbuild] [linux-next:master 10745/10960] drivers/scsi/fdomain.c:450 fdomain_host_reset() error: double lock 'spin_lock:sh->host_lock'

2019-05-01 Thread Dan Carpenter
Hi Ondrej,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 
master
head:   f43b05fd4c176d42c7b3f3b99643910486fc49c8
commit: 9bee24d08c08a08464b97e1da5c37acbc57a67df [10745/10960] scsi: fdomain: 
Resurrect driver - PCI support

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

smatch warnings:
drivers/scsi/fdomain.c:450 fdomain_host_reset() error: double lock 
'spin_lock:sh->host_lock'
drivers/scsi/fdomain.c:450 fdomain_host_reset() error: double lock 
'irqsave:flags'

# 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=9bee24d08c08a08464b97e1da5c37acbc57a67df
git remote add linux-next 
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 9bee24d08c08a08464b97e1da5c37acbc57a67df
vim +450 drivers/scsi/fdomain.c

92408047 Ondrej Zary 2019-04-29  441  
92408047 Ondrej Zary 2019-04-29  442  static int fdomain_host_reset(struct 
scsi_cmnd *cmd)
92408047 Ondrej Zary 2019-04-29  443  {
92408047 Ondrej Zary 2019-04-29  444struct Scsi_Host *sh = 
cmd->device->host;
92408047 Ondrej Zary 2019-04-29  445struct fdomain *fd = shost_priv(sh);
92408047 Ondrej Zary 2019-04-29  446unsigned long flags;
92408047 Ondrej Zary 2019-04-29  447  
92408047 Ondrej Zary 2019-04-29  448spin_lock_irqsave(sh->host_lock, flags);
92408047 Ondrej Zary 2019-04-29  449fdomain_reset(fd->base);
92408047 Ondrej Zary 2019-04-29 @450spin_lock_irqsave(sh->host_lock, flags);
 
unlock.

92408047 Ondrej Zary 2019-04-29  451return SUCCESS;
92408047 Ondrej Zary 2019-04-29  452  }
92408047 Ondrej Zary 2019-04-29  453  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation
___
kbuild mailing list
kbuild@lists.01.org
https://lists.01.org/mailman/listinfo/kbuild