All of lore.kernel.org
 help / color / mirror / Atom feed
* [gpio:devel-hierarchical-irqchip 44/62] drivers//gpio/gpio-amd-fch.c:173:49: warning: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type
@ 2019-06-26  0:06 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-06-26  0:06 UTC (permalink / raw)
  To: Enrico Weigelt; +Cc: kbuild-all, linux-gpio, Linus Walleij

[-- Attachment #1: Type: text/plain, Size: 5672 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git devel-hierarchical-irqchip
head:   9b22e3be56602f4f7b2a1a05414d093ed607e6cf
commit: 9bb2e04525087b7d9f786aa5e68a167187576dbe [44/62] gpio: amd: Make resource struct const
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 9bb2e04525087b7d9f786aa5e68a167187576dbe
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers//gpio/gpio-amd-fch.c: In function 'amd_fch_gpio_probe':
>> drivers//gpio/gpio-amd-fch.c:173:49: warning: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
     priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores);
                                                    ^
   In file included from include/linux/platform_device.h:14:0,
                    from drivers//gpio/gpio-amd-fch.c:15:
   include/linux/device.h:707:15: note: expected 'struct resource *' but argument is of type 'const struct resource *'
    void __iomem *devm_ioremap_resource(struct device *dev, struct resource *res);
                  ^~~~~~~~~~~~~~~~~~~~~

vim +173 drivers//gpio/gpio-amd-fch.c

e09d168f Enrico Weigelt, metux IT consult 2019-02-22  139  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  140  static int amd_fch_gpio_probe(struct platform_device *pdev)
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  141  {
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  142  	struct amd_fch_gpio_priv *priv;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  143  	struct amd_fch_gpio_pdata *pdata;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  144  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  145  	pdata = dev_get_platdata(&pdev->dev);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  146  	if (!pdata) {
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  147  		dev_err(&pdev->dev, "no platform_data\n");
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  148  		return -ENOENT;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  149  	}
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  150  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  151  	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  152  	if (!priv)
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  153  		return -ENOMEM;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  154  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  155  	priv->pdata	= pdata;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  156  	priv->pdev	= pdev;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  157  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  158  	priv->gc.owner			= THIS_MODULE;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  159  	priv->gc.parent			= &pdev->dev;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  160  	priv->gc.label			= dev_name(&pdev->dev);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  161  	priv->gc.ngpio			= priv->pdata->gpio_num;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  162  	priv->gc.names			= priv->pdata->gpio_names;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  163  	priv->gc.base			= -1;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  164  	priv->gc.request		= amd_fch_gpio_request;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  165  	priv->gc.direction_input	= amd_fch_gpio_direction_input;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  166  	priv->gc.direction_output	= amd_fch_gpio_direction_output;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  167  	priv->gc.get_direction		= amd_fch_gpio_get_direction;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  168  	priv->gc.get			= amd_fch_gpio_get;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  169  	priv->gc.set			= amd_fch_gpio_set;
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  170  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  171  	spin_lock_init(&priv->lock);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  172  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22 @173  	priv->base = devm_ioremap_resource(&pdev->dev, &amd_fch_gpio_iores);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  174  	if (IS_ERR(priv->base))
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  175  		return PTR_ERR(priv->base);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  176  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  177  	platform_set_drvdata(pdev, priv);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  178  
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  179  	return devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv);
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  180  }
e09d168f Enrico Weigelt, metux IT consult 2019-02-22  181  

:::::: The code at line 173 was first introduced by commit
:::::: e09d168f13f0d63df7fe095d52be04c16cbe1cef gpio: AMD G-Series PCH gpio driver

:::::: TO: Enrico Weigelt, metux IT consult <info@metux.net>
:::::: CC: Linus Walleij <linus.walleij@linaro.org>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 58605 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-06-26  0:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26  0:06 [gpio:devel-hierarchical-irqchip 44/62] drivers//gpio/gpio-amd-fch.c:173:49: warning: passing argument 2 of 'devm_ioremap_resource' discards 'const' qualifier from pointer target type kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.