mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Richter <rrichter@marvell.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: <linux-i2c@vger.kernel.org>,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Phil Reid <preid@electromag.com.au>,
	"Wolfram Sang" <wsa@the-dreams.de>,
	Jean Delvare <jdelvare@suse.com>,
	George Cherian <gcherian@marvell.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR
Date: Mon, 17 Feb 2020 08:58:39 +0100	[thread overview]
Message-ID: <20200217075837.2agub5deqdpet3ce@rric.localdomain> (raw)
In-Reply-To: <20200210172929.6001-2-wsa+renesas@sang-engineering.com>

On 10.02.20 18:29:25, Wolfram Sang wrote:
> Only few drivers use this call, so drivers and I2C core are converted at
> once with this patch. By simply using i2c_new_client_device() instead of
> i2c_new_device(), we easily can return an ERRPTR for this function as
> well. To make out of tree users aware that something changed, the
> function is renamed to i2c_install_smbus_alert().
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

> -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);

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.

So how about reducing the interface to those both only to:?

 i2c_new_device()
 i2c_new_device_smbus()

To avoid a namespace collision it could also get new names using
*_create_*.

Thanks,

-Robert

  parent reply	other threads:[~2020-02-17  7:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 17:29 [PATCH 0/3] i2c: updates to SMBus alert setup Wolfram Sang
2020-02-10 17:29 ` [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR Wolfram Sang
2020-02-15  6:20   ` Jean Delvare
2020-02-15  6:50     ` Wolfram Sang
2020-02-15  8:11       ` Jean Delvare
2020-02-17  7:58   ` Robert Richter [this message]
2020-02-17  8:17     ` Wolfram Sang
2020-02-17  9:14       ` Luca Ceresoli
2020-02-17 10:00         ` Robert Richter
2020-02-17 13:29           ` Wolfram Sang
2020-02-10 17:29 ` [PATCH 2/3] i2c: rename of_i2c_setup_smbus_alert() to keep in sync Wolfram Sang
2020-02-10 17:29 ` [PATCH 3/3] i2c: smbus: remove outdated references to irq level triggers Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200217075837.2agub5deqdpet3ce@rric.localdomain \
    --to=rrichter@marvell.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=gcherian@marvell.com \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=preid@electromag.com.au \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®