diff mbox

drivers:hv: fix resource_size.cocci warnings

Message ID 20160401221710.GA86592@lkp-hsx03 (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

kernel test robot April 1, 2016, 10:17 p.m. UTC
drivers/hv/vmbus_drv.c:1099:15-18: ERROR: Missing resource_size with fb_mmio


 Use resource_size function on resource object
 instead of explicit computation.

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

CC: Jake Oshins <jakeo@microsoft.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

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

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -1096,7 +1096,7 @@  static int vmbus_acpi_remove(struct acpi
 	if (hyperv_mmio) {
 		if (fb_mmio) {
 			__release_region(hyperv_mmio, fb_mmio->start,
-					 fb_mmio->end - fb_mmio->start + 1);
+					 resource_size(fb_mmio));
 			fb_mmio = NULL;
 		}