Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2674915imd; Sun, 28 Oct 2018 15:45:20 -0700 (PDT) X-Google-Smtp-Source: AJdET5eaSr4bPmHWDQvGpwLOlNGHQoMgVl9k2EesXtHig6k7a6iR6eH0VQkt8Bxg+SvAwFwSqVLv X-Received: by 2002:a62:a50d:: with SMTP id v13-v6mr12575468pfm.18.1540766720755; Sun, 28 Oct 2018 15:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540766720; cv=none; d=google.com; s=arc-20160816; b=oPYRkTqkMrmINn4tJ4adLXKTUB91Bc4rv8jEvnOco2gsYNTt5tTRHLv7ac60NUqFMh rrVokXVB5vahaC/vqaAB1xF0bTiW8DxUUeFWtS6LJlCgVaUAvxN/Vf/spTdojl14BO8Q TncOKbGh3+vj15OC2exOiWq+BQMj8dtk5N315+4qXRqLEfA3BFoY0+R7fgFoje8Eu9jd l3+HgZojkf8iG7h0gJE4zQeXZGTI65fSapQyT4o2Dy39SA/3IJlIhAYyVVIxgFtmObEY dtGAH/4L8q6H/xB1ILcTcuo3JNjIzLz98oZe9WnIgbK1WuEKXU5xol9fDS5GXNBLBp/j reNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=dT36n0Vj6IaGVfyCbfTVYLAhtZ0K5Os0pN5/oo0E9U8=; b=PhKan+CfNY32PbllUsrpAuar/17bBhnhNIPUa7hCC/ZpL4pAVrLCm2WIG5GKI3zdTR BdN3PYkLSpiQEY4jr2s07Yk5xOqZe7A1GSTvm1o46JcMlyAA45yBgX556XHKwEZ5TaXA 2/XF363tcCr1u/QDIJakP60L+3nX0YSYeUGXiJM2WHRk2/3X2Zhk2qgyPrDEGVJt9IqA jtVTMyxkWrlsNhCFPurscPBFoaeHhbvFoU1qEiFBUPXJWilhbvyR76n/cnZDT3sFSkyq wBk2xUOOW1QO0/30KIOhIWViTHjEs7Z8QaMzHJ91cyZBontRVqp0DcB36N6NlH37F4zO XUxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x3-v6si19008839pfb.122.2018.10.28.15.45.04; Sun, 28 Oct 2018 15:45:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726079AbeJ2HQo (ORCPT + 99 others); Mon, 29 Oct 2018 03:16:44 -0400 Received: from sauhun.de ([88.99.104.3]:58166 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725984AbeJ2HQo (ORCPT ); Mon, 29 Oct 2018 03:16:44 -0400 Received: from localhost (unknown [87.113.172.131]) by pokefinder.org (Postfix) with ESMTPSA id 29AA44A1CA7; Sun, 28 Oct 2018 23:30:42 +0100 (CET) Date: Sun, 28 Oct 2018 22:30:41 +0000 From: Wolfram Sang To: Charles Keepax , Benjamin Tissoires 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 Message-ID: <20181028223041.GI1882@kunai> References: <20181019085958.32694-1-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="N8NGGaQn1mzfvaPg" Content-Disposition: inline In-Reply-To: <20181019085958.32694-1-ckeepax@opensource.cirrus.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --N8NGGaQn1mzfvaPg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > Signed-off-by: Charles Keepax Adding Benjamin to recipients. He wrote that code. > --- > drivers/i2c/i2c-core-base.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) >=20 > 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; > =20 > - irq =3D irq_find_mapping(adap->host_notify_domain, client->addr); > - if (!irq) > - irq =3D irq_create_mapping(adap->host_notify_domain, > - client->addr); > + irq =3D irq_create_mapping(adap->host_notify_domain, client->addr); > =20 > return irq > 0 ? irq : -ENXIO; > } > --=20 > 2.11.0 >=20 --N8NGGaQn1mzfvaPg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlvWOJEACgkQFA3kzBSg KbagOhAAsm8E83F7oPrDcOxo+n00svnBOyKabHf018H1ul/LfQZy1auyduSu5Y3H aC1cPdkvU8uzCPwhWVz7iZ0MHvsGZMR5lZ6NRHnWA5fAmV1kezMqSJBNzw71mmhh 3+6qoCLMZHsKn64GeYsujiXpf6GtcgAhBtBgAsHh2iAgdZ8rr52C6jccy8KqQOVC osPOsFHnq0RHobiVKjb2vfMpIy80JxHJGz/nx5RnOxvGNLP7fVw3jsY2YKE2JFnH /xSa4MWxVb6K1fDoCe8fvsauCKZk5YVPNtxMbnjA+kbKhWYAgAu7tEBC+4KDOwbP gVh4O858N6LyP3Mq0G0ZkUC66OfCIIQ1X6ceItu2SV/kSJyDaWi2aqOeBr6dF/nl 4zsqTo3EZ6JO0Ub09KViU9WYtbFbLiR/rfSpfF62d6j4LqjAVYan3epXB38QRwUk NzVNssUBWaOMgZtJFVWIkxLy5ci3rGbx3s5VyamY/T3W4XhNW5l/Nud3vs8+OFav HLfwdc5NXk1uaBic7KL54rJXT0eqXFTFCAvZw2orhmB12GRaN42NvCSfEhtwr6p8 tkcSWSgVOO2EuVDckPWuT8pGD3cbzVkG5x2IOOVWp+rgzb8EgDEvVz+pqSVr73M9 pf0F+6/f8pmMdIFpppmV+RwoRr3Ao56QhK6p198FKX4Wf5qnJbQ= =d8BD -----END PGP SIGNATURE----- --N8NGGaQn1mzfvaPg--