lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 3 Aug 2022 09:16:14 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        Pavel Machek <pavel@....cz>
Subject: Re: [PATCH v1 1/1] leds: pm8058: Get rid of custom
 led_init_default_state_get()

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on pavel-leds/for-next]
[also build test ERROR on linus/master v5.19 next-20220728]
[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#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/leds-pm8058-Get-rid-of-custom-led_init_default_state_get/20220803-052610
base:   git://git.kernel.org/pub/scm/linux/kernel/git/pavel/linux-leds.git for-next
config: arm-buildonly-randconfig-r002-20220801 (https://download.01.org/0day-ci/archive/20220803/202208030942.Sh3TajDz-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 52cd00cabf479aa7eb6dbb063b7ba41ea57bce9e)
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 arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/58bf03fa835e906a28c49e4aef6060d140239d7f
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/leds-pm8058-Get-rid-of-custom-led_init_default_state_get/20220803-052610
        git checkout 58bf03fa835e906a28c49e4aef6060d140239d7f
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/leds/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/leds/leds-pm8058.c:130:10: error: call to undeclared function 'led_init_default_state_get'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           state = led_init_default_state_get(init_data.fwnode);
                   ^
   1 error generated.


vim +/led_init_default_state_get +130 drivers/leds/leds-pm8058.c

    87	
    88	static int pm8058_led_probe(struct platform_device *pdev)
    89	{
    90		struct led_init_data init_data = {};
    91		struct device *dev = &pdev->dev;
    92		struct pm8058_led *led;
    93		struct device_node *np;
    94		int ret;
    95		struct regmap *map;
    96		enum led_brightness maxbright;
    97		enum led_default_state state;
    98	
    99		led = devm_kzalloc(dev, sizeof(*led), GFP_KERNEL);
   100		if (!led)
   101			return -ENOMEM;
   102	
   103		led->ledtype = (u32)(unsigned long)of_device_get_match_data(dev);
   104	
   105		map = dev_get_regmap(dev->parent, NULL);
   106		if (!map) {
   107			dev_err(dev, "Parent regmap unavailable.\n");
   108			return -ENXIO;
   109		}
   110		led->map = map;
   111	
   112		np = dev_of_node(dev);
   113	
   114		ret = of_property_read_u32(np, "reg", &led->reg);
   115		if (ret) {
   116			dev_err(dev, "no register offset specified\n");
   117			return -EINVAL;
   118		}
   119	
   120		led->cdev.brightness_set = pm8058_led_set;
   121		led->cdev.brightness_get = pm8058_led_get;
   122		if (led->ledtype == PM8058_LED_TYPE_COMMON)
   123			maxbright = 31; /* 5 bits */
   124		else
   125			maxbright = 15; /* 4 bits */
   126		led->cdev.max_brightness = maxbright;
   127	
   128		init_data.fwnode = of_fwnode_handle(np);
   129	
 > 130		state = led_init_default_state_get(init_data.fwnode);
   131		switch (state) {
   132		case LEDS_DEFSTATE_ON:
   133			led->cdev.brightness = maxbright;
   134			pm8058_led_set(&led->cdev, maxbright);
   135			break;
   136		case LEDS_DEFSTATE_KEEP:
   137			led->cdev.brightness = pm8058_led_get(&led->cdev);
   138			break;
   139		default:
   140			led->cdev.brightness = LED_OFF;
   141			pm8058_led_set(&led->cdev, LED_OFF);
   142		}
   143	
   144		if (led->ledtype == PM8058_LED_TYPE_KEYPAD ||
   145		    led->ledtype == PM8058_LED_TYPE_FLASH)
   146			led->cdev.flags	= LED_CORE_SUSPENDRESUME;
   147	
   148		ret = devm_led_classdev_register_ext(dev, &led->cdev, &init_data);
   149		if (ret)
   150			dev_err(dev, "Failed to register LED for %pOF\n", np);
   151	
   152		return ret;
   153	}
   154	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ