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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 9 Nov 2022 06:30:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     chengwei <larry.lai@...jingtech.com>, lee@...nel.org,
        andriy.shevchenko@...ux.intel.com, linus.walleij@...aro.org,
        pavel@....cz
Cc:     oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
        linux-gpio@...r.kernel.org, linux-leds@...r.kernel.org,
        GaryWang@...on.com.tw, musa.lin@...jingtech.com,
        jack.chang@...jingtech.com, noah.hung@...jingtech.com,
        chengwei <larry.lai@...jingtech.com>,
        Javier Arteaga <javier@...tex.com>,
        Nicola Lunghi <nicola.lunghi@...tex.com>
Subject: Re: [PATCH V2 1/3] mfd: Add support for UP board CPLD/FPGA

Hi chengwei,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on lee-mfd/for-mfd-next]
[also build test WARNING on linusw-pinctrl/devel linusw-pinctrl/for-next]
[cannot apply to lee-mfd/for-mfd-fixes]
[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/chengwei/Add-support-control-UP-board-CPLD-FPGA-pin-control/20221109-004228
base:   https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git for-mfd-next
patch link:    https://lore.kernel.org/r/20221108163852.15926-2-larry.lai%40yunjingtech.com
patch subject: [PATCH V2 1/3] mfd: Add support for UP board CPLD/FPGA
config: x86_64-allyesconfig
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/intel-lab-lkp/linux/commit/832820af7fd3dd23d4901a7c870d6702528b80b6
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review chengwei/Add-support-control-UP-board-CPLD-FPGA-pin-control/20221109-004228
        git checkout 832820af7fd3dd23d4901a7c870d6702528b80b6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/mfd/ drivers/pinctrl/

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

All warnings (new ones prefixed by >>):

>> drivers/mfd/upboard-fpga.c:362:6: warning: no previous prototype for 'upboard_led_gpio_init' [-Wmissing-prototypes]
     362 | void upboard_led_gpio_init(struct upboard_fpga *fpga)
         |      ^~~~~~~~~~~~~~~~~~~~~
   drivers/mfd/upboard-fpga.c: In function 'upboard_led_gpio_init':
>> drivers/mfd/upboard-fpga.c:396:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     396 |         static struct gpio_led upboard_gpio_leds[8];
         |         ^~~~~~
   drivers/mfd/upboard-fpga.c:424:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     424 |         static struct gpio_led_platform_data upboard_gpio_led_platform_data;
         |         ^~~~~~
   drivers/mfd/upboard-fpga.c:429:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
     429 |         static const struct mfd_cell upboard_gpio_led_cells[] = {
         |         ^~~~~~


vim +/upboard_led_gpio_init +362 drivers/mfd/upboard-fpga.c

   361	
 > 362	void upboard_led_gpio_init(struct upboard_fpga *fpga)
   363	{
   364		struct gpio_led blue_led, yellow_led, green_led, red_led;
   365		struct gpio_desc *desc;
   366		int blue_gpio = -1, yellow_gpio = -1, green_gpio = -1, red_gpio = -1, leds = 0;
   367	
   368		desc = devm_gpiod_get(fpga->dev, "blue", GPIOD_OUT_LOW);
   369		if (!IS_ERR(desc)) {
   370			blue_gpio = desc_to_gpio(desc);
   371			leds++;
   372			devm_gpiod_put(fpga->dev, desc);
   373		}
   374		desc = devm_gpiod_get(fpga->dev, "yellow", GPIOD_OUT_LOW);
   375		if (!IS_ERR(desc)) {
   376			yellow_gpio = desc_to_gpio(desc);
   377			leds++;
   378			devm_gpiod_put(fpga->dev, desc);
   379		}
   380		desc = devm_gpiod_get(fpga->dev, "green", GPIOD_OUT_LOW);
   381		if (!IS_ERR(desc)) {
   382			green_gpio = desc_to_gpio(desc);
   383			leds++;
   384			devm_gpiod_put(fpga->dev, desc);
   385		}
   386		desc = devm_gpiod_get(fpga->dev, "red", GPIOD_OUT_LOW);
   387		if (!IS_ERR(desc)) {
   388			red_gpio = desc_to_gpio(desc);
   389			leds++;
   390			devm_gpiod_put(fpga->dev, desc);
   391		}
   392	
   393		if (leds == 0)	//no leds
   394			return;
   395	
 > 396		static struct gpio_led upboard_gpio_leds[8];
   397	
   398		leds = 0;
   399		if (blue_gpio > -1) {
   400			blue_led.name = "upboard:blue:";
   401			blue_led.gpio = blue_gpio;
   402			blue_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
   403			upboard_gpio_leds[leds++] = blue_led;
   404		}
   405		if (yellow_gpio > -1) {
   406			yellow_led.name = "upboard:yellow:";
   407			yellow_led.gpio = yellow_gpio;
   408			yellow_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
   409			upboard_gpio_leds[leds++] = yellow_led;
   410		}
   411		if (green_gpio > -1) {
   412			green_led.name = "upboard:green:";
   413			green_led.gpio = green_gpio;
   414			green_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
   415			upboard_gpio_leds[leds++] = green_led;
   416		}
   417		if (red_gpio > -1) {
   418			red_led.name = "upboard:red:";
   419			red_led.gpio = red_gpio;
   420			red_led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
   421			upboard_gpio_leds[leds++] = red_led;
   422		}
   423	
   424		static struct gpio_led_platform_data upboard_gpio_led_platform_data;
   425	
   426		upboard_gpio_led_platform_data.num_leds = leds;
   427		upboard_gpio_led_platform_data.leds = upboard_gpio_leds;
   428	
   429		static const struct mfd_cell upboard_gpio_led_cells[] = {
   430			{
   431				.name = "leds-gpio",
   432				.id = 0,
   433				.platform_data = &upboard_gpio_led_platform_data,
   434				.pdata_size = sizeof(upboard_gpio_led_platform_data),
   435			},
   436		};
   437	
   438		if (devm_mfd_add_devices(fpga->dev, UPBOARD_DEVID,
   439					 upboard_gpio_led_cells,
   440					 ARRAY_SIZE(upboard_gpio_led_cells),
   441					 NULL, 0, NULL)) {
   442			dev_info(fpga->dev, "Failed to add GPIO leds");
   443		}
   444	}
   445	

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

View attachment "config" of type "text/plain" (291990 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ