From: Uwe Kleine-König (The Capable Hub) Date: Tue, 19 May 2026 15:36:13 +0000 (+0200) Subject: mctp: i2c: Use named initializers for struct i2c_device_id X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b87d2ab030fd969ea626b2da95594949a2c0508;p=thirdparty%2Flinux.git mctp: i2c: 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 arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. While touching this array, unify usage of whitespace in the list terminator to what most other arrays are using. Signed-off-by: Uwe Kleine-König (The Capable Hub) Acked-by: Jeremy Kerr Link: https://patch.msgid.link/20260519153613.1594429-2-u.kleine-koenig@baylibre.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/mctp/mctp-i2c.c b/drivers/net/mctp/mctp-i2c.c index ee2913758e54e..b02476d338bbf 100644 --- a/drivers/net/mctp/mctp-i2c.c +++ b/drivers/net/mctp/mctp-i2c.c @@ -1101,8 +1101,8 @@ static struct notifier_block mctp_i2c_notifier = { }; static const struct i2c_device_id mctp_i2c_id[] = { - { "mctp-i2c-interface" }, - {} + { .name = "mctp-i2c-interface" }, + { } }; MODULE_DEVICE_TABLE(i2c, mctp_i2c_id);