diff mbox series

[net-next] mlxsw: remove I2C_CLASS_HWMON from drivers w/o detect and address_list

Message ID 77b5ab8e-20f2-4310-bd89-57db99e2f53b@gmail.com (mailing list archive)
State Accepted
Commit ccf1445204a1dec2a4807fc7f7062e273bd7cb58
Delegated to: Netdev Maintainers
Headers show
Series [net-next] mlxsw: remove I2C_CLASS_HWMON from drivers w/o detect and address_list | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1064 this patch: 1064
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1081 this patch: 1081
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1081 this patch: 1081
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 7 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-01-31--00-00 (tests: 711)

Commit Message

Heiner Kallweit Jan. 27, 2024, 3:08 p.m. UTC
Class-based I2C probing requires detect() and address_list to be
set in the I2C client driver, see checks in i2c_detect().
It's misleading to declare I2C_CLASS_HWMON support if this
precondition isn't met.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/mellanox/mlxsw/minimal.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ido Schimmel Jan. 28, 2024, 2:18 p.m. UTC | #1
On Sat, Jan 27, 2024 at 04:08:18PM +0100, Heiner Kallweit wrote:
> Class-based I2C probing requires detect() and address_list to be
> set in the I2C client driver, see checks in i2c_detect().
> It's misleading to declare I2C_CLASS_HWMON support if this
> precondition isn't met.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

> ---
>  drivers/net/ethernet/mellanox/mlxsw/minimal.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c
> index 6b98c3287..f0ceb196a 100644
> --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c
> +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c
> @@ -708,7 +708,6 @@ static const struct i2c_device_id mlxsw_m_i2c_id[] = {
>  
>  static struct i2c_driver mlxsw_m_i2c_driver = {
>  	.driver.name = "mlxsw_minimal",
> -	.class = I2C_CLASS_HWMON,
>  	.id_table = mlxsw_m_i2c_id,
>  };
>  
> -- 
> 2.43.0
>
patchwork-bot+netdevbpf@kernel.org Jan. 31, 2024, 2 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 27 Jan 2024 16:08:18 +0100 you wrote:
> Class-based I2C probing requires detect() and address_list to be
> set in the I2C client driver, see checks in i2c_detect().
> It's misleading to declare I2C_CLASS_HWMON support if this
> precondition isn't met.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> 
> [...]

Here is the summary with links:
  - [net-next] mlxsw: remove I2C_CLASS_HWMON from drivers w/o detect and address_list
    https://git.kernel.org/netdev/net-next/c/ccf1445204a1

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c
index 6b98c3287..f0ceb196a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c
@@ -708,7 +708,6 @@  static const struct i2c_device_id mlxsw_m_i2c_id[] = {
 
 static struct i2c_driver mlxsw_m_i2c_driver = {
 	.driver.name = "mlxsw_minimal",
-	.class = I2C_CLASS_HWMON,
 	.id_table = mlxsw_m_i2c_id,
 };