From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Jagath Jog J <jagathjog1996@gmail.com>,
alexandre.belloni@bootlin.com, a.zummo@towertech.it,
robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org
Cc: lkp@intel.com, kbuild-all@lists.01.org,
linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, jagathjog1996@gmail.com
Subject: Re: [PATCH v1 2/2] rtc: maxim: Add Maxim max31329 real time clock.
Date: Tue, 13 Sep 2022 12:09:55 +0300 [thread overview]
Message-ID: <202209110621.NTvdfL0p-lkp@intel.com> (raw)
In-Reply-To: <20220904044708.7062-3-jagathjog1996@gmail.com>
Hi Jagath,
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Jagath-Jog-J/rtc-add-Maxim-max31329-real-time-clock/20220904-124909
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
config: m68k-randconfig-m031-20220909
compiler: m68k-linux-gcc (GCC) 12.1.0
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/rtc/rtc-max31329.c:276 max31329_irq_handler() error: uninitialized symbol 'events'.
vim +/events +276 drivers/rtc/rtc-max31329.c
f26f983311b011 Jagath Jog J 2022-09-04 250 static irqreturn_t max31329_irq_handler(int irq, void *dev_id)
f26f983311b011 Jagath Jog J 2022-09-04 251 {
f26f983311b011 Jagath Jog J 2022-09-04 252 struct device *dev = dev_id;
f26f983311b011 Jagath Jog J 2022-09-04 253 struct max31329_data *max31329 = dev_get_drvdata(dev);
f26f983311b011 Jagath Jog J 2022-09-04 254 unsigned int flags, controls;
f26f983311b011 Jagath Jog J 2022-09-04 255 unsigned long events;
Needs to be initialized to zero.
f26f983311b011 Jagath Jog J 2022-09-04 256 int ret;
f26f983311b011 Jagath Jog J 2022-09-04 257
f26f983311b011 Jagath Jog J 2022-09-04 258 ret = regmap_read(max31329->regmap, MAX31329_INT_EN_REG, &controls);
f26f983311b011 Jagath Jog J 2022-09-04 259 if (ret) {
f26f983311b011 Jagath Jog J 2022-09-04 260 dev_warn(dev, "Read IRQ control register error %d\n", ret);
f26f983311b011 Jagath Jog J 2022-09-04 261 return IRQ_NONE;
f26f983311b011 Jagath Jog J 2022-09-04 262 }
f26f983311b011 Jagath Jog J 2022-09-04 263
f26f983311b011 Jagath Jog J 2022-09-04 264 ret = regmap_read(max31329->regmap, MAX31329_STATUS_REG, &flags);
f26f983311b011 Jagath Jog J 2022-09-04 265 if (ret) {
f26f983311b011 Jagath Jog J 2022-09-04 266 dev_warn(dev, "Read IRQ flags register error %d\n", ret);
f26f983311b011 Jagath Jog J 2022-09-04 267 return IRQ_NONE;
f26f983311b011 Jagath Jog J 2022-09-04 268 }
f26f983311b011 Jagath Jog J 2022-09-04 269
f26f983311b011 Jagath Jog J 2022-09-04 270 if (flags & MAX31329_STATUS_A1F) {
f26f983311b011 Jagath Jog J 2022-09-04 271 flags &= ~MAX31329_STATUS_A1F;
f26f983311b011 Jagath Jog J 2022-09-04 272 controls &= ~MAX31329_INT_EN_A1IE;
f26f983311b011 Jagath Jog J 2022-09-04 273 events = RTC_AF | RTC_IRQF;
f26f983311b011 Jagath Jog J 2022-09-04 274 }
f26f983311b011 Jagath Jog J 2022-09-04 275
f26f983311b011 Jagath Jog J 2022-09-04 @276 if (events) {
f26f983311b011 Jagath Jog J 2022-09-04 277 rtc_update_irq(max31329->rtc, 1, events);
f26f983311b011 Jagath Jog J 2022-09-04 278 regmap_write(max31329->regmap, MAX31329_STATUS_REG, flags);
f26f983311b011 Jagath Jog J 2022-09-04 279 regmap_write(max31329->regmap, MAX31329_INT_EN_REG, controls);
f26f983311b011 Jagath Jog J 2022-09-04 280 return IRQ_HANDLED;
f26f983311b011 Jagath Jog J 2022-09-04 281 }
f26f983311b011 Jagath Jog J 2022-09-04 282
f26f983311b011 Jagath Jog J 2022-09-04 283 return IRQ_NONE;
f26f983311b011 Jagath Jog J 2022-09-04 284 }
prev parent reply other threads:[~2022-09-13 9:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-04 4:47 [PATCH v1 0/2] rtc: add Maxim max31329 real time clock Jagath Jog J
2022-09-04 4:47 ` [PATCH v1 1/2] dt-bindings: rtc: add Maxim max31329 rtc device tree bindings Jagath Jog J
2022-09-05 15:18 ` Krzysztof Kozlowski
2022-09-04 4:47 ` [PATCH v1 2/2] rtc: maxim: Add Maxim max31329 real time clock Jagath Jog J
2022-09-05 15:20 ` Krzysztof Kozlowski
2022-09-07 19:37 ` Jagath Jog J
2022-09-06 14:54 ` kernel test robot
2022-09-13 9:09 ` Dan Carpenter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202209110621.NTvdfL0p-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=devicetree@vger.kernel.org \
--cc=jagathjog1996@gmail.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=lkp@intel.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).