From: Uwe Kleine-König (The Capable Hub) Date: Tue, 19 May 2026 16:07:21 +0000 (+0200) Subject: mlxsw: minimal: Use named initializers for struct i2c_device_id X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2664271503c52694c46e1ab7edbbf0a78d2c98a;p=thirdparty%2Flinux.git mlxsw: minimal: Use named initializers for struct i2c_device_id While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. This patch doesn't modify the compiled array, only its representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) Reviewed-by: Ido Schimmel Link: https://patch.msgid.link/20260519160721.1597568-2-u.kleine-koenig@baylibre.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/ethernet/mellanox/mlxsw/minimal.c b/drivers/net/ethernet/mellanox/mlxsw/minimal.c index 512933dbab9a3..1fee57054b20f 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/minimal.c +++ b/drivers/net/ethernet/mellanox/mlxsw/minimal.c @@ -713,7 +713,7 @@ static struct mlxsw_driver mlxsw_m_driver = { }; static const struct i2c_device_id mlxsw_m_i2c_id[] = { - { "mlxsw_minimal" }, + { .name = "mlxsw_minimal" }, { } };