netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Steve Glendinning <steve.glendinning@shawell.net>,
	David Miller <davem@davemloft.net>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@kernel.org>,
	Rob Herring <robherring2@gmail.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Jon Hunter <jon-hunter@ti.com>,
	devicetree-discuss@lists.ozlabs.org,
	linux-omap <linux-omap@vger.kernel.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 1/2] genirq: add function to get IRQ edge/level flags
Date: Sat, 13 Apr 2013 03:21:26 +0200	[thread overview]
Message-ID: <5168B316.8010801@collabora.co.uk> (raw)
In-Reply-To: <51688310.9040008@wwwdotorg.org>

On 04/12/2013 11:56 PM, Stephen Warren wrote:
> On 04/12/2013 12:05 PM, Javier Martinez Canillas wrote:
> ...
>> So, is better to add an irq_get_trigger_type() function to obtain
>> the edge/level flags for an IRQ.
> 
>> diff --git a/include/linux/irq.h b/include/linux/irq.h
> 
>> +static inline u32 irq_get_trigger_type(unsigned int irq)
>> +{
>> +	struct irq_data *d = irq_get_irq_data(irq);
>> +	return d ? d->state_use_accessors & IRQD_TRIGGER_MASK : 0;
> 
> Should the direct access to d->state_use_accessors be replaced with a
> call to irqd_get_trigger_type()? Perhaps since this is inside the IRQ
> code header, there's no need to use the accessor function?
> 

Yes, it's better to use irqd_get_trigger_type() instead of a direct access to
d->state_use_accessors since that function is inline so it should be the same
performance wise and it will be easier to maintain.

I'll send a v2 changing that.

Thanks a lot and best regards,
Javier

  reply	other threads:[~2013-04-13  1:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 18:05 [PATCH 0/2] net: smsc911x: get IRQ flags from chip if not present in IORESOURCE_IRQ Javier Martinez Canillas
2013-04-12 18:05 ` [PATCH 1/2] genirq: add function to get IRQ edge/level flags Javier Martinez Canillas
2013-04-12 21:56   ` Stephen Warren
2013-04-13  1:21     ` Javier Martinez Canillas [this message]
2013-04-12 18:05 ` [PATCH 2/2] net: smsc911x: get IRQ flags from chip if not present in IORESOURCE_IRQ Javier Martinez Canillas

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=5168B316.8010801@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=davem@davemloft.net \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=jon-hunter@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=robherring2@gmail.com \
    --cc=steve.glendinning@shawell.net \
    --cc=swarren@wwwdotorg.org \
    --cc=tglx@linutronix.de \
    /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 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).