xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/HVM: remove dead code
@ 2012-12-06 12:55 Jan Beulich
  2012-12-06 13:04 ` Keir Fraser
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2012-12-06 12:55 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2460,9 +2460,7 @@ static enum hvm_copy_result __hvm_copy(
             return HVMCOPY_unhandleable;
         }
         if ( !page )
-        {
             return HVMCOPY_bad_gfn_to_mfn;
-        }
 
         p = (char *)__map_domain_page(page) + (addr & ~PAGE_MASK);
 
@@ -2560,11 +2558,7 @@ static enum hvm_copy_result __hvm_clear(
             return HVMCOPY_unhandleable;
         }
         if ( !page )
-        {
-            if ( page )
-                put_page(page);
             return HVMCOPY_bad_gfn_to_mfn;
-        }
 
         p = (char *)__map_domain_page(page) + (addr & ~PAGE_MASK);
 




[-- Attachment #2: x86-hvm-dead-code.patch --]
[-- Type: text/plain, Size: 771 bytes --]

x86/HVM: remove dead code

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -2460,9 +2460,7 @@ static enum hvm_copy_result __hvm_copy(
             return HVMCOPY_unhandleable;
         }
         if ( !page )
-        {
             return HVMCOPY_bad_gfn_to_mfn;
-        }
 
         p = (char *)__map_domain_page(page) + (addr & ~PAGE_MASK);
 
@@ -2560,11 +2558,7 @@ static enum hvm_copy_result __hvm_clear(
             return HVMCOPY_unhandleable;
         }
         if ( !page )
-        {
-            if ( page )
-                put_page(page);
             return HVMCOPY_bad_gfn_to_mfn;
-        }
 
         p = (char *)__map_domain_page(page) + (addr & ~PAGE_MASK);
 

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH] x86/HVM: remove dead code
@ 2016-04-04  6:28 Jan Beulich
  2016-04-05  9:34 ` Andrew Cooper
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2016-04-04  6:28 UTC (permalink / raw)
  To: xen-devel; +Cc: Paul Durrant

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]

With commit 96ae556569 ("x86/HVM: fix forwarding of internally cached
requests") rc doesn't change anymore in the respective preceding
switch() statements.

Coverity ID: 1358080
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/intercept.c
+++ b/xen/arch/x86/hvm/intercept.c
@@ -151,8 +151,6 @@ int hvm_process_io_intercept(const struc
                     domain_crash(current->domain);
                     return X86EMUL_UNHANDLEABLE;
                 }
-                if ( rc != X86EMUL_OKAY )
-                    break;
             }
             else
                 p->data = data;
@@ -181,8 +181,6 @@ int hvm_process_io_intercept(const struc
                     domain_crash(current->domain);
                     return X86EMUL_UNHANDLEABLE;
                 }
-                if ( rc != X86EMUL_OKAY )
-                    break;
             }
             else
                 data = p->data;




[-- Attachment #2: x86-HVM-intercept-dead-code.patch --]
[-- Type: text/plain, Size: 990 bytes --]

x86/HVM: remove dead code

With commit 96ae556569 ("x86/HVM: fix forwarding of internally cached
requests") rc doesn't change anymore in the respective preceding
switch() statements.

Coverity ID: 1358080
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/hvm/intercept.c
+++ b/xen/arch/x86/hvm/intercept.c
@@ -151,8 +151,6 @@ int hvm_process_io_intercept(const struc
                     domain_crash(current->domain);
                     return X86EMUL_UNHANDLEABLE;
                 }
-                if ( rc != X86EMUL_OKAY )
-                    break;
             }
             else
                 p->data = data;
@@ -181,8 +181,6 @@ int hvm_process_io_intercept(const struc
                     domain_crash(current->domain);
                     return X86EMUL_UNHANDLEABLE;
                 }
-                if ( rc != X86EMUL_OKAY )
-                    break;
             }
             else
                 data = p->data;

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-05  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 12:55 [PATCH] x86/HVM: remove dead code Jan Beulich
2012-12-06 13:04 ` Keir Fraser
  -- strict thread matches above, loose matches on Subject: below --
2016-04-04  6:28 Jan Beulich
2016-04-05  9:34 ` Andrew Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).