tree: https://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git led_naming_v3 head: 874afe7cdd93e3bf618b83f103985a965f4a23a8 commit: 300ff6071d0100653827e393853b9a52013e9804 [13/37] leds: class: Improve LED and LED flash class registration API config: i386-randconfig-l2-04060621 (attached as .config) compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010 reproduce: git checkout 300ff6071d0100653827e393853b9a52013e9804 # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/leds/leds-pwm.c: In function 'led_pwm_add': >> drivers/leds/leds-pwm.c:117:8: error: implicit declaration of function 'devm_of_led_classdev_register' [-Werror=implicit-function-declaration] ret = devm_of_led_classdev_register(dev, child, &led_data->cdev); ^ Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u32 Cyclomatic Complexity 3 include/linux/log2.h:is_power_of_2 Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata Cyclomatic Complexity 1 include/linux/device.h:dev_get_platdata Cyclomatic Complexity 1 include/linux/platform_device.h:platform_set_drvdata Cyclomatic Complexity 1 include/linux/pwm.h:pwm_get_state Cyclomatic Complexity 1 include/linux/pwm.h:pwm_get_args Cyclomatic Complexity 1 drivers/leds/leds-pwm.c:sizeof_pwm_leds_priv Cyclomatic Complexity 1 drivers/leds/leds-pwm.c:led_pwm_driver_init Cyclomatic Complexity 2 include/linux/of.h:of_get_child_count Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc Cyclomatic Complexity 1 include/linux/err.h:IS_ERR Cyclomatic Complexity 1 include/linux/pwm.h:pwm_apply_args Cyclomatic Complexity 5 include/linux/pwm.h:pwm_config Cyclomatic Complexity 3 include/linux/pwm.h:pwm_disable Cyclomatic Complexity 3 include/linux/pwm.h:pwm_enable Cyclomatic Complexity 2 drivers/leds/leds-pwm.c:__led_pwm_set Cyclomatic Complexity 68 drivers/leds/leds-pwm.c:led_pwm_set Cyclomatic Complexity 7 drivers/leds/leds-pwm.c:led_pwm_add Cyclomatic Complexity 1 include/linux/of.h:of_property_read_bool Cyclomatic Complexity 2 include/linux/of.h:of_property_read_u32_array Cyclomatic Complexity 1 include/linux/of.h:of_property_read_u32 Cyclomatic Complexity 4 drivers/leds/leds-pwm.c:led_pwm_create_of Cyclomatic Complexity 8 drivers/leds/leds-pwm.c:led_pwm_probe Cyclomatic Complexity 1 drivers/leds/leds-pwm.c:led_pwm_driver_exit cc1: some warnings being treated as errors vim +/devm_of_led_classdev_register +117 drivers/leds/leds-pwm.c 0f86815a Peter Ujfalusi 2012-12-21 76 5f7b03dc Russell King 2014-04-06 77 static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, b795e6d9 Russell King 2014-04-06 78 struct led_pwm *led, struct device_node *child) 08541cbc Peter Ujfalusi 2012-12-21 79 { 5f7b03dc Russell King 2014-04-06 80 struct led_pwm_data *led_data = &priv->leds[priv->num_leds]; 1b50673d Boris Brezillon 2016-04-14 81 struct pwm_args pargs; aa1a6d6d Peter Ujfalusi 2013-11-28 82 int ret; 08541cbc Peter Ujfalusi 2012-12-21 83 5f7b03dc Russell King 2014-04-06 84 led_data->active_low = led->active_low; 5f7b03dc Russell King 2014-04-06 85 led_data->cdev.name = led->name; 5f7b03dc Russell King 2014-04-06 86 led_data->cdev.default_trigger = led->default_trigger; 5f7b03dc Russell King 2014-04-06 87 led_data->cdev.brightness = LED_OFF; 5f7b03dc Russell King 2014-04-06 88 led_data->cdev.max_brightness = led->max_brightness; 5f7b03dc Russell King 2014-04-06 89 led_data->cdev.flags = LED_CORE_SUSPENDRESUME; 5f7b03dc Russell King 2014-04-06 90 b795e6d9 Russell King 2014-04-06 91 if (child) b795e6d9 Russell King 2014-04-06 92 led_data->pwm = devm_of_pwm_get(dev, child, NULL); b795e6d9 Russell King 2014-04-06 93 else 5f7b03dc Russell King 2014-04-06 94 led_data->pwm = devm_pwm_get(dev, led->name); 5f7b03dc Russell King 2014-04-06 95 if (IS_ERR(led_data->pwm)) { 5f7b03dc Russell King 2014-04-06 96 ret = PTR_ERR(led_data->pwm); 9aec3037 Jerome Brunet 2018-09-06 97 if (ret != -EPROBE_DEFER) 5f7b03dc Russell King 2014-04-06 98 dev_err(dev, "unable to request PWM for %s: %d\n", 5f7b03dc Russell King 2014-04-06 99 led->name, ret); 5f7b03dc Russell King 2014-04-06 100 return ret; 5f7b03dc Russell King 2014-04-06 101 } 5f7b03dc Russell King 2014-04-06 102 247bde13 Thierry Reding 2017-01-04 103 led_data->cdev.brightness_set_blocking = led_pwm_set; 5f7b03dc Russell King 2014-04-06 104 1b50673d Boris Brezillon 2016-04-14 105 /* 1b50673d Boris Brezillon 2016-04-14 106 * FIXME: pwm_apply_args() should be removed when switching to the 1b50673d Boris Brezillon 2016-04-14 107 * atomic PWM API. 1b50673d Boris Brezillon 2016-04-14 108 */ 1b50673d Boris Brezillon 2016-04-14 109 pwm_apply_args(led_data->pwm); 1b50673d Boris Brezillon 2016-04-14 110 1b50673d Boris Brezillon 2016-04-14 111 pwm_get_args(led_data->pwm, &pargs); 1b50673d Boris Brezillon 2016-04-14 112 1b50673d Boris Brezillon 2016-04-14 113 led_data->period = pargs.period; 7c574cf6 Linus Torvalds 2014-06-12 114 if (!led_data->period && (led->pwm_period_ns > 0)) 7c574cf6 Linus Torvalds 2014-06-12 115 led_data->period = led->pwm_period_ns; 08541cbc Peter Ujfalusi 2012-12-21 116 cb14e6d6 Krzysztof Kozlowski 2018-12-07 @117 ret = devm_of_led_classdev_register(dev, child, &led_data->cdev); 5f7b03dc Russell King 2014-04-06 118 if (ret == 0) { 5f7b03dc Russell King 2014-04-06 119 priv->num_leds++; f1670336 Markus Hofstaetter 2015-11-11 120 led_pwm_set(&led_data->cdev, led_data->cdev.brightness); 5f7b03dc Russell King 2014-04-06 121 } else { 5f7b03dc Russell King 2014-04-06 122 dev_err(dev, "failed to register PWM led for %s: %d\n", 5f7b03dc Russell King 2014-04-06 123 led->name, ret); 5f7b03dc Russell King 2014-04-06 124 } 08541cbc Peter Ujfalusi 2012-12-21 125 5f7b03dc Russell King 2014-04-06 126 return ret; 08541cbc Peter Ujfalusi 2012-12-21 127 } 08541cbc Peter Ujfalusi 2012-12-21 128 :::::: The code at line 117 was first introduced by commit :::::: cb14e6d6d8f411b7a05f36d1f877450c036d8c56 leds: pwm: Use OF variant of LED registering function :::::: TO: Krzysztof Kozlowski <krzk@xxxxxxxxxx> :::::: CC: Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip