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] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 11 Nov 2022 04:30:10 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Raul E Rangel <rrangel@...omium.org>,
        Bartosz Golaszewski <brgl@...ev.pl>,
        Dmitry Torokhov <dmitry.torokhov@...il.com>,
        linux-gpio@...r.kernel.org, linux-acpi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     oe-kbuild-all@...ts.linux.dev,
        Mika Westerberg <mika.westerberg@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v1 2/2] gpiolib: Get rid of not used of_node member

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on brgl/gpio/for-next]
[also build test ERROR on next-20221110]
[cannot apply to linus/master v6.1-rc4]
[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/gpiolib-of-Drop-redundant-check-in-of_mm_gpiochip_remove/20221109-230741
base:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link:    https://lore.kernel.org/r/20221109150706.38823-2-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 2/2] gpiolib: Get rid of not used of_node member
config: parisc-randconfig-r022-20221110
compiler: hppa-linux-gcc (GCC) 12.1.0
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
        # https://github.com/intel-lab-lkp/linux/commit/5f1308f0c8de844767f5bb944834bf7d71a714c6
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/gpiolib-of-Drop-redundant-check-in-of_mm_gpiochip_remove/20221109-230741
        git checkout 5f1308f0c8de844767f5bb944834bf7d71a714c6
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=parisc SHELL=/bin/bash

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/gpio/gpiolib-of.c: In function 'of_mm_gpiochip_add_data':
>> drivers/gpio/gpiolib-of.c:938:31: error: 'struct gpio_chip' has no member named 'of_node'; did you mean 'fwnode'?
     938 |         of_node_put(mm_gc->gc.of_node);
         |                               ^~~~~~~
         |                               fwnode
   drivers/gpio/gpiolib-of.c:939:19: error: 'struct gpio_chip' has no member named 'of_node'; did you mean 'fwnode'?
     939 |         mm_gc->gc.of_node = of_node_get(np);
         |                   ^~~~~~~
         |                   fwnode


vim +938 drivers/gpio/gpiolib-of.c

863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  897  
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  898  /**
3208b0f0c010b2 drivers/gpio/gpiolib-of.c Linus Walleij      2015-12-04  899   * of_mm_gpiochip_add_data - Add memory mapped GPIO chip (bank)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  900   * @np:		device node of the GPIO chip
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  901   * @mm_gc:	pointer to the of_mm_gpio_chip allocated structure
3208b0f0c010b2 drivers/gpio/gpiolib-of.c Linus Walleij      2015-12-04  902   * @data:	driver data to store in the struct gpio_chip
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  903   *
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  904   * To use this function you should allocate and fill mm_gc with:
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  905   *
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  906   * 1) In the gpio_chip structure:
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  907   *    - all the callbacks
a19e3da5bc5fc6 drivers/of/gpio.c         Anton Vorontsov    2010-06-08  908   *    - of_gpio_n_cells
a19e3da5bc5fc6 drivers/of/gpio.c         Anton Vorontsov    2010-06-08  909   *    - of_xlate callback (optional)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  910   *
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  911   * 3) In the of_mm_gpio_chip structure:
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  912   *    - save_regs callback (optional)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  913   *
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  914   * If succeeded, this function will map bank's memory and will
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  915   * do all necessary work for you. Then you'll able to use .regs
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  916   * to manage GPIOs from the callbacks.
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  917   */
3208b0f0c010b2 drivers/gpio/gpiolib-of.c Linus Walleij      2015-12-04  918  int of_mm_gpiochip_add_data(struct device_node *np,
3208b0f0c010b2 drivers/gpio/gpiolib-of.c Linus Walleij      2015-12-04  919  			    struct of_mm_gpio_chip *mm_gc,
3208b0f0c010b2 drivers/gpio/gpiolib-of.c Linus Walleij      2015-12-04  920  			    void *data)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  921  {
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  922  	int ret = -ENOMEM;
a19e3da5bc5fc6 drivers/of/gpio.c         Anton Vorontsov    2010-06-08  923  	struct gpio_chip *gc = &mm_gc->gc;
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  924  
7eb6ce2f272336 drivers/gpio/gpiolib-of.c Rob Herring        2017-07-18  925  	gc->label = kasprintf(GFP_KERNEL, "%pOF", np);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  926  	if (!gc->label)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  927  		goto err0;
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  928  
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  929  	mm_gc->regs = of_iomap(np, 0);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  930  	if (!mm_gc->regs)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  931  		goto err1;
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  932  
21451155d88587 drivers/of/gpio.c         Anton Vorontsov    2008-04-30  933  	gc->base = -1;
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  934  
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  935  	if (mm_gc->save_regs)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  936  		mm_gc->save_regs(mm_gc);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  937  
5d07a692f9562f drivers/gpio/gpiolib-of.c Liang He           2022-07-11 @938  	of_node_put(mm_gc->gc.of_node);
5d07a692f9562f drivers/gpio/gpiolib-of.c Liang He           2022-07-11  939  	mm_gc->gc.of_node = of_node_get(np);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  940  
3208b0f0c010b2 drivers/gpio/gpiolib-of.c Linus Walleij      2015-12-04  941  	ret = gpiochip_add_data(gc, data);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  942  	if (ret)
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  943  		goto err2;
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  944  
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  945  	return 0;
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  946  err2:
5d07a692f9562f drivers/gpio/gpiolib-of.c Liang He           2022-07-11  947  	of_node_put(np);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  948  	iounmap(mm_gc->regs);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  949  err1:
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  950  	kfree(gc->label);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  951  err0:
7eb6ce2f272336 drivers/gpio/gpiolib-of.c Rob Herring        2017-07-18  952  	pr_err("%pOF: GPIO chip registration failed with status %d\n", np, ret);
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  953  	return ret;
863fbf4966a7ac drivers/of/gpio.c         Anton Vorontsov    2008-04-11  954  }
6d6624554da4a6 drivers/gpio/gpiolib-of.c Geert Uytterhoeven 2019-09-06  955  EXPORT_SYMBOL_GPL(of_mm_gpiochip_add_data);
594fa265e08407 drivers/of/gpio.c         Grant Likely       2010-06-08  956  

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ