LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: ckeepax@opensource.cirrus.com,
	Linux I2C <linux-i2c@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	patches@opensource.cirrus.com
Subject: Re: [PATCH 1/2] i2c: Remove unnecessary call to irq_find_mapping
Date: Mon, 29 Oct 2018 11:13:14 +0100	[thread overview]
Message-ID: <CAO-hwJLZc1R0LoL1+xAL4-n9Htu_z=pntKU0AsJCKvFZxOauwA@mail.gmail.com> (raw)
In-Reply-To: <20181028223041.GI1882@kunai>

On Sun, Oct 28, 2018 at 11:30 PM Wolfram Sang <wsa@the-dreams.de> wrote:
>
> 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.

Yep, definitely looking good. For completeness, I just tested it on
the t450s, and it works fine.

This one is
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>

Cheers,
Benjamin

>
> > ---
> >  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
> >

  reply	other threads:[~2018-10-29 10:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  8:59 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 ` [PATCH 1/2] i2c: Remove unnecessary call to irq_find_mapping Wolfram Sang
2018-10-29 10:13   ` Benjamin Tissoires [this message]
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='CAO-hwJLZc1R0LoL1+xAL4-n9Htu_z=pntKU0AsJCKvFZxOauwA@mail.gmail.com' \
    --to=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 \
    --cc=wsa@the-dreams.de \
    --subject='Re: [PATCH 1/2] i2c: Remove unnecessary call to irq_find_mapping' \
    /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

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).