linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Charles Keepax <ckeepax@opensource.cirrus.com>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	patches@opensource.cirrus.com
Subject: Re: [PATCH 1/2] i2c: Remove unnecessary call to irq_find_mapping
Date: Sun, 28 Oct 2018 22:30:41 +0000	[thread overview]
Message-ID: <20181028223041.GI1882@kunai> (raw)
In-Reply-To: <20181019085958.32694-1-ckeepax@opensource.cirrus.com>

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

On Fri, Oct 19, 2018 at 09:59:57AM +0100, Charles Keepax wrote:
> irq_create_mapping calls irq_find_mapping internally and will use the
> found mapping if one exists, so there is no need to manually call this
> from i2c_smbus_host_notify_to_irq.
> 
> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Adding Benjamin to recipients. He wrote that code.

> ---
>  drivers/i2c/i2c-core-base.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c
> index dc78aa7369def..656f0a6fe3adf 100644
> --- a/drivers/i2c/i2c-core-base.c
> +++ b/drivers/i2c/i2c-core-base.c
> @@ -306,10 +306,7 @@ static int i2c_smbus_host_notify_to_irq(const struct i2c_client *client)
>  	if (client->flags & I2C_CLIENT_TEN)
>  		return -EINVAL;
>  
> -	irq = irq_find_mapping(adap->host_notify_domain, client->addr);
> -	if (!irq)
> -		irq = irq_create_mapping(adap->host_notify_domain,
> -					 client->addr);
> +	irq = irq_create_mapping(adap->host_notify_domain, client->addr);
>  
>  	return irq > 0 ? irq : -ENXIO;
>  }
> -- 
> 2.11.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2018-10-28 22:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  8:59 [PATCH 1/2] i2c: Remove unnecessary call to irq_find_mapping Charles Keepax
2018-10-19  8:59 ` [PATCH 2/2] i2c: Clear client->irq in i2c_device_remove Charles Keepax
2018-10-28 22:31   ` Wolfram Sang
2018-10-29 10:15     ` Benjamin Tissoires
2018-10-30 11:51       ` Charles Keepax
2018-10-30 14:34         ` Benjamin Tissoires
2018-10-30 14:55           ` Wolfram Sang
2018-10-31  9:52             ` Charles Keepax
2018-10-31  9:59               ` Wolfram Sang
2018-10-31 23:35   ` Wolfram Sang
2019-01-09 21:47   ` Yauhen Kharuzhy
2019-01-10 13:32     ` Charles Keepax
2019-01-10 20:35       ` Yauhen Kharuzhy
2018-10-28 22:30 ` Wolfram Sang [this message]
2018-10-29 10:13   ` [PATCH 1/2] i2c: Remove unnecessary call to irq_find_mapping Benjamin Tissoires
2018-10-31 23:34 ` Wolfram Sang

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=20181028223041.GI1882@kunai \
    --to=wsa@the-dreams.de \
    --cc=benjamin.tissoires@redhat.com \
    --cc=ckeepax@opensource.cirrus.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@opensource.cirrus.com \
    /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).