[PATCH] drivers:hv: fix resource_size.cocci warnings

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

 



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@xxxxxxxxxxxxx>
Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
---

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

--- 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;
 		}
 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux