From: kbuild test robot <lkp@intel.com>
To: Dan Murphy <dmurphy@ti.com>
Cc: kbuild-all@01.org, robh+dt@kernel.org, mark.rutland@arm.com,
jacek.anaszewski@gmail.com, pavel@ucw.cz, afd@ti.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-leds@vger.kernel.org, Dan Murphy <dmurphy@ti.com>
Subject: Re: [PATCH v3 2/2] leds: lm3601x: Introduce the lm3601x LED driver
Date: Thu, 10 May 2018 03:13:42 +0800 [thread overview]
Message-ID: <201805100310.5poORgcq%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180509115727.12070-2-dmurphy@ti.com>
Hi Dan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on v4.17-rc4 next-20180509]
[cannot apply to j.anaszewski-leds/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Dan-Murphy/dt-bindings-lm3601x-Introduce-the-lm3601x-driver/20180509-232022
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
coccinelle warnings: (new ones prefixed by >>)
>> drivers/leds/leds-lm3601x.c:241:35-36: WARNING: Use ARRAY_SIZE
vim +241 drivers/leds/leds-lm3601x.c
224
225 static int lm3601x_strobe_set(struct led_classdev_flash *fled_cdev,
226 bool state)
227 {
228 struct lm3601x_led *led = fled_cdev_to_led(fled_cdev);
229 int ret;
230 int current_timeout;
231 int reg_count;
232 int i;
233 int timeout_reg_val = 0;
234
235 mutex_lock(&led->lock);
236
237 ret = regmap_read(led->regmap, LM3601X_CFG_REG, ¤t_timeout);
238 if (ret < 0)
239 goto out;
240
> 241 reg_count = sizeof(strobe_timeouts) / sizeof(strobe_timeouts[0]);
242 for (i = 0; i < reg_count; i++) {
243 if (led->strobe_timeout > strobe_timeouts[i].timeout)
244 continue;
245
246 if (led->strobe_timeout <= strobe_timeouts[i].timeout) {
247 timeout_reg_val = (strobe_timeouts[i].reg_val << 1);
248 break;
249 }
250
251 ret = -EINVAL;
252 goto out;
253 }
254
255 if (led->strobe_timeout != current_timeout)
256 ret = regmap_update_bits(led->regmap, LM3601X_CFG_REG,
257 0x1e, timeout_reg_val);
258
259 if (state)
260 ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,
261 LM3601X_MODE_STROBE,
262 LM3601X_MODE_STROBE);
263 else
264 ret = regmap_update_bits(led->regmap, LM3601X_ENABLE_REG,
265 LM3601X_MODE_STROBE, LED_OFF);
266
267 ret = lm3601x_read_faults(led);
268 out:
269 mutex_unlock(&led->lock);
270 return ret;
271 }
272
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
prev parent reply other threads:[~2018-05-09 19:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 11:57 [PATCH v3 1/2] dt: bindings: lm3601x: Introduce the lm3601x driver Dan Murphy
2018-05-09 11:57 ` [PATCH v3 2/2] leds: lm3601x: Introduce the lm3601x LED driver Dan Murphy
2018-05-09 19:13 ` kbuild test robot [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=201805100310.5poORgcq%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=afd@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pavel@ucw.cz \
--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
all inboxes | Powered by JetHome®