xen-hvm: Remove redandant varialbe 'xstate'
PATCH 1/1 xen-hvm: Remove redandant varialbe 'xstate'
In xen_hvm_change_state_handler(), can pass 'opaque' with type cast to xen_main_loop_prepare() directly, need not use additional variable for it.
--- xen-hvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
xen-hvm.c +1 -2
@@ -993,9 +993,8 @@ static void xen_main_loop_prepare(XenIOState *state)static void xen_hvm_change_state_handler (void *opaque,int running,RunState rstate) { -XenIOState *xstate = opaque;if (running) { -xen_main_loop_prepare (xstate); +xen_main_loop_prepare ((XenIOState *)opaque); } }
Signature · 1 line
1.8.5.2 (Apple Git-48)
Quoted 5 lines · Chen Gang
In
xen_hvm_change_state_handler(), can pass 'opaque' with type cast toxen_main_loop_prepare()directly, need not use additional variable for it.Signed-off-by Chen Gang <[email protected]>
Quoted 21 lines
xen-hvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)xen-hvm.c +1
-2@@ -993,9 +993,8 @@ static void xen_main_loop_prepare(XenIOState *state)static void xen_hvm_change_state_handler (void *opaque,int running,RunState rstate) { -XenIOState *xstate = opaque;if (running) { -xen_main_loop_prepare (xstate); +xen_main_loop_prepare ((XenIOState *)opaque); } }Signature · 1 line
1.8.5.2 (Apple Git-48)
Quoted 4 lines · Stefano Stabellini
Quoted 3 lines · Chen Gang
In
xen_hvm_change_state_handler(), can pass 'opaque' with type cast toxen_main_loop_prepare()directly, need not use additional variable for it.
The title of your patch should say 'variable'.
Quoted 32 lines
Quoted 2 lines
Signed-off-by Chen Gang <[email protected]>Quoted 21 lines
xen-hvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)xen-hvm.c +1
-2@@ -993,9 +993,8 @@ static void xen_main_loop_prepare(XenIOState *state)static void xen_hvm_change_state_handler (void *opaque,int running,RunState rstate) { -XenIOState *xstate = opaque;if (running) { -xen_main_loop_prepare (xstate); +xen_main_loop_prepare ((XenIOState *)opaque); } }Signature · 1 line
1.8.5.2 (Apple Git-48)_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 4 lines · Stefano Stabellini
Quoted 3 lines · Chen Gang
In
xen_hvm_change_state_handler(), can pass 'opaque' with type cast toxen_main_loop_prepare()directly, need not use additional variable for it.The title of your patch should say 'variable'.
Oh, yes, thanks. If necessary to send patch v2 for it, please let me know.
Thanks.
Quoted 32 lines
Quoted 32 lines
Quoted 2 lines
Signed-off-by Chen Gang <[email protected]>Quoted 21 lines
xen-hvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)xen-hvm.c +1
-2@@ -993,9 +993,8 @@ static void xen_main_loop_prepare(XenIOState *state)static void xen_hvm_change_state_handler (void *opaque,int running,RunState rstate) { -XenIOState *xstate = opaque;if (running) { -xen_main_loop_prepare (xstate); +xen_main_loop_prepare ((XenIOState *)opaque); } }Signature · 1 line
1.8.5.2 (Apple Git-48)_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Signature · 3 lines
Chen Gang Open, share, and attitude like air, water, and life which God blessed
Quoted 3 lines · Chen Gang
In
xen_hvm_change_state_handler(), can pass 'opaque' with type cast toxen_main_loop_prepare()directly, need not use additional variable for it.
gcc most likely eliminates it anyway, but heck, why not? Applied to -trivial, thank you!
/mjt
Quoted 4 lines · Chen Gang
Quoted 1 line
The title of your patch should say 'variable'.
Oh, yes, thanks. If necessary to send patch v2 for it, please let me know.
Not only 'varialbe', but also 'redandant'. I fixed both on commit, plus fixed grammar in commit message.
Thanks,
/mjt