[PATCH] PCI: brcmstb: fix resource_size.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: kbuild test robot <lkp@xxxxxxxxx>

drivers/pci/controller/pcie-brcmstb.c:552:13-16: ERROR: Missing resource_size with res


 Use resource_size function on resource object
 instead of explicit computation.

Generated by: scripts/coccinelle/api/resource_size.cocci

Fixes: 8ad90d975e00 ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver")
CC: Jim Quinlan <james.quinlan@xxxxxxxxxxxx>
Signed-off-by: kbuild test robot <lkp@xxxxxxxxx>
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   702ccea170f07783bd002055a353a0866c062267
commit: 8ad90d975e00c297a198f6ecbd65e414fbb06dc9 [8319/11283] PCI: brcmstb: Add Broadcom STB PCIe host controller driver

 pcie-brcmstb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -549,7 +549,7 @@ static int brcm_pcie_setup(struct brcm_p
 
 		brcm_pcie_set_outbound_win(pcie, num_out_wins, res->start,
 					   res->start - entry->offset,
-					   res->end - res->start + 1);
+					   resource_size(res));
 		num_out_wins++;
 	}
 



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux