Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2423447pxa; Fri, 7 Aug 2020 10:44:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk4BzjjnCCWYnmpFim5rLtFPUaYTqTxLH+D/j4VSpvgznu8O2FEkwRMTInRM9wQgNKvNaZ X-Received: by 2002:a05:6402:b45:: with SMTP id bx5mr4700168edb.214.1596822297998; Fri, 07 Aug 2020 10:44:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596822297; cv=none; d=google.com; s=arc-20160816; b=cTmzLI/tZ3CSAjqV4Jp83LujknKiYDEcuHRE4RMuxMLsa4FgUeTULzfY652EpLOElu j4UlEh0dSo3J+GcBXhkEB09tALskLEzGFFHRJ+Az2WhjWYvlPGTqanI1hTsQEGwEBxst WndESXoIqB5g2vdv5F6tcV23NKGnZKnSjOUdeIEm5Fj7qPVFPK7vr+3M2KNvahmUeTKC hqhUKV1TzGsLrZ7jrTAxdYnoLrkIK0onBYvXS4jFmPff6WrMC+jf/77yjwGz+0GcQI5j h8SZ98caaHqvI66l5ussWkHFySmJsCyApejHOilIhiNDudfR/6B8jGiOZl21FlEkfDmS G40w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=RHyhNkBMWJyOr8oqQsqlm6RnB3rFATGVc/X4HR4x2PI=; b=fzr9ytWiilraklF3qe7QSSs3pxXBHMIaLAQfQoLfFtJDxrRy1dgTAbnvUTFTYt2JHq QZKy1VfHW1xX0HCqxmLTsqdazGBXba/tNFFphalofkBBaROP+off8cFm9N30ECglVWVb FO83CRR3W2CDBOuRIWW3SWhQcQsWde5kUlw9hIWiZ7TbC6eTtD6OD/YAFWFkou29b4kx Mrqr2Fp47IJLoL+LGwrW+BcsH76hai9k5iAEa3j2CkBl7lJHI7fEzedjiIVkjIGvDL2j N8GAUCJcpkWLlyUZbUMwILl28y1FfSCR/64PdZftH6mVRys2ExbIFflbnL3w8mhwwxti tfaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o2si5816924edj.268.2020.08.07.10.44.34; Fri, 07 Aug 2020 10:44:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726890AbgHGRmO (ORCPT + 99 others); Fri, 7 Aug 2020 13:42:14 -0400 Received: from 14.mo7.mail-out.ovh.net ([178.33.251.19]:43986 "EHLO 14.mo7.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725900AbgHGRmO (ORCPT ); Fri, 7 Aug 2020 13:42:14 -0400 Received: from player779.ha.ovh.net (unknown [10.108.35.131]) by mo7.mail-out.ovh.net (Postfix) with ESMTP id 9B754173B3A for ; Fri, 7 Aug 2020 18:23:19 +0200 (CEST) Received: from sk2.org (82-65-25-201.subs.proxad.net [82.65.25.201]) (Authenticated sender: steve@sk2.org) by player779.ha.ovh.net (Postfix) with ESMTPSA id 947061510A712; Fri, 7 Aug 2020 16:23:13 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-106R006055f1bad-f0c4-4727-ae3b-7a63240df21a, B1FDDFD4E508142116FDFB9194C63E8FBE397CFD) smtp.auth=steve@sk2.org Date: Fri, 7 Aug 2020 18:23:06 +0200 From: Stephen Kitt To: Guenter Roeck Cc: Jean Delvare , linux-hwmon@vger.kernel.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] hwmon/pmbus: use simple i2c probe function Message-ID: <20200807182306.032376e5@heffalump.sk2.org> In-Reply-To: References: <20200807074526.14334-1-steve@sk2.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/bOUMBB6UC/Ekh34A4LpQ756"; protocol="application/pgp-signature" X-Ovh-Tracer-Id: 9220838763908451598 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeduiedrkedvgdeliecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpeffhffvuffkjghfofggtgesghdtreerredtjeenucfhrhhomhepufhtvghphhgvnhcumfhithhtuceoshhtvghvvgesshhkvddrohhrgheqnecuggftrfgrthhtvghrnhepveelvdeufedvieevffdtueegkeevteehffdtffetleehjeekjeejudffieduteeknecukfhppedtrddtrddtrddtpdekvddrieehrddvhedrvddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhhouggvpehsmhhtphdqohhuthdphhgvlhhopehplhgrhigvrhejjeelrdhhrgdrohhvhhdrnhgvthdpihhnvghtpedtrddtrddtrddtpdhmrghilhhfrhhomhepshhtvghvvgesshhkvddrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrgh Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Sig_/bOUMBB6UC/Ekh34A4LpQ756 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Fri, 7 Aug 2020 08:23:29 -0700, Guenter Roeck wrote: > On 8/7/20 12:45 AM, Stephen Kitt wrote: > > pmbus_do_probe doesn't use the id information provided in its second > > argument, so this can be removed, which then allows using the > > single-parameter i2c probe function ("probe_new") for probes. > >=20 > > This avoids scanning the identifier tables during probes. > >=20 > > Drivers which didn't use the id are converted as-is; drivers which did > > are modified as follows: > >=20 > > * if the information in i2c_client is sufficient, that's used instead > > (client->name); > > * configured v. probed comparisons are performed by comparing the > > configured name to the detected name, instead of the ids; this > > involves strcmp but is still cheaper than comparing all the device > > names when scanning the tables; > > * anything else is handled by calling i2c_match_id() with the same > > level of error-handling (if any) as before. > >=20 > > Signed-off-by: Stephen Kitt =20 >=20 > Please also update the documentation. >=20 > Documentation/hwmon/pmbus-core.rst: int pmbus_do_probe(struct i2c_client > *client, const struct i2c_device_id *id, Documentation/hwmon/pmbus.rst: > return pmbus_do_probe(client, id, &ds1200_info); Aargh, I usually *start* from the documentation, but I didn=E2=80=99t think= to check in this case. > Also, please fix the checkpatch issue reported by Wolfram. Will do, v3 on its way. Thanks for the reviews! Regards, Stephen --Sig_/bOUMBB6UC/Ekh34A4LpQ756 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEnPVX/hPLkMoq7x0ggNMC9Yhtg5wFAl8tf+oACgkQgNMC9Yht g5xYKQ/+Jfm5rek1kCBwaXNseELt3KJsdhqQZTFwAS6yIwlikt+fdTma1O8/67uU epQtf5/PU6wt3Uu+W1u/ttGW8EPNB7zvJQqLrl4borySSbjgjTUOl/9fQ1MNyj8C YDjTa3RUqr9+QGo2Am2A5j2AzSDq2SqtiqyZWCJX95ROr8i8DEoJTu9hBx8yPO5O I3u0Kn6UPT9+wy9dGcAYsgggZco3KFkYNGNUL6dVJMzn8gCAJmz2cEdh3sHTFm32 MMXBRdp9zRYGYBZxqbykQGdUlCQEX9GlX2p4HgRSMTqTadEFQu2V008uyy7wOuWE kF8ukuR5dzMVX2PlUdQCitgJ4AcrrzSmA2hem0mZvZvTdhLPDM79PHoTqlQzG4xw AZ78MRr88C0NBsSjGemEvcproNl5eospqIMizXoEzL5s3Pu0rlXbu1lb2T0SfhIc qEQD79cBltKP43fzCAzYKW3fKxcPAPYyKgcVEXeUUekEJ6QqgOYuBM9x7Sj4AS6D wgmn0SL5pjPutDO6VqOZEMPpNtxjFtUUtBjwvJTHlV5r6n+0VRjVfY6Q6fQprU0q QJYsYcU+aYjrh+x56/7PG0nFTrD23kaW/Z975f1BanKp31s8ZN5ClCT1+ZJQkTSZ /OMfu+/qQCOadXrNTxscuWnvpd0R6OYvupIbr3gafjDxIoj4xjc= =kmhA -----END PGP SIGNATURE----- --Sig_/bOUMBB6UC/Ekh34A4LpQ756--