[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yh5DSMiqDrMPb/YH@google.com>
Date: Tue, 1 Mar 2022 16:01:12 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Like Xu <like.xu.linux@...il.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>, kvm@...r.kernel.org,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Joerg Roedel <joro@...tes.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86/i8259: Remove a dead store of irq in a
conditional block
On Tue, Mar 01, 2022, Like Xu wrote:
> From: Like Xu <likexu@...cent.com>
>
> The [clang-analyzer-deadcode.DeadStores] helper reports
> that the value stored to 'irq' is never read.
>
> Signed-off-by: Like Xu <likexu@...cent.com>
Reviewed-by: Sean Christopherson <seanjc@...gle.com>
> ---
> Note: not sure if "irq2 + 8" should be needed for "s->pics[0].irq_base + irq"
Nope, IRQ 2 is used to cascade PIC controllers, and the two controllers have separate
vector offsets/bases. The code was there in the original commit, 85f455f7ddbe ("KVM:
Add support for in-kernel PIC emulation"), best guess is that it was leftover from
development, e.g. maybe a flawed assumption the the second PIC's vector was simply +8?
Powered by blists - more mailing lists