w1 drivers patches
Krzysztof Kozlowski
maintainercover w1 drivers patches
Hi Greg,
I have only one patch for this cycle.
Best regards,
Krzysztof
Uwe Kleine-König (The Capable Hub) (1):
w1: ds2482: Use named initializers for arrays of i2c_device_data
drivers/w1/masters/ds2482.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.53.0
Krzysztof Kozlowski
maintainerPATCH 1/1 w1: ds2482: Use named initializers for arrays of i2c_device_data
From: Uwe Kleine-König (The Capable Hub) <[email protected]>
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.
The mentioned robustness is relevant for a planned change to struct i2c_device_id that replaces .driver_data by an anonymous union.
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
--- drivers/w1/masters/ds2482.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/w1/masters/ds2482.c +2 -2
@@ -539,8 +539,8 @@ static void ds2482_remove(struct i2c_client *client)* Driver data (common to all clients) */ static const struct i2c_device_id ds2482_id[] = { - {"ds2482" }, - {"ds2484" }, + { .name ="ds2482" }, + { .name ="ds2484" }, { } };MODULE_DEVICE_TABLE (i2c, ds2482_id);
Signature · 1 line
2.53.0
Re: [PATCH 1/1] w1: ds2482: Use named initializers for arrays of i2c_device_data
Hello,
Quoted 10 lines · Krzysztof Kozlowski
From: Uwe Kleine-König (The Capable Hub) <[email protected]>
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.
The mentioned robustness is relevant for a planned change to struct
i2c_device_idthat replaces .driver_data by an anonymous union.
Quoted 7 lines
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
I wonder about this patch because it was included in next as 10cc9de3d4fc between next-20260526 and next-20260604 (inclusive) but isn't included any more in next-20260605.
I assume this mail is part of the submit path of w1 to mainline and Krzysztof dropped it from his tree to not create a conflict in next when Greg adds a slightly modified variant?
If so, the expectation that this patch makes it into 7.2-rc1 is still justified, right?
Best regards
Uwe
Krzysztof Kozlowski
maintainerRe: [PATCH 1/1] w1: ds2482: Use named initializers for arrays of i2c_device_data
Quoted 21 lines · Uwe Kleine-König (The Capable Hub)
Hello,
Quoted 10 lines · Krzysztof Kozlowski
From: Uwe Kleine-König (The Capable Hub) <[email protected]>
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.
The mentioned robustness is relevant for a planned change to struct
i2c_device_idthat replaces .driver_data by an anonymous union.Quoted 7 lines
This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds.
Quoted 7 lines
I wonder about this patch because it was included in next as
10cc9de3d4fcbetween next-20260526 and next-20260604 (inclusive) but isn't included any more in next-20260605.I assume this mail is part of the submit path of w1 to mainline and Krzysztof dropped it from his tree to not create a conflict in next when Greg adds a slightly modified variant?
This was sent as patch, not pull-req, so to avoid duplicate patch message from Mark.
Quoted 3 lines
If so, the expectation that this patch makes it into 7.2-rc1 is still justified, right?
Yes.
Best regards,
Krzysztof