[Xen-devel] [PATCH] xen/privcmd: remove unused variable pageidx

2017-11-08 Thread Colin King
From: Colin Ian King Variable pageidx is assigned a value but it is never read, hence it is redundant and can be removed. Cleans up clang warning: drivers/xen/privcmd.c:199:2: warning: Value stored to 'pageidx' is never read Signed-off-by: Colin Ian King --- drivers/xen/privcmd.c | 3 --- 1 f

[Xen-devel] [PATCH] xen/pvcalls: remove redundant check for irq >= 0

2017-11-03 Thread Colin King
From: Colin Ian King This is a moot point, but irq is always less than zero at the label out_error, so the check for irq >= 0 is redundant and can be removed. Detected by CoverityScan, CID#1460371 ("Logically dead code") Fixes: cb1c7d9bbc87 ("xen/pvcalls: implement connect command") Signed-off-

[Xen-devel] [PATCH] xen/pvcalls: fix unsigned less than zero error check

2017-11-03 Thread Colin King
From: Colin Ian King The check on bedata->ref is never true because ref is an unsigned integer. Fix this by assigning signed int ret to the return of the call to gnttab_claim_grant_reference so the -ve return can be checked. Detected by CoverityScan, CID#1460358 ("Unsigned compared against 0")

[Xen-devel] [PATCH][V2] x86/xen: clean up clang build warning

2017-09-18 Thread Colin King
From: Colin Ian King In the case where sizeof(maddr) != sizeof(long) p is initialized and never read and clang throws a warning on this. Move declaration of p to clean up the clang build warning: warning: Value stored to 'p' during its initialization is never read Signed-off-by: Colin Ian King

[Xen-devel] [PATCH] x86/xen: clean up clang build warning

2017-09-18 Thread Colin King
From: Colin Ian King In the case where sizeof(maddr) != sizeof(long) p is initialized and never read and clang throws a warning on this. Move declaration of p to clean up the clang build warning: warning: Value stored to 'p' during its initialization is never read Signed-off-by: Colin Ian King

[Xen-devel] [PATCH][xen-next] xen/pvcalls: fix null pointer reference on sock_release call

2017-07-11 Thread Colin King
From: Colin Ian King Currently a sock_release on map->sock will result in a null pointer deference on map when map is null. Instead, the sock_relase sould be on sock and not map->sock. Detected by CoverityScan, CID#1450169 ("Dereference after null check") Fixes: b535e2b9b78a ("xen/pvcalls: impl

[Xen-devel] [PATCH] x86/xen: add missing \n at end of printk warning message

2016-09-12 Thread Colin King
From: Colin Ian King The message is missing a \n, add it. Signed-off-by: Colin Ian King --- arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/platform-pci-unplug.c b/arch/x86/xen/platform-pci-unplug.c index d37a0c7..90d1b83 100

[Xen-devel] [PATCH] x86/xen/p2m: trivia indentation fix on if statement

2016-01-18 Thread Colin King
From: Colin Ian King if statement is indented by 1 extra whitespace, remove this Signed-off-by: Colin Ian King --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index cab9f76..17dbc1d 100644 --- a/arch/x86/xen/p2m

[Xen-devel] [PATCH] xen: fix non-ANSI function declaration of function xen_has_pv_devices

2015-07-16 Thread Colin King
From: Colin Ian King xen_has_pv_devices has no parameters, so use the normal void parameter convention to make it match the prototype in the header file include/xen/platform_pci.h Signed-off-by: Colin Ian King --- arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 del

[Xen-devel] [PATCH] xen: fix non-ANSI function declaration of function xen_has_pv_devices

2015-07-16 Thread Colin King
From: Colin Ian King xen_has_pv_devices has no parameters, so use the normal void parameter convention to make it match the prototype in the header file include/xen/platform_pci.h Signed-off-by: Colin Ian King --- arch/x86/xen/platform-pci-unplug.c | 2 +- 1 file changed, 1 insertion(+), 1 del