From: kernel test robot <lkp@intel.com>
To: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
linux-kernel@vger.kernel.org
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
"Lee Jones" <lee.jones@linaro.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Jonathan Neuschäfer" <j.neuschaefer@gmx.net>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Alessandro Zummo" <a.zummo@towertech.it>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Shawn Guo" <shawnguo@kernel.org>,
"Sascha Hauer" <s.hauer@pengutronix.de>
Subject: Re: [PATCH v8 3/7] mfd: Add base driver for Netronix embedded controller
Date: Sun, 17 Jan 2021 09:22:01 +0800 [thread overview]
Message-ID: <202101170941.YsXQPP40-lkp@intel.com> (raw)
In-Reply-To: <20210116194826.3866540-4-j.neuschaefer@gmx.net>
[-- Attachment #1: Type: text/plain, Size: 4859 bytes --]
Hi "Jonathan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on lee-mfd/for-mfd-next]
[also build test WARNING on robh/for-next pwm/for-next abelloni/rtc-next linus/master v5.11-rc3 next-20210115]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Jonathan-Neusch-fer/Netronix-embedded-controller-driver-for-Kobo-and-Tolino-ebook-readers/20210117-050203
base: https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
config: mips-randconfig-r001-20210117 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2082b10d100e8dbaffc2ba8f497db5d2ab61beb2)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install mips cross compiling tool for clang build
# apt-get install binutils-mips-linux-gnu
# https://github.com/0day-ci/linux/commit/eee80e6b3b7cc2c733bd3f10d8e2ec23dda2fe26
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jonathan-Neusch-fer/Netronix-embedded-controller-driver-for-Kobo-and-Tolino-ebook-readers/20210117-050203
git checkout eee80e6b3b7cc2c733bd3f10d8e2ec23dda2fe26
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/mfd/ntxec.c:127:10: warning: variable 'res' is uninitialized when used here [-Wuninitialized]
return res;
^~~
drivers/mfd/ntxec.c:116:9: note: initialize the variable 'res' to silence this warning
int res;
^
= 0
1 warning generated.
vim +/res +127 drivers/mfd/ntxec.c
111
112 static int ntxec_probe(struct i2c_client *client)
113 {
114 struct ntxec *ec;
115 unsigned int version;
116 int res;
117
118 ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL);
119 if (!ec)
120 return -ENOMEM;
121
122 ec->dev = &client->dev;
123
124 ec->regmap = devm_regmap_init_i2c(client, ®map_config);
125 if (IS_ERR(ec->regmap)) {
126 dev_err(ec->dev, "Failed to set up regmap for device\n");
> 127 return res;
128 }
129
130 /* Determine the firmware version */
131 res = regmap_read(ec->regmap, NTXEC_REG_VERSION, &version);
132 if (res < 0) {
133 dev_err(ec->dev, "Failed to read firmware version number\n");
134 return res;
135 }
136
137 /* Bail out if we encounter an unknown firmware version */
138 switch (version) {
139 case NTXEC_VERSION_KOBO_AURA:
140 break;
141 default:
142 dev_err(ec->dev,
143 "Netronix embedded controller version %04x is not supported.\n",
144 version);
145 return -ENODEV;
146 }
147
148 dev_info(ec->dev,
149 "Netronix embedded controller version %04x detected.\n", version);
150
151 if (of_device_is_system_power_controller(ec->dev->of_node)) {
152 /*
153 * Set the 'powerkeep' bit. This is necessary on some boards
154 * in order to keep the system running.
155 */
156 res = regmap_write(ec->regmap, NTXEC_REG_POWERKEEP,
157 NTXEC_POWERKEEP_VALUE);
158 if (res < 0)
159 return res;
160
161 if (poweroff_restart_client)
162 /*
163 * Another instance of the driver already took
164 * poweroff/restart duties.
165 */
166 dev_err(ec->dev, "poweroff_restart_client already assigned\n");
167 else
168 poweroff_restart_client = client;
169
170 if (pm_power_off)
171 /* Another driver already registered a poweroff handler. */
172 dev_err(ec->dev, "pm_power_off already assigned\n");
173 else
174 pm_power_off = ntxec_poweroff;
175
176 res = register_restart_handler(&ntxec_restart_handler);
177 if (res)
178 dev_err(ec->dev,
179 "Failed to register restart handler: %d\n", res);
180 }
181
182 i2c_set_clientdata(client, ec);
183
184 res = devm_mfd_add_devices(ec->dev, PLATFORM_DEVID_NONE, ntxec_subdevices,
185 ARRAY_SIZE(ntxec_subdevices), NULL, 0, NULL);
186 if (res)
187 dev_err(ec->dev, "Failed to add subdevices: %d\n", res);
188
189 return res;
190 }
191
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 36493 bytes --]
next prev parent reply other threads:[~2021-01-17 1:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 19:48 [PATCH v8 0/7] Netronix embedded controller driver for Kobo and Tolino ebook readers Jonathan Neuschäfer
2021-01-16 19:48 ` [PATCH v8 1/7] dt-bindings: Add vendor prefix for Netronix, Inc Jonathan Neuschäfer
2021-01-16 19:48 ` [PATCH v8 2/7] dt-bindings: mfd: Add binding for Netronix embedded controller Jonathan Neuschäfer
2021-01-16 19:48 ` [PATCH v8 3/7] mfd: Add base driver " Jonathan Neuschäfer
2021-01-17 1:22 ` kernel test robot [this message]
2021-01-18 0:43 ` Jonathan Neuschäfer
2021-01-16 19:48 ` [PATCH v8 4/7] pwm: ntxec: Add driver for PWM function in Netronix EC Jonathan Neuschäfer
2021-01-20 17:37 ` Thierry Reding
2021-01-16 19:48 ` [PATCH v8 5/7] rtc: New driver for RTC in Netronix embedded controller Jonathan Neuschäfer
2021-01-16 19:48 ` [PATCH v8 6/7] MAINTAINERS: Add entry for " Jonathan Neuschäfer
2021-01-16 19:48 ` [PATCH v8 7/7] ARM: dts: imx50-kobo-aura: Add " Jonathan Neuschäfer
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=202101170941.YsXQPP40-lkp@intel.com \
--to=lkp@intel.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=clang-built-linux@googlegroups.com \
--cc=j.neuschaefer@gmx.net \
--cc=kbuild-all@lists.01.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=thierry.reding@gmail.com \
--cc=u.kleine-koenig@pengutronix.de \
/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