Re: [Xen-devel] [PATCH] xen: selfballoon: remove unnecessary static in frontswap_selfshrink()

2017-07-21 Thread Gustavo A. R. Silva
Hi Juergen, On 07/21/2017 02:36 AM, Juergen Gross wrote: On 04/07/17 20:34, Gustavo A. R. Silva wrote: Remove unnecessary static on local variables last_frontswap_pages and tgt_frontswap_pages. Such variables are initialized before being used, on every execution path throughout the function

[Xen-devel] [PATCH] xen: selfballoon: remove unnecessary static in frontswap_selfshrink()

2017-07-04 Thread Gustavo A. R. Silva
rivers/xen/xen-selfballoon.o Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/xen/xen-selfballoon.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/xen/xen-selfballoon.c b/drivers/xen/xen-selfballoon.c index 6662071..a67e955 100644 --- a

Re: [Xen-devel] [block-xen-blkback] question about pontential null pointer dereference

2017-05-11 Thread Gustavo A. R. Silva
Hi Juergen, Quoting Juergen Gross <jgr...@suse.com>: On 10/05/17 18:49, Gustavo A. R. Silva wrote: Hello everybody, While looking into Coverity ID 1350942 I ran into the following piece of code at drivers/block/xen-blkback/xenbus.c:490: 490static int xen_blkbk_remove(struct xenbus_

[Xen-devel] [PATCH] block: xen-blkback: add null check to avoid null pointer dereference

2017-05-11 Thread Gustavo A. R. Silva
Add null check before calling xen_blkif_put() to avoid potential null pointer dereference. Addresses-Coverity-ID: 1350942 Cc: Juergen Gross <jgr...@suse.com> Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/block/xen-blkback/xenbus.c | 8 +--- 1 fil

[Xen-devel] [block-xen-blkback] question about pontential null pointer dereference

2017-05-10 Thread Gustavo A. R. Silva
erence be->blkif Is there any chance for be->blkif to be NULL at line 511? I'm trying to figure out if this is a false positive or something that actually needs to be fixed. I'd really appreciate any comment on this. Thank you! -- Gustavo A. R. Silva

[Xen-devel] [PATCH] x86: xen: remove unnecessary variable in xen_foreach_remap_area()

2017-06-23 Thread Gustavo A. R. Silva
makes variable mfn unnecessary. Also, value assigned to variable mfn at line 534:mfn = xen_remap_mfn; is never used. Addresses-Coverity-ID: 1260110 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- arch/x86/xen/setup.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-)

[Xen-devel] [PATCH] xen: xenbus_probe_frontend: mark expected switch fall-throughs

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Addresses-Coverity-ID: 146562 Addresses-Coverity-ID: 146563 Signed-off-by: Gustavo A. R. Silva <garsi...@embeddedor.com> --- drivers/xen/xenbus/xenbus_probe_frontend.c | 2 ++

[Xen-devel] [PATCH] xen/pvcalls-front: mark expected switch fall-through

2017-11-02 Thread Gustavo A. R. Silva
In preparation to enabling -Wimplicit-fallthrough, mark switch cases where we are expecting to fall through. Notice that in this particular case I placed the "fall through" comment on its own line, which is what GCC is expecting to find. Signed-off-by: Gustavo A. R. Si