um: virt-pci: Fix the application of sizeof to pointer
PATCH 1/1 um: virt-pci: Fix the application of sizeof to pointer
sizeof() when applied to a pointer typed expression gives the size of the pointer.
Clean up coccicheck warning:
./arch/um/drivers/virt-pci.c:192:20-26: ERROR: application of sizeof to pointer
--- arch/um/drivers/virt-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/um/drivers/virt-pci.c +1 -1
@@ -189,7 +189,7 @@ static unsigned long um_pci_cfgspace_read(void *priv, unsigned int offset, buf =get_cpu_var (um_pci_msg_bufs); data = buf->data; -memset (data,0xff ,sizeof (data)); +memset (data,0xff ,sizeof (*data));switch (size) {case 1 :
Signature · 1 line
1.8.3.1
arch/um/drivers/virt-pci.c static unsigned long um_pci_cfgspace_read(void *priv, unsigned int offset, · line 192
Quoted 10 lines · Yang Li
sizeof()when applied to a pointer typed expression gives the size of the pointer.Clean up coccicheck warning:
./arch/um/drivers/virt-pci.c:192:20-26: ERROR: application of sizeof to pointerarch/um/drivers/virt-pci.c +1
-1-memset (data,0xff ,sizeof (data)); +memset (data,0xff ,sizeof (*data));
Oops. I guess I only tested on 64-bit where this is the same, and in fact on 32-bit it also wouldn't matter since you can't even do 64-bit reads there :)
A Fixes: tag would be nice, but otherwise
johannes
_______________________________________________
linux-um mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-um