Compress lines for immediate return
commitb3ac2b94cdc939a90d5a22338ae507689e2cfab0
authorSimran Singhal <singhalsimran0@gmail.com>
Wed, 1 Apr 2020 16:53:14 +0000 (1 22:23 +0530)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 4 May 2020 12:43:22 +0000 (4 14:43 +0200)
tree4586d31cee093411409945cdf2804f99ac93c5a2
parent949da1eb9db9df0d998ad2f3086979e4e23a44a1
Compress lines for immediate return

Compress two lines into a single line if immediate return statement is found.

It also remove variables progress, val, data, ret and sock
as they are no longer needed.

Remove space between function "mixer_load" and '(' to fix the
checkpatch.pl error:-
ERROR: space prohibited between function name and open parenthesis '('

Done using following coccinelle script:
@@
local idexpression ret;
expression e;
@@

-ret =
+return
     e;
-return ret;

Signed-off-by: Simran Singhal <singhalsimran0@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20200401165314.GA3213@simran-Inspiron-5558>
[lv: in handle_aiocb_write_zeroes_unmap() move "int ret" inside the #ifdef]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
block/file-posix.c
block/nfs.c
block/nvme.c
block/vhdx.c
hw/audio/ac97.c
hw/audio/adlib.c
hw/display/cirrus_vga.c
migration/ram.c
ui/gtk.c
util/qemu-sockets.c