Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1370919ybi; Fri, 14 Jun 2019 13:33:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUxUTPHXz5Cc7mSSslV/xQEe/53N7xQtefNZtTWDXqgGiDwbcAQUz3pbgrI+E2bvvT3zZb X-Received: by 2002:a62:1c92:: with SMTP id c140mr100905377pfc.258.1560544420996; Fri, 14 Jun 2019 13:33:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560544420; cv=none; d=google.com; s=arc-20160816; b=MCjlP3rGXW1JDyb152JzLStqf1D0N7c/HDtVS67361jXeXZjdffjY1Ya5CgIZpwejs c3KB6KkDY9Z6SmF5n9kge1ZNEtLSV/xsmM/pnq1I8/yGIAZWy1VnLW47IwAqGmCTvUsJ YnSfEtMx0K2rBoZ0Znw0fJ1iZdmOdQTkQUi49PGwCFtgzYCw8lBwRLj//nJC6kSYLzaA NB3zQJTbHDA3CFB4n7e2jdsM8edEm/7oq9wCCrZhTsvZv9fDGsrP6VQtH91EmETHhedp TGfgsiUVc+YzgabFfz67NUonetTl57b8mNd6JliWU6vBAAe8yKZl5drNX5GmICA/rRNU wY6g== 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=nZKbSEDHb6y5/0HDMUqqKytqwshrED60ozUVVJKEIvI=; b=DAIyHXanGe/e4B1iokovdXfVE2vluqStkubiRpGJ4c4y4xbJn0nhmsHr0ixJHLl+X5 ZLD071TrXoBvXgGigio9u2jz7ZlJ7IZGWj8xEpgllOtxiiOzDblF02OFHCE8LTqlORzu adcpIpEavgxAPwG/+Qi3Cug85i707Jrm/tJcQDTnw4TjlD4ulamlIBAjfixQZyOpdxRS +OxHP68PsF7NcEd8KTRvsTix/vDo/c8r5n4Z15HDFaYSA66BeLcZkvK4mpGin8t3TYmk Hlqf1ECo74YsqaOXeyletFpqEQcts0XqPVsMsKcPlbL8jWFcypImu4HWxSX1XEEZG3tV x4ug== 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 32si3044314plc.152.2019.06.14.13.33.26; Fri, 14 Jun 2019 13:33:40 -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 S1726926AbfFNUa4 (ORCPT + 99 others); Fri, 14 Jun 2019 16:30:56 -0400 Received: from sauhun.de ([88.99.104.3]:56660 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727963AbfFNUay (ORCPT ); Fri, 14 Jun 2019 16:30:54 -0400 Received: from localhost (p5486CF81.dip0.t-ipconnect.de [84.134.207.129]) by pokefinder.org (Postfix) with ESMTPSA id C679A2CF690; Fri, 14 Jun 2019 22:30:52 +0200 (CEST) Date: Fri, 14 Jun 2019 22:30:51 +0200 From: Wolfram Sang To: Suzuki K Poulose Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, rafael@kernel.org, Alexander Shishkin , Andrew Lunn , Andreas Noever , Arnd Bergmann , Bjorn Helgaas , Corey Minyard , Christian Borntraeger , David Kershner , "David S. Miller" , David Airlie , Felipe Balbi , Frank Rowand , Grygorii Strashko , Harald Freudenberger , Hartmut Knaack , Heiko Stuebner , Jason Gunthorpe , Jonathan Cameron , "James E.J. Bottomley" , Len Brown , Mark Brown , Michael Ellerman , Michael Jamet , "Martin K. Petersen" , Peter Oberparleiter , Rob Herring , Sebastian Ott , Srinivas Kandagatla , Yehezkel Bernat Subject: Re: [PATCH v2 04/28] bus_find_device: Unify the match callback with class_find_device Message-ID: <20190614203051.GA7991@kunai> References: <1560534863-15115-1-git-send-email-suzuki.poulose@arm.com> <1560534863-15115-5-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <1560534863-15115-5-git-send-email-suzuki.poulose@arm.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 --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 14, 2019 at 06:53:59PM +0100, Suzuki K Poulose wrote: > There is an arbitrary difference between the prototypes of > bus_find_device() and class_find_device() preventing their callers > from passing the same pair of data and match() arguments to both of > them, which is the const qualifier used in the prototype of > class_find_device(). If that qualifier is also used in the > bus_find_device() prototype, it will be possible to pass the same > match() callback function to both bus_find_device() and > class_find_device(), which will allow some optimizations to be made in > order to avoid code duplication going forward. Also with that, constify > the "data" parameter as it is passed as a const to the match function. >=20 > For this reason, change the prototype of bus_find_device() to match > the prototype of class_find_device() and adjust its callers to use the > const qualifier in accordance with the new prototype of it. Acked-by: Wolfram Sang # for the I2C parts --vtzGhvizbBRQ85DL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl0EA/cACgkQFA3kzBSg KbbXHBAAstp9GpPxsxW8LEQOVfaMLoMg9Dnm0OuY4goxVWlgniJP6l0iDHJlYr35 QxpIPfO7Hg9F5jykwiY7mppMva+ORnWPpoeKNCUl5D/4DhYyteQJTay9YeH15YAf jg6hBpIHFXaQ1Pjb2ffw4m/sUtxT+69SjUdtzHOvfsP6v3ASIc76xlK/bC9IOawr bGbpbdX8PMGbq0v1DlF/1VjeWFHAvkO1/bnMFrZSczAtJyLnSyH43wNMyOIbHC/P hN4qbazCTw2uofmlV9yIDwa5ByiTH+DVDJbwhzE3wPqnTmJrFhH4wqhdfaFyvm9W 4VLIGOOBzsr4vCwVCpwL5XCgYnuOIMVB3fHoehmWH052O495D0yxTvu5M6zHZVp8 MJ/m5t/8D1PBDExf1THKVC5p2C/i+Qy0hbTo1jHN7uxgx6qTE/9/xPC8TS0E2vXe TEs7HJtni+uZhOojf85CqpJYeUrvkjadriphh/dYKt2cepPCsmbpI8ko+Waeam8I KM4gDxBTtInIAiw+5VfGmA1z9ijz69ol0yQfLPbr4OmOqLt54e1j183EJuyDSXpD P621n54QpbOmnNymvjXZxSanlFTMuWudI3ahHaaKrVex1nTDTXriA0LvQywqCjQo Sf5pz6vvfxrb4G+0YB8gt0gBQLytl7OHJWhIBvosSo39VLFv7VQ= =59Uk -----END PGP SIGNATURE----- --vtzGhvizbBRQ85DL--