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