Message ID | 01cef629-5650-4ef2-93db-9a16893ff5a0@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | i2c: Replace lists of special clients with flagging of such clients | expand |
Hi Heiner,
kernel test robot noticed the following build errors:
[auto build test ERROR on wsa/i2c/for-next]
[also build test ERROR on linus/master v6.11-rc4 next-20240822]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Heiner-Kallweit/i2c-Replace-list-based-mechanism-for-handling-auto-detected-clients/20240822-044950
base: https://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git i2c/for-next
patch link: https://lore.kernel.org/r/01cef629-5650-4ef2-93db-9a16893ff5a0%40gmail.com
patch subject: [PATCH 3/3] i2c: Remove obsolete members of i2c_adapter and i2c_client
config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20240823/202408230156.SZSDmCCc-lkp@intel.com/config)
compiler: powerpc64-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240823/202408230156.SZSDmCCc-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202408230156.SZSDmCCc-lkp@intel.com/
All errors (new ones prefixed by >>):
sound/ppc/keywest.c: In function 'keywest_attach_adapter':
>> sound/ppc/keywest.c:68:43: error: 'struct i2c_client' has no member named 'detected'
68 | list_add_tail(&keywest_ctx->client->detected,
| ^~
sound/ppc/keywest.c:69:70: error: 'struct i2c_driver' has no member named 'clients'
69 | &to_i2c_driver(keywest_ctx->client->dev.driver)->clients);
| ^~
vim +68 sound/ppc/keywest.c
5de4155bb3760fc Jean Delvare 2009-04-20 28
5de4155bb3760fc Jean Delvare 2009-04-20 29 /*
5de4155bb3760fc Jean Delvare 2009-04-20 30 * This is kind of a hack, best would be to turn powermac to fixed i2c
5de4155bb3760fc Jean Delvare 2009-04-20 31 * bus numbers and declare the sound device as part of platform
5de4155bb3760fc Jean Delvare 2009-04-20 32 * initialization
5de4155bb3760fc Jean Delvare 2009-04-20 33 */
^1da177e4c3f415 Linus Torvalds 2005-04-16 34 static int keywest_attach_adapter(struct i2c_adapter *adapter)
^1da177e4c3f415 Linus Torvalds 2005-04-16 35 {
5de4155bb3760fc Jean Delvare 2009-04-20 36 struct i2c_board_info info;
04a9af2e0384234 Wolfram Sang 2020-03-26 37 struct i2c_client *client;
^1da177e4c3f415 Linus Torvalds 2005-04-16 38
^1da177e4c3f415 Linus Torvalds 2005-04-16 39 if (! keywest_ctx)
^1da177e4c3f415 Linus Torvalds 2005-04-16 40 return -EINVAL;
^1da177e4c3f415 Linus Torvalds 2005-04-16 41
903dba1eae49270 Jean Delvare 2009-05-14 42 if (strncmp(adapter->name, "mac-io", 6))
ac397c80de89509 Wolfram Sang 2015-05-09 43 return -EINVAL; /* ignored */
^1da177e4c3f415 Linus Torvalds 2005-04-16 44
5de4155bb3760fc Jean Delvare 2009-04-20 45 memset(&info, 0, sizeof(struct i2c_board_info));
75b1a8f9d62e50f Joe Perches 2021-01-04 46 strscpy(info.type, "keywest", I2C_NAME_SIZE);
5de4155bb3760fc Jean Delvare 2009-04-20 47 info.addr = keywest_ctx->addr;
04a9af2e0384234 Wolfram Sang 2020-03-26 48 client = i2c_new_client_device(adapter, &info);
04a9af2e0384234 Wolfram Sang 2020-03-26 49 if (IS_ERR(client))
04a9af2e0384234 Wolfram Sang 2020-03-26 50 return PTR_ERR(client);
04a9af2e0384234 Wolfram Sang 2020-03-26 51 keywest_ctx->client = client;
04a9af2e0384234 Wolfram Sang 2020-03-26 52
18c4078489fe064 Takashi Iwai 2009-10-01 53 /*
18c4078489fe064 Takashi Iwai 2009-10-01 54 * We know the driver is already loaded, so the device should be
18c4078489fe064 Takashi Iwai 2009-10-01 55 * already bound. If not it means binding failed, and then there
18c4078489fe064 Takashi Iwai 2009-10-01 56 * is no point in keeping the device instantiated.
18c4078489fe064 Takashi Iwai 2009-10-01 57 */
a7cde6d25c494e1 Lars-Peter Clausen 2013-09-29 58 if (!keywest_ctx->client->dev.driver) {
18c4078489fe064 Takashi Iwai 2009-10-01 59 i2c_unregister_device(keywest_ctx->client);
18c4078489fe064 Takashi Iwai 2009-10-01 60 keywest_ctx->client = NULL;
18c4078489fe064 Takashi Iwai 2009-10-01 61 return -ENODEV;
18c4078489fe064 Takashi Iwai 2009-10-01 62 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 63
5de4155bb3760fc Jean Delvare 2009-04-20 64 /*
5de4155bb3760fc Jean Delvare 2009-04-20 65 * Let i2c-core delete that device on driver removal.
5de4155bb3760fc Jean Delvare 2009-04-20 66 * This is safe because i2c-core holds the core_lock mutex for us.
5de4155bb3760fc Jean Delvare 2009-04-20 67 */
5de4155bb3760fc Jean Delvare 2009-04-20 @68 list_add_tail(&keywest_ctx->client->detected,
a7cde6d25c494e1 Lars-Peter Clausen 2013-09-29 69 &to_i2c_driver(keywest_ctx->client->dev.driver)->clients);
^1da177e4c3f415 Linus Torvalds 2005-04-16 70 return 0;
^1da177e4c3f415 Linus Torvalds 2005-04-16 71 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 72
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index b9f1b1a1b..4224ba6b1 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -1499,8 +1499,6 @@ static int i2c_register_adapter(struct i2c_adapter *adap) adap->locked_flags = 0; rt_mutex_init(&adap->bus_lock); rt_mutex_init(&adap->mux_lock); - mutex_init(&adap->userspace_clients_lock); - INIT_LIST_HEAD(&adap->userspace_clients); /* Set default timeout to 1 second if not already set */ if (adap->timeout == 0) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index ba2564fe4..ada90df88 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -313,8 +313,6 @@ struct i2c_driver { * @dev: Driver model device node for the slave. * @init_irq: IRQ that was set at initialization * @irq: indicates the IRQ generated by this device (if any) - * @detected: member of an i2c_driver.clients list or i2c-core's - * userspace_devices list * @slave_cb: Callback when I2C slave mode of an adapter is used. The adapter * calls it to pass on slave events to the slave driver. * @devres_group_id: id of the devres group that will be created for resources @@ -345,7 +343,6 @@ struct i2c_client { struct device dev; /* the device structure */ int init_irq; /* irq set at initialization */ int irq; /* irq issued by device */ - struct list_head detected; #if IS_ENABLED(CONFIG_I2C_SLAVE) i2c_slave_cb_t slave_cb; /* callback for slave mode */ #endif @@ -751,9 +748,6 @@ struct i2c_adapter { char name[48]; struct completion dev_released; - struct mutex userspace_clients_lock; - struct list_head userspace_clients; - struct i2c_bus_recovery_info *bus_recovery_info; const struct i2c_adapter_quirks *quirks;
After the lists of auto-detected and userspace-created clients have been removed, we can remove now unused struct members. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> --- drivers/i2c/i2c-core-base.c | 2 -- include/linux/i2c.h | 6 ------ 2 files changed, 8 deletions(-)