lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 17 Feb 2020 08:58:39 +0100 From: Robert Richter <rrichter@...vell.com> To: Wolfram Sang <wsa+renesas@...g-engineering.com> CC: <linux-i2c@...r.kernel.org>, Benjamin Tissoires <benjamin.tissoires@...hat.com>, Phil Reid <preid@...ctromag.com.au>, "Wolfram Sang" <wsa@...-dreams.de>, Jean Delvare <jdelvare@...e.com>, George Cherian <gcherian@...vell.com>, <linux-kernel@...r.kernel.org> Subject: Re: [PATCH 1/3] i2c: convert SMBus alert setup function to return an ERRPTR 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@...g-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
Powered by blists - more mailing lists