linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: powerpc virq: new routine virq_to_hw
Date: Mon, 28 Aug 2006 11:22:19 +1000	[thread overview]
Message-ID: <1156728139.8433.413.camel@localhost.localdomain> (raw)
In-Reply-To: <44EF818B.9080301@am.sony.com>

On Fri, 2006-08-25 at 16:02 -0700, Geoff Levand wrote:
> Ben,
> 
> Please consider this accessor routine which hides the details
> of the map.
> 
> Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
> 
> ---
> Index: cell--common--4/include/asm-powerpc/irq.h
> ===================================================================
> --- cell--common--4.orig/include/asm-powerpc/irq.h
> +++ cell--common--4/include/asm-powerpc/irq.h
> @@ -136,6 +136,11 @@
>  
>  extern struct irq_map_entry irq_map[NR_IRQS];
>  
> +static inline irq_hw_number_t
> +virq_to_hw (unsigned int virq)
> +{
> +	return irq_map[virq].hwirq;
> +}

I'd much prefer:

static inline irq_hw_number_t virq_to_hw (unsigned int virq)
{
	return irq_map[virq].hwirq;
}

I've grown to dislike the CR between the return type and the function
name (I used to do that too) and it seems that this opinion is shared by
Linus (there was an old thread on lkml about it).

Cheers,
Ben.

  reply	other threads:[~2006-08-28  1:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-25 23:02 powerpc virq: new routine virq_to_hw Geoff Levand
2006-08-28  1:22 ` Benjamin Herrenschmidt [this message]
2006-08-28  7:16   ` Segher Boessenkool
2006-08-28 15:03   ` Geoff Levand
2006-08-29 22:36     ` Benjamin Herrenschmidt

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=1156728139.8433.413.camel@localhost.localdomain \
    --to=benh@kernel.crashing.org \
    --cc=geoffrey.levand@am.sony.com \
    --cc=linuxppc-dev@ozlabs.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 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).