From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoffer Dall Subject: Re: [PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending Date: Mon, 24 Nov 2014 13:52:46 +0100 Message-ID: <20141124125246.GN3401@cbox> References: <1416822116-9044-1-git-send-email-christoffer.dall@linaro.org> <54731EBB.5080707@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org To: Andre Przywara Return-path: Received: from mail-la0-f41.google.com ([209.85.215.41]:60548 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752323AbaKXMwQ (ORCPT ); Mon, 24 Nov 2014 07:52:16 -0500 Received: by mail-la0-f41.google.com with SMTP id gf13so7588413lab.0 for ; Mon, 24 Nov 2014 04:52:14 -0800 (PST) Content-Disposition: inline In-Reply-To: <54731EBB.5080707@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Nov 24, 2014 at 12:04:11PM +0000, Andre Przywara wrote: > Hej Christoffer, > > On 24/11/14 09:41, Christoffer Dall wrote: > > When 'injecting' an edge-triggered interrupt with a falling edge we > > shouldn't clear the pending state on the distributor. In fact, we > > don't, because the check in vgic_validate_injection would prevent us > > from ever reaching this bit of code. > > > > Remove the unreachable snippet. > > > > Signed-off-by: Christoffer Dall > > Acked-by: Andre Przywara > > I agree on this. Would it make sense to rewrite this function a bit to > make it more clearer what happens? I find the nesting of the > if-statements counter-intuitive: I'd prefer to first differentiate > between level and edge triggered and then only check the actual level in > the level-triggered branch. Not sure if it's worth the fuss, though. > I disagree, and it's not ;) -Christoffer