Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp4512442ybv; Mon, 17 Feb 2020 00:18:40 -0800 (PST) X-Google-Smtp-Source: APXvYqwTpuZ4k+i9Mxe1roebV4iC5ztaULbPyT2dRYZQyQXg3VLFc35mPklwlg9rUu9kL8U3prEA X-Received: by 2002:a05:6830:1e86:: with SMTP id n6mr11376151otr.321.1581927520411; Mon, 17 Feb 2020 00:18:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581927520; cv=none; d=google.com; s=arc-20160816; b=DFRkjZsUoSAnPcSk5PxK37cSLAsrjdx6J/EmTYrXMzWwwK8WtNh9MlxKQY1h2IRTW7 CuAChJ9VLviIgA0ucCjyuD0+v44ZqPQ+KE+RGkEfq1es5T/yokfXGjbXr/aCxc+gpz7o 4lFrSTSZ3FImP+05GJtjO0+hd/FYjuaId04G2T+o4zMpkrS1GarLW7v0NSzERzit7b4h +Us4IwkEvFlIMuey8HGGbkCE5YotLsANmQzlnNAneliaw+BoZEZmKK1wTErPUDiCtdrw TkBDuc+RGX1LS7bWqTRCqHy60VPtXF1SvDahKU4SeQDiLX8gL9f0cIiAkEEQ6yjDR8hl d2xQ== 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=LCM1IHGDsVT8j2/eL3imtITTmjXwVTUz+mHTgctgGXM=; b=MIXw/lC+2e0lk6M/aDuhhfrGZZsTa09MT+PMDz3uc55ox1yHCjwt7QwrSZw8mSxgBc puY0XetcxWsx2XYkzOg+ZkbEEBXaViiV6NnQ2HE44Pvoh5CgJOlMAkn+75ldodaboL0S sXFHw9IGF9FPe5KaSvAQ6BxdoF98ZwadZb537d6Pamizad+psDLhQU/CX7iFIFrB4nSl Tl4Hl8kLIU7ErABCFhfdpilmrrlM6RScw7DaBoMLkmOkRCCHj1eLcw9L0gE1MJ05ZVKi bVJHWLgwG2eQIzwAiDfu8JcyplciHvxvt9pHWtpeaA3dOGrphv3ys4g3pFG56PWxl/fz lv3w== 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 m14si6567259otr.131.2020.02.17.00.18.27; Mon, 17 Feb 2020 00:18:40 -0800 (PST) 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 S1727857AbgBQISD (ORCPT + 99 others); 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--