From: kernel test robot <lkp@intel.com>
To: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>,
"Lee Jones" <lee@kernel.org>, "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Kamel Bouhara" <kamel.bouhara@bootlin.com>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Bartosz Golaszewski" <brgl@bgdev.pl>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Uwe Kleine-König" <ukleinek@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-input@vger.kernel.org,
linux-pwm@vger.kernel.org,
"Grégory Clement" <gregory.clement@bootlin.com>,
"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
Subject: Re: [PATCH 5/8] gpio: max7360: Add MAX7360 gpio support
Date: Fri, 20 Dec 2024 23:54:33 +0800 [thread overview]
Message-ID: <202412202337.8jOygMaK-lkp@intel.com> (raw)
In-Reply-To: <20241219-mdb-max7360-support-v1-5-8e8317584121@bootlin.com>
Hi Mathieu,
kernel test robot noticed the following build warnings:
[auto build test WARNING on 78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8]
url: https://github.com/intel-lab-lkp/linux/commits/Mathieu-Dubois-Briand/dt-bindings-Add-MAX7360-MFD-device/20241220-002541
base: 78d4f34e2115b517bcbfe7ec0d018bbbb6f9b0b8
patch link: https://lore.kernel.org/r/20241219-mdb-max7360-support-v1-5-8e8317584121%40bootlin.com
patch subject: [PATCH 5/8] gpio: max7360: Add MAX7360 gpio support
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20241220/202412202337.8jOygMaK-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241220/202412202337.8jOygMaK-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>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412202337.8jOygMaK-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/gpio/gpio-max7360.c:57:41: warning: variable 'val' is uninitialized when used here [-Wuninitialized]
57 | "failed to set value %d on gpio-%d", val, pin);
| ^~~
include/linux/dev_printk.h:154:65: note: expanded from macro 'dev_err'
154 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~~~~~
include/linux/dev_printk.h:110:23: note: expanded from macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~~~~~~~~~
drivers/gpio/gpio-max7360.c:42:18: note: initialize the variable 'val' to silence this warning
42 | unsigned int val;
| ^
| = 0
>> drivers/gpio/gpio-max7360.c:370:32: warning: cast to smaller integer type 'int' from 'const void *' [-Wvoid-pointer-to-int-cast]
370 | max7360_gpio->gpio_function = (int)device_get_match_data(&pdev->dev);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +370 drivers/gpio/gpio-max7360.c
333
334 static int max7360_gpio_probe(struct platform_device *pdev)
335 {
336 struct max7360_gpio *max7360_gpio;
337 unsigned int ngpios;
338 unsigned int outconf;
339 struct gpio_irq_chip *girq;
340 unsigned long flags;
341 int irq;
342 int ret;
343
344 if (!pdev->dev.parent) {
345 dev_err(&pdev->dev, "no parent device\n");
346 return -ENODEV;
347 }
348
349 max7360_gpio = devm_kzalloc(&pdev->dev, sizeof(struct max7360_gpio),
350 GFP_KERNEL);
351 if (!max7360_gpio)
352 return -ENOMEM;
353
354 if (of_property_read_u32(pdev->dev.of_node, "ngpios", &ngpios)) {
355 dev_err(&pdev->dev, "Missing ngpios OF property\n");
356 return -ENODEV;
357 }
358
359 max7360_gpio->regmap = dev_get_regmap(pdev->dev.parent, NULL);
360 if (!max7360_gpio->regmap) {
361 dev_err(&pdev->dev, "could not get parent regmap\n");
362 return -ENODEV;
363 }
364
365 max7360_gpio->dev = &pdev->dev;
366 max7360_gpio->chip = max7360_gpio_chip;
367 max7360_gpio->chip.ngpio = ngpios;
368 max7360_gpio->chip.parent = &pdev->dev;
369 max7360_gpio->chip.base = -1;
> 370 max7360_gpio->gpio_function = (int)device_get_match_data(&pdev->dev);
371
372 dev_dbg(&pdev->dev, "gpio count: %d\n", max7360_gpio->chip.ngpio);
373
374 if (max7360_gpio->gpio_function == MAX7360_GPIO_PORT) {
375 /* Port GPIOs: set output mode configuration (constant-current
376 * or not).
377 * This property is optional.
378 */
379 outconf = 0;
380 ret = of_property_read_u32(pdev->dev.of_node,
381 "constant-current-disable", &outconf);
382 if (ret && (ret != -EINVAL)) {
383 dev_err(&pdev->dev,
384 "Failed to read constant-current-disable OF property\n");
385 return -ENODEV;
386 }
387
388 regmap_write(max7360_gpio->regmap, MAX7360_REG_GPIOOUTM, outconf);
389 }
390
391 if (max7360_gpio->gpio_function == MAX7360_GPIO_PORT &&
392 of_property_read_bool(pdev->dev.of_node, "interrupt-controller")) {
393 /* Port GPIOs: declare IRQ chip, if configuration was provided.
394 */
395 irq = platform_get_irq(pdev, 0);
396 if (irq < 0)
397 return dev_err_probe(&pdev->dev, irq,
398 "Failed to get IRQ");
399
400 flags = IRQF_TRIGGER_LOW | IRQF_ONESHOT | IRQF_SHARED;
401 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
402 max7360_gpio_irq, flags,
403 "max7360-gpio", max7360_gpio);
404 if (ret)
405 return dev_err_probe(&pdev->dev, ret,
406 "Failed to register interrupt: %d\n",
407 ret);
408
409 girq = &max7360_gpio->chip.irq;
410 gpio_irq_chip_set_chip(girq, &max7360_gpio_irqchip);
411 girq->parent_handler = NULL;
412 girq->num_parents = 0;
413 girq->parents = NULL;
414 girq->threaded = true;
415 girq->default_type = IRQ_TYPE_NONE;
416 girq->handler = handle_simple_irq;
417 }
418
419 ret = devm_gpiochip_add_data(&pdev->dev, &max7360_gpio->chip, max7360_gpio);
420 if (ret) {
421 dev_err(&pdev->dev, "unable to add gpiochip: %d\n", ret);
422 return ret;
423 }
424
425 return 0;
426 }
427
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-20 15:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 16:21 [PATCH 0/8] Add support for MAX7360 multifunction device Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 1/8] dt-bindings: Add MAX7360 MFD device Mathieu Dubois-Briand
2024-12-21 20:28 ` Krzysztof Kozlowski
2024-12-19 16:21 ` [PATCH 2/8] dt-bindings: Add MAX7360 subdevices Mathieu Dubois-Briand
2024-12-19 21:54 ` Uwe Kleine-König
2024-12-21 20:34 ` Krzysztof Kozlowski
2024-12-23 15:20 ` Mathieu Dubois-Briand
2024-12-24 9:00 ` Krzysztof Kozlowski
2024-12-24 12:10 ` Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 3/8] mfd: Add max7360 support mathieu.dubois-briand
2024-12-20 23:01 ` kernel test robot
2024-12-19 16:21 ` [PATCH 4/8] pwm: max7360: Add MAX7360 PWM support mathieu.dubois-briand
2024-12-19 21:53 ` Uwe Kleine-König
2024-12-23 15:26 ` Mathieu Dubois-Briand
2024-12-20 5:51 ` Uwe Kleine-König
2024-12-21 20:35 ` Krzysztof Kozlowski
2024-12-19 16:21 ` [PATCH 5/8] gpio: max7360: Add MAX7360 gpio support Mathieu Dubois-Briand
2024-12-20 15:54 ` kernel test robot [this message]
2024-12-20 16:39 ` kernel test robot
2024-12-19 16:21 ` [PATCH 6/8] input: keyboard: Add support for MAX7360 keypad Mathieu Dubois-Briand
2024-12-19 19:35 ` Dmitry Torokhov
2024-12-23 15:38 ` Mathieu Dubois-Briand
2024-12-20 17:12 ` kernel test robot
2024-12-19 16:21 ` [PATCH 7/8] input: misc: Add support for MAX7360 rotary Mathieu Dubois-Briand
2024-12-19 16:21 ` [PATCH 8/8] MAINTAINERS: Add entry on MAX7360 driver Mathieu Dubois-Briand
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=202412202337.8jOygMaK-lkp@intel.com \
--to=lkp@intel.com \
--cc=brgl@bgdev.pl \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dmitry.torokhov@gmail.com \
--cc=gregory.clement@bootlin.com \
--cc=kamel.bouhara@bootlin.com \
--cc=krzk@kernel.org \
--cc=lee@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=mathieu.dubois-briand@bootlin.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
--cc=ukleinek@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