All of lore.kernel.org
 help / color / mirror / Atom feed
From: christoffer.dall@linaro.org (Christoffer Dall)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending
Date: Mon, 24 Nov 2014 13:52:46 +0100	[thread overview]
Message-ID: <20141124125246.GN3401@cbox> (raw)
In-Reply-To: <54731EBB.5080707@arm.com>

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 <christoffer.dall@linaro.org>
> 
> Acked-by: Andre Przywara <andre.przywara@arm.com>
> 
> 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

WARNING: multiple messages have this Message-ID (diff)
From: Christoffer Dall <christoffer.dall@linaro.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: kvmarm@lists.cs.columbia.edu,
	linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org
Subject: Re: [PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending
Date: Mon, 24 Nov 2014 13:52:46 +0100	[thread overview]
Message-ID: <20141124125246.GN3401@cbox> (raw)
In-Reply-To: <54731EBB.5080707@arm.com>

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 <christoffer.dall@linaro.org>
> 
> Acked-by: Andre Przywara <andre.przywara@arm.com>
> 
> 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

  reply	other threads:[~2014-11-24 12:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-24  9:41 [PATCH] arm/arm64: vgic: Remove unreachable irq_clear_pending Christoffer Dall
2014-11-24  9:41 ` Christoffer Dall
2014-11-24 12:04 ` Andre Przywara
2014-11-24 12:04   ` Andre Przywara
2014-11-24 12:52   ` Christoffer Dall [this message]
2014-11-24 12:52     ` Christoffer Dall

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141124125246.GN3401@cbox \
    --to=christoffer.dall@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.