trivial: remove various pointless things
No functional changes (hopefully).
extras/mini-os/lwip-net.c | 2 -- tools/libxc/xc_domain.c | 3 +-- tools/libxl/xl_cmdimpl.c | 4 ++-- xen/arch/x86/hvm/svm/nestedsvm.c | 1 - xen/common/device_tree.c | 2 +- xen/drivers/video/arm_hdlcd.c | 2 +- 6 files changed, 5 insertions(+), 9 deletions(-)
PATCH 1/6 nestedsvm: remove pointless BUG_ON
It's already handled just above.
--- xen/arch/x86/hvm/svm/nestedsvm.c | 1 - 1 file changed, 1 deletion(-)
xen/arch/x86/hvm/svm/nestedsvm.c +0 -1
@@ -847,7 +847,6 @@ nsvm_vmcb_guest_intercepts_msr(unsigned long *msr_bitmap,/* MSR not in the permission map: Let the guest handle it. */ return NESTEDHVM_VMEXIT_INJECT ; -BUG_ON (msr_bit ==NULL ); msr &=0x1fff ;if (write)
Signature · 1 line
1.7.10.4
Re: [PATCH 1/6] nestedsvm: remove pointless BUG_ON
Quoted 12 lines · Matthew Daley
It's already handled just above.
Signed-off-by Matthew Daley <[email protected]>--- xen/arch/x86/hvm/svm/nestedsvm.c | 1 - 1 file changed, 1 deletion(-)xen/arch/x86/hvm/svm/nestedsvm.c +0
-0
xen/arch/x86/hvm/svm/nestedsvm.c nsvm_vmcb_guest_intercepts_msr(unsigned long *msr_bitmap, · line 852
Quoted 7 lines
xen/arch/x86/hvm/svm/nestedsvm.c +0
-1@@ -847,7 +847,6 @@ nsvm_vmcb_guest_intercepts_msr(unsigned long *msr_bitmap,/* MSR not in the permission map: Let the guest handle it. */ return NESTEDHVM_VMEXIT_INJECT ; -BUG_ON (msr_bit ==NULL ); msr &=0x1fff ;if (write)
PATCH 2/6 xen/arm: remove pointless if subcondition
In reply to Matthew DaleyIt's already handled just above.
--- xen/common/device_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/common/device_tree.c +1 -1
@@ -906,7 +906,7 @@ static int dt_translate_one(const struct dt_device_node *parent,dt_printk (XENLOG_ERR "DT: no ranges; cannot translate\n" );return 1 ; } -if ( ranges ==NULL || rlen ==0 ) +if ( rlen ==0 ) { offset =dt_read_number (addr, na);memset (addr,0 , pna *4 );
Signature · 1 line
1.7.10.4
PATCH 3/6 xen/video: remove pointless if subcondition
In reply to Matthew DaleyIt's already handled just above.
--- xen/drivers/video/arm_hdlcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/video/arm_hdlcd.c +1 -1
@@ -150,7 +150,7 @@ void __init video_init(void)return ; } -if ( !hdlcd_start || !framebuffer_start ) +if ( !framebuffer_start ) {early_printk (KERN_ERR "HDLCD: framebuffer address missing from device tree, disabling driver\n" );return ;
Signature · 1 line
1.7.10.4
PATCH 4/6 libxc: remove pointless null pointer check
In reply to Matthew Daleyctxt_buf is guaranteed non-null here.
--- tools/libxc/xc_domain.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/libxc/xc_domain.c +1 -2
@@ -444,8 +444,7 @@ int xc_domain_hvm_getcontext_partial(xc_interface *xch, ret =do_domctl (xch, &domctl); -if ( ctxt_buf ) -xc_hypercall_bounce_post (xch, ctxt_buf); +xc_hypercall_bounce_post (xch, ctxt_buf);return ret ?-1 :0 ; }
Signature · 1 line
1.7.10.4
PATCH 5/6 xl: remove pointless null pointer check
In reply to Matthew Daleypoolinfo is guaranteed non-null here.
--- tools/libxl/xl_cmdimpl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxl/xl_cmdimpl.c +2 -2
@@ -5095,8 +5095,8 @@ static int sched_domain_output(libxl_scheduler sched, int (*output)(int),break ; } } -if (poolinfo) -libxl_cpupoolinfo_list_free (poolinfo, n_pools); + +libxl_cpupoolinfo_list_free (poolinfo, n_pools);return 0 ; }
Signature · 1 line
1.7.10.4
PATCH 6/6 mini-os: remove repeated statement in netfront_input
In reply to Matthew Daley--- extras/mini-os/lwip-net.c | 2 -- 1 file changed, 2 deletions(-)
extras/mini-os/lwip-net.c +0 -2
@@ -194,8 +194,6 @@ netfront_input(struct netif *netif, unsigned char* data, int len)/* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; - - ethhdr = p->payload;switch (htons (ethhdr->type)) {/* IP packet? */
Signature · 1 line
1.7.10.4
Re: [PATCH 6/6] mini-os: remove repeated statement in netfront_input
Quoted 1 line · Matthew Daley, le Fri 08 Nov 2013 13:45:12 +1300, a écrit :
Signed-off-by Matthew Daley <[email protected]>
Quoted 20 lines
--- extras/mini-os/lwip-net.c | 2 -- 1 file changed, 2 deletions(-)extras/mini-os/lwip-net.c +0
-2@@ -194,8 +194,6 @@ netfront_input(struct netif *netif, unsigned char* data, int len)/* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; - - ethhdr = p->payload;switch (htons (ethhdr->type)) {/* IP packet? */ Signature · 1 line
1.7.10.4
Signature · 2 lines
Samuel <studdud> what the fuck is wtf
Quoted 1 line · Matthew Daley
No functional changes (hopefully).
Looks like someone picked up the first and last (x86 & mini-os). The middle 4 (arm + libxl + libxc ones) I've just acked + applied. thanks.
Quoted 14 lines
extras/mini-os/lwip-net.c | 2 -- tools/libxc/xc_domain.c | 3 +-- tools/libxl/xl_cmdimpl.c | 4 ++-- xen/arch/x86/hvm/svm/nestedsvm.c | 1 - xen/common/device_tree.c | 2 +- xen/drivers/video/arm_hdlcd.c | 2 +- 6 files changed, 5 insertions(+), 9 deletions(-)_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel