mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Frias <sf84@laposte.net>
Cc: Marc Zyngier <marc.zyngier@arm.com>,
	Jason Cooper <jason@lakedaemon.net>,
	LKML <linux-kernel@vger.kernel.org>, Mason <slash.tmp@free.fr>
Subject: Re: [PATCH 2/2] genirq: Generic chip: factorise code using irq_get_domain_generic_chip()
Date: Fri, 2 Sep 2016 17:42:09 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1609021719430.5647@nanos> (raw)
In-Reply-To: <579F5C69.8070006@laposte.net>

On Mon, 1 Aug 2016, Sebastian Frias wrote:
> @@ -350,10 +350,10 @@ irq_get_domain_generic_chip(struct irq_domain *d, unsigned int hw_irq)
>  	int idx;
>  
>  	if (!dgc)
> -		return NULL;
> +		return ERR_PTR(-ENODEV);
>  	idx = hw_irq / dgc->irqs_per_chip;
>  	if (idx >= dgc->num_chips)
> -		return NULL;
> +		return ERR_PTR(-EINVAL);

This is completely pointless churn. None of the existing callsites cares
about the error value. We can simply split out the guts into a static
function and keep the semantics for irq_get_domain_generic_chip.

I'll fix that up while applying it.

Thanks,

	tglx

  reply	other threads:[~2016-09-02 15:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-01 14:27 Sebastian Frias
2016-09-02 15:42 ` Thomas Gleixner [this message]
2016-09-02 16:14 ` [tip:irq/core] genirq/generic_chip: Get rid of code duplication tip-bot for Sebastian Frias

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=alpine.DEB.2.20.1609021719430.5647@nanos \
    --to=tglx@linutronix.de \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=sf84@laposte.net \
    --cc=slash.tmp@free.fr \
    /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

all inboxes | Powered by JetHome®