* [pci:next 15/20] drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
@ 2018-05-18 19:42 kbuild test robot
2018-05-18 21:03 ` Bjorn Helgaas
0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2018-05-18 19:42 UTC (permalink / raw)
To: Lorenzo Pieralisi; +Cc: kbuild-all, linux-pci, Bjorn Helgaas
tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
head: f8d3ac43d8cd4cfba337a50794c26c7ca89d86ac
commit: 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4 [15/20] Merge branch 'lorenzo/pci/host/misc'
reproduce:
# apt-get install sparse
git checkout 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
>> drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
drivers/pci/host/pcie-altera.c:496:53: left side has type int
drivers/pci/host/pcie-altera.c:496:53: right side has type struct list_head resources
>> drivers/pci/host/pcie-altera.c:495:52: sparse: not enough arguments for function devm_of_pci_get_host_bridge_resources
drivers/pci/host/pcie-altera.c: In function 'altera_pcie_parse_request_of_pci_ranges':
drivers/pci/host/pcie-altera.c:496:11: error: invalid operands to binary & (have 'int' and 'struct list_head')
&pcie->resources, NULL);
^~~~~~~~~~~~~~~~
drivers/pci/host/pcie-altera.c:495:8: error: too few arguments to function 'devm_of_pci_get_host_bridge_resources'
err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/pci/host/pcie-altera.c:20:0:
drivers/pci/host/../pci.h:443:5: note: declared here
int devm_of_pci_get_host_bridge_resources(struct device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
>> /kbuild/src/sparse/drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
/kbuild/src/sparse/drivers/pci/host/pcie-altera.c:496:53: left side has type int
/kbuild/src/sparse/drivers/pci/host/pcie-altera.c:496:53: right side has type struct list_head resources
>> /kbuild/src/sparse/drivers/pci/host/pcie-altera.c:495:52: sparse: not enough arguments for function devm_of_pci_get_host_bridge_resources
/kbuild/src/sparse/drivers/pci/host/pcie-altera.c: In function 'altera_pcie_parse_request_of_pci_ranges':
/kbuild/src/sparse/drivers/pci/host/pcie-altera.c:496:11: error: invalid operands to binary & (have 'int' and 'struct list_head')
&pcie->resources, NULL);
^~~~~~~~~~~~~~~~
/kbuild/src/sparse/drivers/pci/host/pcie-altera.c:495:8: error: too few arguments to function 'devm_of_pci_get_host_bridge_resources'
err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /kbuild/src/sparse/drivers/pci/host/pcie-altera.c:20:0:
/kbuild/src/sparse/drivers/pci/host/../pci.h:443:5: note: declared here
int devm_of_pci_get_host_bridge_resources(struct device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
/kbuild/src/sparse/drivers/pci/host/pcie-rockchip-host.c:996:15: sparse: undefined identifier 'devm_of_pci_get_host_bridge_resources'
>> /kbuild/src/sparse/drivers/pci/host/pcie-rockchip-host.c:996:52: sparse: call with no type!
/kbuild/src/sparse/drivers/pci/host/pcie-rockchip-host.c: In function 'rockchip_pcie_probe':
/kbuild/src/sparse/drivers/pci/host/pcie-rockchip-host.c:996:8: error: implicit declaration of function 'devm_of_pci_get_host_bridge_resources'; did you mean 'pci_get_host_bridge_device'? [-Werror=implicit-function-declaration]
err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pci_get_host_bridge_device
cc1: some warnings being treated as errors
vim +496 drivers/pci/host/pcie-altera.c
eaa6111b Ley Foon Tan 2015-10-23 488
eaa6111b Ley Foon Tan 2015-10-23 489 static int altera_pcie_parse_request_of_pci_ranges(struct altera_pcie *pcie)
eaa6111b Ley Foon Tan 2015-10-23 490 {
eaa6111b Ley Foon Tan 2015-10-23 491 int err, res_valid = 0;
eaa6111b Ley Foon Tan 2015-10-23 492 struct device *dev = &pcie->pdev->dev;
eaa6111b Ley Foon Tan 2015-10-23 493 struct resource_entry *win;
eaa6111b Ley Foon Tan 2015-10-23 494
d96b407b Jan Kiszka 2018-05-15 @495 err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff
88e3909a Jan Kiszka 2018-05-15 @496 &pcie->resources, NULL);
eaa6111b Ley Foon Tan 2015-10-23 497 if (err)
eaa6111b Ley Foon Tan 2015-10-23 498 return err;
eaa6111b Ley Foon Tan 2015-10-23 499
74462284 Bjorn Helgaas 2016-05-31 500 err = devm_request_pci_bus_resources(dev, &pcie->resources);
74462284 Bjorn Helgaas 2016-05-31 501 if (err)
74462284 Bjorn Helgaas 2016-05-31 502 goto out_release_res;
74462284 Bjorn Helgaas 2016-05-31 503
eaa6111b Ley Foon Tan 2015-10-23 504 resource_list_for_each_entry(win, &pcie->resources) {
74462284 Bjorn Helgaas 2016-05-31 505 struct resource *res = win->res;
eaa6111b Ley Foon Tan 2015-10-23 506
ba4f6d92 Bjorn Helgaas 2016-05-28 507 if (resource_type(res) == IORESOURCE_MEM)
eaa6111b Ley Foon Tan 2015-10-23 508 res_valid |= !(res->flags & IORESOURCE_PREFETCH);
eaa6111b Ley Foon Tan 2015-10-23 509 }
eaa6111b Ley Foon Tan 2015-10-23 510
ba4f6d92 Bjorn Helgaas 2016-05-28 511 if (res_valid)
ba4f6d92 Bjorn Helgaas 2016-05-28 512 return 0;
ba4f6d92 Bjorn Helgaas 2016-05-28 513
eaa6111b Ley Foon Tan 2015-10-23 514 dev_err(dev, "non-prefetchable memory resource required\n");
eaa6111b Ley Foon Tan 2015-10-23 515 err = -EINVAL;
eaa6111b Ley Foon Tan 2015-10-23 516
eaa6111b Ley Foon Tan 2015-10-23 517 out_release_res:
ba4f6d92 Bjorn Helgaas 2016-05-28 518 pci_free_resource_list(&pcie->resources);
eaa6111b Ley Foon Tan 2015-10-23 519 return err;
eaa6111b Ley Foon Tan 2015-10-23 520 }
eaa6111b Ley Foon Tan 2015-10-23 521
:::::: The code at line 496 was first introduced by commit
:::::: 88e3909aa1253bb4d41a54d7f4c851d52a470a3a PCI: Pass struct device to of_pci_get_host_bridge_resources()
:::::: TO: Jan Kiszka <jan.kiszka@siemens.com>
:::::: CC: Bjorn Helgaas <helgaas@kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pci:next 15/20] drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
2018-05-18 19:42 [pci:next 15/20] drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&) kbuild test robot
@ 2018-05-18 21:03 ` Bjorn Helgaas
2018-05-19 8:06 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Bjorn Helgaas @ 2018-05-18 21:03 UTC (permalink / raw)
To: kbuild test robot
Cc: Lorenzo Pieralisi, kbuild-all, linux-pci, Bjorn Helgaas, Jan Kiszka
On Sat, May 19, 2018 at 03:42:27AM +0800, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
> head: f8d3ac43d8cd4cfba337a50794c26c7ca89d86ac
> commit: 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4 [15/20] Merge branch 'lorenzo/pci/host/misc'
> reproduce:
> # apt-get install sparse
> git checkout 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4
> make ARCH=x86_64 allmodconfig
> make C=1 CF=-D__CHECK_ENDIAN__
>
>
> sparse warnings: (new ones prefixed by >>)
>
> >> drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
I think I fixed this; it was missing a comma at the end of the first line:
err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff
&pcie->resources, NULL);
This error was in the original patch, so I'm not sure if I forgot to push
the pci/resource branch or if kbuild didn't test it for some reason.
> /kbuild/src/sparse/drivers/pci/host/pcie-rockchip-host.c:996:15: sparse: undefined identifier 'devm_of_pci_get_host_bridge_resources'
I'm confused about this one because pcie-rockchip-host.c doesn't even exist
in 927da40afdbd, so the steps to reproduce must not be quite right.
But I'm sure I screwed up a conflict resolution somewhere, so I'll find that,
too.
Bjorn
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pci:next 15/20] drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
2018-05-18 21:03 ` Bjorn Helgaas
@ 2018-05-19 8:06 ` Jan Kiszka
2018-05-19 9:36 ` Jan Kiszka
0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2018-05-19 8:06 UTC (permalink / raw)
To: Bjorn Helgaas, kbuild test robot
Cc: Lorenzo Pieralisi, kbuild-all, linux-pci, Bjorn Helgaas
On 2018-05-18 23:03, Bjorn Helgaas wrote:
> On Sat, May 19, 2018 at 03:42:27AM +0800, kbuild test robot wrote:
>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
>> head: f8d3ac43d8cd4cfba337a50794c26c7ca89d86ac
>> commit: 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4 [15/20] Merge branch 'lorenzo/pci/host/misc'
>> reproduce:
>> # apt-get install sparse
>> git checkout 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4
>> make ARCH=x86_64 allmodconfig
>> make C=1 CF=-D__CHECK_ENDIAN__
>>
>>
>> sparse warnings: (new ones prefixed by >>)
>>
>>>> drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
>
> I think I fixed this; it was missing a comma at the end of the first line:
>
> err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff
> &pcie->resources, NULL);
>
> This error was in the original patch, so I'm not sure if I forgot to push
> the pci/resource branch or if kbuild didn't test it for some reason.
>
>> /kbuild/src/sparse/drivers/pci/host/pcie-rockchip-host.c:996:15: sparse: undefined identifier 'devm_of_pci_get_host_bridge_resources'
>
> I'm confused about this one because pcie-rockchip-host.c doesn't even exist
> in 927da40afdbd, so the steps to reproduce must not be quite right.
>
> But I'm sure I screwed up a conflict resolution somewhere, so I'll find that,
> too.
No, this should be really just be a missing "," in my original patch
"PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources
with device".
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pci:next 15/20] drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
2018-05-19 8:06 ` Jan Kiszka
@ 2018-05-19 9:36 ` Jan Kiszka
0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2018-05-19 9:36 UTC (permalink / raw)
To: Bjorn Helgaas, kbuild test robot
Cc: Lorenzo Pieralisi, kbuild-all, linux-pci, Bjorn Helgaas
On 2018-05-19 10:06, Jan Kiszka wrote:
> On 2018-05-18 23:03, Bjorn Helgaas wrote:
>> On Sat, May 19, 2018 at 03:42:27AM +0800, kbuild test robot wrote:
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
>>> head: f8d3ac43d8cd4cfba337a50794c26c7ca89d86ac
>>> commit: 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4 [15/20] Merge branch 'lorenzo/pci/host/misc'
>>> reproduce:
>>> # apt-get install sparse
>>> git checkout 927da40afdbd6a5fdd31eab6e9aa655dee1f99a4
>>> make ARCH=x86_64 allmodconfig
>>> make C=1 CF=-D__CHECK_ENDIAN__
>>>
>>>
>>> sparse warnings: (new ones prefixed by >>)
>>>
>>>>> drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&)
>>
>> I think I fixed this; it was missing a comma at the end of the first line:
>>
>> err = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff
>> &pcie->resources, NULL);
>>
>> This error was in the original patch, so I'm not sure if I forgot to push
>> the pci/resource branch or if kbuild didn't test it for some reason.
>>
>>> /kbuild/src/sparse/drivers/pci/host/pcie-rockchip-host.c:996:15: sparse: undefined identifier 'devm_of_pci_get_host_bridge_resources'
>>
>> I'm confused about this one because pcie-rockchip-host.c doesn't even exist
>> in 927da40afdbd, so the steps to reproduce must not be quite right.
>>
>> But I'm sure I screwed up a conflict resolution somewhere, so I'll find that,
>> too.
>
> No, this should be really just be a missing "," in my original patch
> "PCI: Replace dev_node parameter of of_pci_get_host_bridge_resources
> with device".
Err, that reply was too fast: The second issue seem to be related to
moving devm_of_pci_get_host_bridge_resources() prototypes around into
the private pci.h. The above mentioned head
f8d3ac43d8cd4cfba337a50794c26c7ca89d86ac lacks the required new include
in pcie-rockchip-host.c (because
9e2aee80c78d5084e0c58745e9762c29da6bd53f targeted pcie-rockchip.c).
But it seems you fixed that in your next revision by now.
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-19 9:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 19:42 [pci:next 15/20] drivers/pci/host/pcie-altera.c:496:53: sparse: incompatible types for operation (&) kbuild test robot
2018-05-18 21:03 ` Bjorn Helgaas
2018-05-19 8:06 ` Jan Kiszka
2018-05-19 9:36 ` Jan Kiszka
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.