From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v25 11/16] leds: lp55xx: Add multicolor framework support to lp55xx
Date: Thu, 04 Jun 2020 01:09:19 +0800 [thread overview]
Message-ID: <202006040156.9GSxLeka%lkp@intel.com> (raw)
In-Reply-To: <20200526164652.2331-12-dmurphy@ti.com>
[-- Attachment #1: Type: text/plain, Size: 3966 bytes --]
Hi Dan,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pavel-linux-leds/for-next]
[also build test WARNING on robh/for-next linus/master v5.7 next-20200603]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dan-Murphy/Multicolor-Framework-v25/20200527-011531
base: git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: x86_64-randconfig-m001-20200603 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
drivers/leds/leds-lp55xx-common.c:215 lp55xx_init_led() warn: inconsistent indenting
vim +215 drivers/leds/leds-lp55xx-common.c
160
161 static int lp55xx_init_led(struct lp55xx_led *led,
162 struct lp55xx_chip *chip, int chan)
163 {
164 struct lp55xx_platform_data *pdata = chip->pdata;
165 struct lp55xx_device_config *cfg = chip->cfg;
166 struct device *dev = &chip->cl->dev;
167 int max_channel = cfg->max_channel;
168 struct mc_subled *mc_led_info;
169 struct led_classdev *led_cdev;
170 char name[32];
171 int i, j = 0;
172 int ret;
173
174 if (chan >= max_channel) {
175 dev_err(dev, "invalid channel: %d / %d\n", chan, max_channel);
176 return -EINVAL;
177 }
178
179 if (pdata->led_config[chan].led_current == 0)
180 return 0;
181
182 if (pdata->led_config[chan].name) {
183 led->cdev.name = pdata->led_config[chan].name;
184 } else {
185 snprintf(name, sizeof(name), "%s:channel%d",
186 pdata->label ? : chip->cl->name, chan);
187 led->cdev.name = name;
188 }
189
190 if (pdata->led_config[chan].num_colors > 1) {
191 mc_led_info = devm_kcalloc(dev,
192 pdata->led_config[chan].num_colors,
193 sizeof(*mc_led_info), GFP_KERNEL);
194 if (!mc_led_info)
195 return -ENOMEM;
196
197 led_cdev = &led->mc_cdev.led_cdev;
198 led_cdev->name = led->cdev.name;
199 led_cdev->brightness_set_blocking = lp55xx_set_mc_brightness;
200 led_cdev->groups = lp55xx_led_groups;
201 led->mc_cdev.num_colors = pdata->led_config[chan].num_colors;
202 for (i = 0; i < led->mc_cdev.num_colors; i++) {
203 mc_led_info[i].color_index =
204 pdata->led_config[chan].color_id[i];
205 mc_led_info[i].channel =
206 pdata->led_config[chan].output_num[i];
207 j++;
208 }
209
210 led->mc_cdev.subled_info = mc_led_info;
211 } else {
212 led->cdev.default_trigger =
213 pdata->led_config[chan].default_trigger;
214 led->cdev.brightness_set_blocking = lp55xx_set_brightness;
> 215 } led->cdev.groups = lp55xx_led_groups;
216
217 led->led_current = pdata->led_config[chan].led_current;
218 led->max_current = pdata->led_config[chan].max_current;
219 led->chan_nr = pdata->led_config[chan].chan_nr;
220
221 if (led->chan_nr >= max_channel) {
222 dev_err(dev, "Use channel numbers between 0 and %d\n",
223 max_channel - 1);
224 return -EINVAL;
225 }
226
227 if (pdata->led_config[chan].num_colors > 1)
228 ret = devm_led_classdev_multicolor_register(dev, &led->mc_cdev);
229 else
230 ret = devm_led_classdev_register(dev, &led->cdev);
231
232 if (ret) {
233 dev_err(dev, "led register err: %d\n", ret);
234 return ret;
235 }
236
237 return 0;
238 }
239
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32325 bytes --]
next prev parent reply other threads:[~2020-06-03 17:09 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-26 16:46 [PATCH v25 00/16] Multicolor Framework v25 Dan Murphy
2020-05-26 16:46 ` [PATCH v25 01/16] dt: bindings: Add multicolor class dt bindings documention Dan Murphy
2020-05-27 1:49 ` Rob Herring
2020-05-27 13:39 ` Pavel Machek
2020-05-27 14:35 ` Rob Herring
2020-06-02 20:04 ` Pavel Machek
2020-06-02 21:44 ` Rob Herring
2020-06-04 12:51 ` Pavel Machek
2020-06-04 22:35 ` Rob Herring
2020-06-05 12:11 ` Pavel Machek
2020-05-26 16:46 ` [PATCH v25 02/16] leds: multicolor: Introduce a multicolor class definition Dan Murphy
2020-05-26 16:46 ` [PATCH v25 03/16] dt: bindings: lp50xx: Introduce the lp50xx family of RGB drivers Dan Murphy
2020-05-27 1:59 ` Rob Herring
2020-05-27 17:27 ` Dan Murphy
2020-05-27 13:58 ` Pavel Machek
2020-05-27 15:05 ` Dan Murphy
2020-05-31 19:06 ` Pavel Machek
2020-06-01 9:34 ` Jacek Anaszewski
2020-06-04 16:28 ` Dan Murphy
2020-05-26 16:46 ` [PATCH v25 04/16] leds: lp50xx: Add the LP50XX family of the RGB LED driver Dan Murphy
2020-05-26 16:46 ` [PATCH v25 05/16] dt: bindings: lp55xx: Be consistent in the document with LED acronym Dan Murphy
2020-05-27 1:59 ` Rob Herring
2020-05-26 16:46 ` [PATCH v25 06/16] dt: bindings: lp55xx: Update binding for Multicolor Framework Dan Murphy
2020-05-27 2:01 ` Rob Herring
2020-05-27 15:41 ` Dan Murphy
2020-05-26 16:46 ` [PATCH v25 07/16] ARM: dts: n900: Add reg property to the LP5523 channel node Dan Murphy
2020-05-26 16:46 ` [PATCH v25 08/16] ARM: dts: imx6dl-yapp4: Add reg property to the lp5562 " Dan Murphy
2020-05-26 16:46 ` [PATCH v25 09/16] ARM: dts: ste-href: Add reg property to the LP5521 channel nodes Dan Murphy
2020-05-26 16:46 ` [PATCH v25 10/16] leds: lp55xx: Convert LED class registration to devm_* Dan Murphy
2020-05-26 16:46 ` [PATCH v25 11/16] leds: lp55xx: Add multicolor framework support to lp55xx Dan Murphy
2020-06-03 17:09 ` kernel test robot [this message]
2020-05-26 16:46 ` [PATCH v25 12/16] leds: lp5523: Update the lp5523 code to add multicolor brightness function Dan Murphy
2020-05-26 16:46 ` [PATCH v25 13/16] leds: lp5521: Add multicolor framework multicolor brightness support Dan Murphy
2020-05-26 16:46 ` [PATCH v25 14/16] leds: lp55xx: Fix checkpatch file permissions issues Dan Murphy
2020-05-26 16:46 ` [PATCH v25 15/16] leds: lp5523: Fix checkpatch issues in the code Dan Murphy
2020-05-26 16:46 ` [PATCH v25 16/16] dt: bindings: Update lp55xx binding to recommended LED naming Dan Murphy
-- strict thread matches above, loose matches on Subject: below --
2020-05-04 21:13 [PATCH v25 00/16] Multicolor Framework v25 Dan Murphy
2020-05-04 21:13 ` [PATCH v25 11/16] leds: lp55xx: Add multicolor framework support to lp55xx Dan Murphy
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=202006040156.9GSxLeka%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.