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]
Message-ID: <202301131404.Ck0kg0To-lkp@intel.com>
Date:   Fri, 13 Jan 2023 14:45:49 +0800
From:   kernel test robot <lkp@...el.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     llvm@...ts.linux.dev, oe-kbuild-all@...ts.linux.dev,
        Linus Walleij <linus.walleij@...aro.org>
Subject: Re: [PATCH v1 2/2] gpio: wcd934x: Use proper headers and drop
 OF_GPIO dependency

Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on brgl/gpio/for-next]
[also build test ERROR on linus/master v6.2-rc3 next-20230112]
[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/gpio-wcd934x-Use-proper-headers-and-drop-OF_GPIO-dependency/20230113-005747
base:   https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next
patch link:    https://lore.kernel.org/r/20230112163920.73102-2-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 2/2] gpio: wcd934x: Use proper headers and drop OF_GPIO dependency
config: x86_64-randconfig-a016
compiler: clang version 14.0.6 (https://github.com/llvm/llvm-project f28c006a5895fc0e329fe15fead81e37457cb1d1)
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/7f9eb073b194585975007c28b381b96cd89b5c7a
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Andy-Shevchenko/gpio-wcd934x-Use-proper-headers-and-drop-OF_GPIO-dependency/20230113-005747
        git checkout 7f9eb073b194585975007c28b381b96cd89b5c7a
        # 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=x86_64 olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 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/gpio-wcd934x.c:76:34: warning: declaration of 'struct platform_device' will not be visible outside of this function [-Wvisibility]
   static int wcd_gpio_probe(struct platform_device *pdev)
                                    ^
>> drivers/gpio/gpio-wcd934x.c:78:28: error: incomplete definition of type 'struct platform_device'
           struct device *dev = &pdev->dev;
                                 ~~~~^
   drivers/gpio/gpio-wcd934x.c:76:34: note: forward declaration of 'struct platform_device'
   static int wcd_gpio_probe(struct platform_device *pdev)
                                    ^
>> drivers/gpio/gpio-wcd934x.c:114:31: error: variable has incomplete type 'struct platform_driver'
   static struct platform_driver wcd_gpio_driver = {
                                 ^
   drivers/gpio/gpio-wcd934x.c:114:15: note: forward declaration of 'struct platform_driver'
   static struct platform_driver wcd_gpio_driver = {
                 ^
>> drivers/gpio/gpio-wcd934x.c:122:1: error: type specifier missing, defaults to 'int' [-Werror,-Wimplicit-int]
   module_platform_driver(wcd_gpio_driver);
   ^
>> drivers/gpio/gpio-wcd934x.c:122:24: error: a parameter list without types is only allowed in a function definition
   module_platform_driver(wcd_gpio_driver);
                          ^
   1 warning and 4 errors generated.


vim +78 drivers/gpio/gpio-wcd934x.c

59c324683400b4 Srinivas Kandagatla 2020-01-07   75  
59c324683400b4 Srinivas Kandagatla 2020-01-07   76  static int wcd_gpio_probe(struct platform_device *pdev)
59c324683400b4 Srinivas Kandagatla 2020-01-07   77  {
59c324683400b4 Srinivas Kandagatla 2020-01-07  @78  	struct device *dev = &pdev->dev;
59c324683400b4 Srinivas Kandagatla 2020-01-07   79  	struct wcd_gpio_data *data;
59c324683400b4 Srinivas Kandagatla 2020-01-07   80  	struct gpio_chip *chip;
59c324683400b4 Srinivas Kandagatla 2020-01-07   81  
59c324683400b4 Srinivas Kandagatla 2020-01-07   82  	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
59c324683400b4 Srinivas Kandagatla 2020-01-07   83  	if (!data)
59c324683400b4 Srinivas Kandagatla 2020-01-07   84  		return -ENOMEM;
59c324683400b4 Srinivas Kandagatla 2020-01-07   85  
59c324683400b4 Srinivas Kandagatla 2020-01-07   86  	data->map = dev_get_regmap(dev->parent, NULL);
59c324683400b4 Srinivas Kandagatla 2020-01-07   87  	if (!data->map) {
59c324683400b4 Srinivas Kandagatla 2020-01-07   88  		dev_err(dev, "%s: failed to get regmap\n", __func__);
59c324683400b4 Srinivas Kandagatla 2020-01-07   89  		return  -EINVAL;
59c324683400b4 Srinivas Kandagatla 2020-01-07   90  	}
59c324683400b4 Srinivas Kandagatla 2020-01-07   91  
59c324683400b4 Srinivas Kandagatla 2020-01-07   92  	chip = &data->chip;
59c324683400b4 Srinivas Kandagatla 2020-01-07   93  	chip->direction_input  = wcd_gpio_direction_input;
59c324683400b4 Srinivas Kandagatla 2020-01-07   94  	chip->direction_output = wcd_gpio_direction_output;
59c324683400b4 Srinivas Kandagatla 2020-01-07   95  	chip->get_direction = wcd_gpio_get_direction;
59c324683400b4 Srinivas Kandagatla 2020-01-07   96  	chip->get = wcd_gpio_get;
59c324683400b4 Srinivas Kandagatla 2020-01-07   97  	chip->set = wcd_gpio_set;
59c324683400b4 Srinivas Kandagatla 2020-01-07   98  	chip->parent = dev;
59c324683400b4 Srinivas Kandagatla 2020-01-07   99  	chip->base = -1;
59c324683400b4 Srinivas Kandagatla 2020-01-07  100  	chip->ngpio = WCD934X_NPINS;
59c324683400b4 Srinivas Kandagatla 2020-01-07  101  	chip->label = dev_name(dev);
59c324683400b4 Srinivas Kandagatla 2020-01-07  102  	chip->can_sleep = false;
59c324683400b4 Srinivas Kandagatla 2020-01-07  103  
59c324683400b4 Srinivas Kandagatla 2020-01-07  104  	return devm_gpiochip_add_data(dev, chip, data);
59c324683400b4 Srinivas Kandagatla 2020-01-07  105  }
59c324683400b4 Srinivas Kandagatla 2020-01-07  106  
59c324683400b4 Srinivas Kandagatla 2020-01-07  107  static const struct of_device_id wcd_gpio_of_match[] = {
59c324683400b4 Srinivas Kandagatla 2020-01-07  108  	{ .compatible = "qcom,wcd9340-gpio" },
59c324683400b4 Srinivas Kandagatla 2020-01-07  109  	{ .compatible = "qcom,wcd9341-gpio" },
59c324683400b4 Srinivas Kandagatla 2020-01-07  110  	{ }
59c324683400b4 Srinivas Kandagatla 2020-01-07  111  };
59c324683400b4 Srinivas Kandagatla 2020-01-07  112  MODULE_DEVICE_TABLE(of, wcd_gpio_of_match);
59c324683400b4 Srinivas Kandagatla 2020-01-07  113  
59c324683400b4 Srinivas Kandagatla 2020-01-07 @114  static struct platform_driver wcd_gpio_driver = {
59c324683400b4 Srinivas Kandagatla 2020-01-07  115  	.driver = {
59c324683400b4 Srinivas Kandagatla 2020-01-07  116  		   .name = "wcd934x-gpio",
59c324683400b4 Srinivas Kandagatla 2020-01-07  117  		   .of_match_table = wcd_gpio_of_match,
59c324683400b4 Srinivas Kandagatla 2020-01-07  118  	},
59c324683400b4 Srinivas Kandagatla 2020-01-07  119  	.probe = wcd_gpio_probe,
59c324683400b4 Srinivas Kandagatla 2020-01-07  120  };
59c324683400b4 Srinivas Kandagatla 2020-01-07  121  
59c324683400b4 Srinivas Kandagatla 2020-01-07 @122  module_platform_driver(wcd_gpio_driver);

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ