[PATCH 16/16] ncr710: unify two conditionals

Paolo Bonzini posted 16 patches 5 days, 16 hours ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Fam Zheng <fam@euphon.net>, Richard Henderson <richard.henderson@linaro.org>, Helge Deller <deller@gmx.de>
[PATCH 16/16] ncr710: unify two conditionals
Posted by Paolo Bonzini 5 days, 16 hours ago
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 hw/scsi/ncr53c710.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c
index f7b1e153960..25a1018ab11 100644
--- a/hw/scsi/ncr53c710.c
+++ b/hw/scsi/ncr53c710.c
@@ -797,13 +797,10 @@ void ncr710_command_complete(SCSIRequest *req, size_t resid)
     s->status = req->status;
     s->command_complete = NCR710_CMD_COMPLETE;
 
-    if (p) {
-        p->pending = 0;
-    }
-
     ncr710_set_phase(s, PHASE_ST);
 
     if (p) {
+        p->pending = 0;
         ncr710_request_orphan(s, p);
     }
 
-- 
2.53.0
Re: [PATCH 16/16] ncr710: unify two conditionals
Posted by Philippe Mathieu-Daudé 5 days, 14 hours ago
On 27/3/26 22:25, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   hw/scsi/ncr53c710.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Re: [PATCH 16/16] ncr710: unify two conditionals
Posted by Philippe Mathieu-Daudé 5 days, 14 hours ago
On 27/3/26 22:25, Paolo Bonzini wrote:
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   hw/scsi/ncr53c710.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/hw/scsi/ncr53c710.c b/hw/scsi/ncr53c710.c
> index f7b1e153960..25a1018ab11 100644
> --- a/hw/scsi/ncr53c710.c
> +++ b/hw/scsi/ncr53c710.c
> @@ -797,13 +797,10 @@ void ncr710_command_complete(SCSIRequest *req, size_t resid)
>       s->status = req->status;
>       s->command_complete = NCR710_CMD_COMPLETE;
>   
> -    if (p) {
> -        p->pending = 0;
> -    }
> -
>       ncr710_set_phase(s, PHASE_ST);
>   
>       if (p) {
> +        p->pending = 0;
>           ncr710_request_orphan(s, p);
>       }
>