* sparse warnings
@ 2020-07-29 19:48 Bjorn Helgaas
2020-09-30 22:39 ` Bjorn Helgaas
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2020-07-29 19:48 UTC (permalink / raw)
To: Jingoo Han, Gustavo Pimentel, Kishon Vijay Abraham I; +Cc: linux-pci
Just FYI, I see the following sparse warnings (among others):
$ make C=2 drivers/pci/
drivers/pci/endpoint/functions/pci-epf-test.c:288:24: warning: incorrect type in argument 1 (different address spaces)
drivers/pci/endpoint/functions/pci-epf-test.c:288:24: expected void *to
drivers/pci/endpoint/functions/pci-epf-test.c:288:24: got void [noderef] <asn:2> *[assigned] dst_addr
drivers/pci/endpoint/functions/pci-epf-test.c:288:34: warning: incorrect type in argument 2 (different address spaces)
drivers/pci/endpoint/functions/pci-epf-test.c:288:34: expected void const *from
drivers/pci/endpoint/functions/pci-epf-test.c:288:34: got void [noderef] <asn:2> *[assigned] src_addr
drivers/pci/controller/dwc/pcie-designware.c:447:52: warning: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)
It'd be nice to fix these if it's practical.
There are a bunch more sparse warnings about pci_power_t in the
generic code. Not sure what those would involve, so they're a problem
for another day.
Bjorn
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sparse warnings
2020-07-29 19:48 sparse warnings Bjorn Helgaas
@ 2020-09-30 22:39 ` Bjorn Helgaas
2020-10-01 6:29 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 3+ messages in thread
From: Bjorn Helgaas @ 2020-09-30 22:39 UTC (permalink / raw)
To: Jingoo Han, Gustavo Pimentel, Kishon Vijay Abraham I; +Cc: linux-pci
On Wed, Jul 29, 2020 at 02:48:15PM -0500, Bjorn Helgaas wrote:
> Just FYI, I see the following sparse warnings (among others):
>
> $ make C=2 drivers/pci/
>
> drivers/pci/endpoint/functions/pci-epf-test.c:288:24: warning: incorrect type in argument 1 (different address spaces)
> drivers/pci/endpoint/functions/pci-epf-test.c:288:24: expected void *to
> drivers/pci/endpoint/functions/pci-epf-test.c:288:24: got void [noderef] <asn:2> *[assigned] dst_addr
> drivers/pci/endpoint/functions/pci-epf-test.c:288:34: warning: incorrect type in argument 2 (different address spaces)
> drivers/pci/endpoint/functions/pci-epf-test.c:288:34: expected void const *from
> drivers/pci/endpoint/functions/pci-epf-test.c:288:34: got void [noderef] <asn:2> *[assigned] src_addr
>
> drivers/pci/controller/dwc/pcie-designware.c:447:52: warning: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)
>
> It'd be nice to fix these if it's practical.
Any ideas about these?
Bjorn
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: sparse warnings
2020-09-30 22:39 ` Bjorn Helgaas
@ 2020-10-01 6:29 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2020-10-01 6:29 UTC (permalink / raw)
To: Bjorn Helgaas, Jingoo Han, Gustavo Pimentel, Lorenzo Pieralisi,
Rob Herring
Cc: linux-pci
+RobH, Lorenzo
Hi Bjorn,
On 01/10/20 4:09 am, Bjorn Helgaas wrote:
> On Wed, Jul 29, 2020 at 02:48:15PM -0500, Bjorn Helgaas wrote:
>> Just FYI, I see the following sparse warnings (among others):
>>
>> $ make C=2 drivers/pci/
>>
>> drivers/pci/endpoint/functions/pci-epf-test.c:288:24: warning: incorrect type in argument 1 (different address spaces)
>> drivers/pci/endpoint/functions/pci-epf-test.c:288:24: expected void *to
>> drivers/pci/endpoint/functions/pci-epf-test.c:288:24: got void [noderef] <asn:2> *[assigned] dst_addr
>> drivers/pci/endpoint/functions/pci-epf-test.c:288:34: warning: incorrect type in argument 2 (different address spaces)
>> drivers/pci/endpoint/functions/pci-epf-test.c:288:34: expected void const *from
>> drivers/pci/endpoint/functions/pci-epf-test.c:288:34: got void [noderef] <asn:2> *[assigned] src_addr
>>
>> drivers/pci/controller/dwc/pcie-designware.c:447:52: warning: cast truncates bits from constant value (ffffffff7fffffff becomes 7fffffff)
>>
>> It'd be nice to fix these if it's practical.
>
> Any ideas about these?
pci-epf-test here uses memcpy() to copy data from one memory mapped IO
address to other memory mapped IO address. Other places in this driver
uses memcpy_fromio() and memcpy_toio() since only one of them is memory
mapped IO address.
So the option is to either use memcpy_fromio() to copy data from IO to
temporary buffer and then use memcpy_toio() to copy data from the
temporary buffer to the memory mapped IO or create a new variant
[memcpy_fromtoio()?] that takes both memory mapped IO address.
Thanks
Kishon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-10-01 6:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 19:48 sparse warnings Bjorn Helgaas
2020-09-30 22:39 ` Bjorn Helgaas
2020-10-01 6:29 ` Kishon Vijay Abraham I
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).