From: Dan Carpenter <dan.carpenter@linaro.org>
To: oe-kbuild@lists.linux.dev,
Antoniu Miclaus <antoniu.miclaus@analog.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jean Delvare <jdelvare@suse.com>,
Guenter Roeck <linux@roeck-us.net>,
linux-rtc@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org
Cc: lkp@intel.com, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v7 2/2] rtc: max31335: add driver support
Date: Mon, 20 Nov 2023 06:35:04 -0500 [thread overview]
Message-ID: <ad78bb08-d415-481d-8f26-0b0195a1ad9d@suswa.mountain> (raw)
In-Reply-To: <20231109101449.8347-2-antoniu.miclaus@analog.com>
Hi Antoniu,
kernel test robot noticed the following build warnings:
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Antoniu-Miclaus/rtc-max31335-add-driver-support/20231109-231755
base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link: https://lore.kernel.org/r/20231109101449.8347-2-antoniu.miclaus%40analog.com
patch subject: [PATCH v7 2/2] rtc: max31335: add driver support
config: i386-randconfig-141-20231111 (https://download.01.org/0day-ci/archive/20231111/202311110943.V2lcrQlf-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20231111/202311110943.V2lcrQlf-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202311110943.V2lcrQlf-lkp@intel.com/
smatch warnings:
drivers/rtc/rtc-max31335.c:415 max31335_trickle_charger_setup() error: uninitialized symbol 'trickle_cfg'.
vim +/trickle_cfg +415 drivers/rtc/rtc-max31335.c
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 383 static int max31335_trickle_charger_setup(struct device *dev,
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 384 struct max31335_data *max31335)
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 385 {
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 386 u32 ohms, chargeable;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 387 int i, trickle_cfg;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 388 const char *diode;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 389
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 390 if (device_property_read_u32(dev, "aux-voltage-chargeable",
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 391 &chargeable))
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 392 return 0;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 393
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 394 if (device_property_read_u32(dev, "trickle-resistor-ohms", &ohms))
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 395 return 0;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 396
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 397 if (device_property_read_string(dev, "adi,tc-diode", &diode))
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 398 return 0;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 399
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 400 if (!strcmp(diode, "schottky"))
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 401 trickle_cfg = MAX31335_TRICKLE_SCHOTTKY_DIODE;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 402 else if (!strcmp(diode, "standard+schottky"))
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 403 trickle_cfg = MAX31335_TRICKLE_STANDARD_DIODE;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 404 else
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 405 dev_err_probe(dev, -EINVAL, "Invalid tc-diode value: %s\n",
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 406 diode);
Probably was intended to be return dev_err_probe();
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 407
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 408 for (i = 0; i < ARRAY_SIZE(max31335_trickle_resistors); i++)
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 409 if (ohms == max31335_trickle_resistors[i])
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 410 break;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 411
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 412 if (i >= ARRAY_SIZE(max31335_trickle_resistors))
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 413 return 0;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 414
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 @415 i = i + trickle_cfg;
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 416
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 417 return regmap_write(max31335->regmap, MAX31335_TRICKLE_REG,
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 418 FIELD_PREP(MAX31335_TRICKLE_REG_TRICKLE, i) |
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 419 FIELD_PREP(MAX31335_TRICKLE_REG_EN_TRICKLE,
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 420 chargeable));
d76a0d3a61615e5 Antoniu Miclaus 2023-11-09 421 }
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2023-11-20 11:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-09 10:14 [PATCH v7 1/2] dt-bindings: rtc: max31335: add max31335 bindings Antoniu Miclaus
2023-11-09 10:14 ` [PATCH v7 2/2] rtc: max31335: add driver support Antoniu Miclaus
2023-11-10 21:29 ` kernel test robot
2023-11-11 15:23 ` Guenter Roeck
2023-11-20 11:35 ` 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=ad78bb08-d415-481d-8f26-0b0195a1ad9d@suswa.mountain \
--to=dan.carpenter@linaro.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=antoniu.miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jdelvare@suse.com \
--cc=krzk@kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=lkp@intel.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=oe-kbuild@lists.linux.dev \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).