From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 443CEC7619B for ; Mon, 17 Feb 2020 08:18:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 22C7920718 for ; Mon, 17 Feb 2020 08:18:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727964AbgBQISD (ORCPT ); Mon, 17 Feb 2020 03:18:03 -0500 Received: from sauhun.de ([88.99.104.3]:58544 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727332AbgBQISD (ORCPT ); Mon, 17 Feb 2020 03:18:03 -0500 Received: from localhost (p54B3307E.dip0.t-ipconnect.de [84.179.48.126]) by pokefinder.org (Postfix) with ESMTPSA id E568D2C0746; Mon, 17 Feb 2020 09:18:00 +0100 (CET) Date: Mon, 17 Feb 2020 09:17:58 +0100 From: Wolfram Sang To: Robert Richter Cc: Wolfram Sang , linux-i2c@vger.kernel.org, Benjamin Tissoires , Phil Reid , Jean Delvare , George Cherian , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR Message-ID: <20200217081758.GA2814@ninjato> References: <20200210172929.6001-1-wsa+renesas@sang-engineering.com> <20200210172929.6001-2-wsa+renesas@sang-engineering.com> <20200217075837.2agub5deqdpet3ce@rric.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="AhhlLboLdkugWU4S" Content-Disposition: inline In-Reply-To: <20200217075837.2agub5deqdpet3ce@rric.localdomain> 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 --AhhlLboLdkugWU4S Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable > > Signed-off-by: Wolfram Sang >=20 > > -struct i2c_client *i2c_setup_smbus_alert(struct i2c_adapter *adapter, > > +struct i2c_client *i2c_install_smbus_alert(struct i2c_adapter *adapter, > > struct i2c_smbus_alert_setup *setup); >=20 > This function naming is a bit odd. It creates a struct i2c_client. > Then, there is also i2c_new_client_device() and i2c_new_device(). For > i2c_new_client_device() there are no users at all outside of > i2c-core-base.c (except for Falcon NIC), it is only a wrapper. i2c_new_device (and friends) returned NULL on error. I am currently converting all i2c_new_* functions to return an ERRPTR. So, i2c_new_client_device is the new function, i2c_new_device is deprecated. If you check v5.6-rc1, you will find many more users. Similarily, i2c_new_dummy is deprecated (and removed already), i2c_new_dummy_device is the new thing. > So how about reducing the interface to those both only to:? >=20 > i2c_new_device() > i2c_new_device_smbus() Given the above, it would be: i2c_new_client_device() i2c_new_smbus_device() Yet, I think this is too vague. Maybe i2c_new_smbus_alert_device() ? Note that I never used SMBus Alert, so I am happy for feedback from people actually using it. Thanks for the comment! --AhhlLboLdkugWU4S Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAl5KTDIACgkQFA3kzBSg KbY2Tg/9ERLUoo/puQvUCT2DmwNLxguPXMBXpvLqfU/dSnClgrzdH5Mct7sMnLqQ k2Vs0mnQNMWXMmX2Nxl7Mmp14iI9nbBuSGmSQa8TVdeCcJO5snPaCS8i52E7tfmI otYuwegi91DmoWw4ETyoT/xSKuD9R90lUeBVfN4xxTlkEUpX1JbOnSHoFqH374Ne aQLWs4z4IRHK/FO+hvbkStYtTq1zLhFSk+/3so5C3mjp/hGF8C7nufjOqS5MOR4j OQqU8cmzzGQUoXoZkKJ08Jj2/zw/fdFgsCnN3iZOLsBn4ChrIKGjdZH3XhmKeKYa xB9EF/zPs4bXXsIoJrAZ57a3aglYpberK29W0+oo9pJ/F8bMd+bBFojp/UAM0DDR zvFhmU6N0UUIRI7+otYl84wZ/xUVnnHOhi/qPjMheDCnCK7QtShYysKEDpfy1gSY cBbatkIe183a+kUrQqaU43uA0sour2JxViLzjCvLoLtSqbwy2YReV+PRRgN5xlqR Bm2lTXOX+7dy06y4h5tECKCoKXM2Ek/BNkvXJPq6KF/j82gEEqlc3P86bvZwoIwy DHqjM3N3JtHLOwtKwl2jCV/+SnHaprkW6fCrGiPougarDdSI8iH+AFdQvPxC2/zH wq6S85inc5KI2mxUHtmj65UDLYtKSMUHyJ8QxJt+WpRKOkaIfSQ= =yipG -----END PGP SIGNATURE----- --AhhlLboLdkugWU4S--