Re: [PATCH v2 1/2] PCI: mediatek: Use resource_size function on resource object

2019-01-31 Thread Honghui Zhang
On Thu, 2019-01-31 at 15:36 -0600, Bjorn Helgaas wrote: > On Thu, Jan 31, 2019 at 04:01:52PM +0800, honghui.zh...@mediatek.com wrote: > > From: Honghui Zhang > > > > scripts/coccinelle/api/resource_size.cocci complain about the > > following warning: > > > > pcie-mediatek.c:720:13-16: WARNING: S

Re: [PATCH v2 1/2] PCI: mediatek: Use resource_size function on resource object

2019-01-31 Thread Bjorn Helgaas
On Thu, Jan 31, 2019 at 04:01:52PM +0800, honghui.zh...@mediatek.com wrote: > From: Honghui Zhang > > scripts/coccinelle/api/resource_size.cocci complain about the > following warning: > > pcie-mediatek.c:720:13-16: WARNING: Suspicious code. resource_size is maybe > missing with mem > > Use re

[PATCH v2 1/2] PCI: mediatek: Use resource_size function on resource object

2019-01-31 Thread honghui.zhang
From: Honghui Zhang scripts/coccinelle/api/resource_size.cocci complain about the following warning: pcie-mediatek.c:720:13-16: WARNING: Suspicious code. resource_size is maybe missing with mem Use resource_size(mem) instead of mem->end - mem->start to eliminate the complain. Since the MMIO wi