clk: vc5: Fix .driver_data content in i2c_device_id
Subsystems (3)
PATCH 1/3 clk: vc5: Fix .driver_data content in i2c_device_id
The .driver_data content in i2c_device_id table must match the .data content in of_device_id table, else device_get_match_data() would return bogus value on i2c_device_id match. Align the two tables.
The i2c_device_id table is now converted from of_device_id using '[email protected] = "idt,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'
---
Cc: Alex Helms <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/clk/clk-versaclock5.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/clk/clk-versaclock5.c +8 -8
@@ -1271,14 +1271,14 @@ static const struct vc5_chip_info idt_5p49v6975_info = { };static const struct i2c_device_id vc5_id[] = { - {"5p49v5923" , .driver_data =IDT_VC5_5P49V5923 }, - {"5p49v5925" , .driver_data =IDT_VC5_5P49V5925 }, - {"5p49v5933" , .driver_data =IDT_VC5_5P49V5933 }, - {"5p49v5935" , .driver_data =IDT_VC5_5P49V5935 }, - {"5p49v60" , .driver_data =IDT_VC6_5P49V60 }, - {"5p49v6901" , .driver_data =IDT_VC6_5P49V6901 }, - {"5p49v6965" , .driver_data =IDT_VC6_5P49V6965 }, - {"5p49v6975" , .driver_data =IDT_VC6_5P49V6975 }, + {"5p49v5923" , .driver_data = (kernel_ulong_t)&idt_5p49v5923_info }, + {"5p49v5925" , .driver_data = (kernel_ulong_t)&idt_5p49v5925_info }, + {"5p49v5933" , .driver_data = (kernel_ulong_t)&idt_5p49v5933_info }, + {"5p49v5935" , .driver_data = (kernel_ulong_t)&idt_5p49v5935_info }, + {"5p49v60" , .driver_data = (kernel_ulong_t)&idt_5p49v60_info }, + {"5p49v6901" , .driver_data = (kernel_ulong_t)&idt_5p49v6901_info }, + {"5p49v6965" , .driver_data = (kernel_ulong_t)&idt_5p49v6965_info }, + {"5p49v6975" , .driver_data = (kernel_ulong_t)&idt_5p49v6975_info }, { } };MODULE_DEVICE_TABLE (i2c, vc5_id);
Signature · 1 line
2.39.2
PATCH 2/3 clk: vc7: Fix .driver_data content in i2c_device_id
The .driver_data content in i2c_device_id table must match the .data content in of_device_id table, else device_get_match_data() would return bogus value on i2c_device_id match. Align the two tables.
The i2c_device_id table is now converted from of_device_id using
'[email protected] = "renesas,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'
---
Cc: Alex Helms <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/clk/clk-versaclock7.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/clk-versaclock7.c +1 -1
@@ -1282,7 +1282,7 @@ static const struct regmap_config vc7_regmap_config = { };static const struct i2c_device_id vc7_i2c_id[] = { - {"rc21008a" ,VC7_RC21008A }, + {"rc21008a" , .driver_data = (kernel_ulong_t)&vc7_rc21008a_info }, {} };MODULE_DEVICE_TABLE (i2c, vc7_i2c_id);
Signature · 1 line
2.39.2
Re: [PATCH 2/3] clk: vc7: Fix .driver_data content in i2c_device_id
Quoted 10 lines · Marek Vasut
The .driver_data content in
i2c_device_idtable must match the .data content inof_device_idtable, elsedevice_get_match_data()would return bogus value oni2c_device_idmatch. Align the two tables.The
i2c_device_idtable is now converted fromof_device_idusing
'[email protected] = "renesas,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'Fixes 48c5e98fedd9 ("clk: Renesas versaclock7 ccf device driver")Signed-off-by Marek Vasut <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 2/3] clk: vc7: Fix .driver_data content in i2c_device_id
In reply to Marek VasutQuoting Marek Vasut (2023-05-07 06:39:05)
Quoted 11 lines
The .driver_data content in
i2c_device_idtable must match the .data content inof_device_idtable, elsedevice_get_match_data()would return bogus value oni2c_device_idmatch. Align the two tables.The
i2c_device_idtable is now converted fromof_device_idusing
'[email protected] = "renesas,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'Fixes 48c5e98fedd9 ("clk: Renesas versaclock7 ccf device driver")Signed-off-by Marek Vasut <[email protected]>---
Applied to clk-next
PATCH 3/3 clk: rs9: Fix .driver_data content in i2c_device_id
In reply to Marek VasutThe .driver_data content in i2c_device_id table must match the .data content in of_device_id table, else device_get_match_data() would return bogus value on i2c_device_id match. Align the two tables.
The i2c_device_id table is now converted from of_device_id using
'[email protected] = "renesas,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'
---
Cc: Alex Helms <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: [email protected]
Cc: [email protected]
--- drivers/clk/clk-renesas-pcie.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/clk/clk-renesas-pcie.c +2 -2
@@ -392,8 +392,8 @@ static const struct rs9_chip_info renesas_9fgv0441_info = { };static const struct i2c_device_id rs9_id[] = { - {"9fgv0241" , .driver_data =RENESAS_9FGV0241 }, - {"9fgv0441" , .driver_data =RENESAS_9FGV0441 }, + {"9fgv0241" , .driver_data = (kernel_ulong_t)&renesas_9fgv0241_info }, + {"9fgv0441" , .driver_data = (kernel_ulong_t)&renesas_9fgv0441_info }, { } };MODULE_DEVICE_TABLE (i2c, rs9_id);
Signature · 1 line
2.39.2
Re: [PATCH 3/3] clk: rs9: Fix .driver_data content in i2c_device_id
Quoted 10 lines · Marek Vasut
The .driver_data content in
i2c_device_idtable must match the .data content inof_device_idtable, elsedevice_get_match_data()would return bogus value oni2c_device_idmatch. Align the two tables.The
i2c_device_idtable is now converted fromof_device_idusing
'[email protected] = "renesas,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'Fixes 892e0ddea1aa ("clk: rs9: Add Renesas 9-series PCIe clock generator driver")Signed-off-by Marek Vasut <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Re: [PATCH 3/3] clk: rs9: Fix .driver_data content in i2c_device_id
In reply to Marek VasutQuoting Marek Vasut (2023-05-07 06:39:06)
Quoted 11 lines
The .driver_data content in
i2c_device_idtable must match the .data content inof_device_idtable, elsedevice_get_match_data()would return bogus value oni2c_device_idmatch. Align the two tables.The
i2c_device_idtable is now converted fromof_device_idusing
'[email protected] = "renesas,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'Fixes 892e0ddea1aa ("clk: rs9: Add Renesas 9-series PCIe clock generator driver")Signed-off-by Marek Vasut <[email protected]>---
Applied to clk-next
Hi Marek,
Quoted 40 lines · On Sun, 7 May 2023 15:39:04 +0200 Marek Vasut…
The .driver_data content in
i2c_device_idtable must match the .data content inof_device_idtable, elsedevice_get_match_data()would return bogus value oni2c_device_idmatch. Align the two tables.The
i2c_device_idtable is now converted fromof_device_idusing '[email protected] = "idt,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'Fixes 9adddb01ce5f ("clk: vc5: Add structure to describe particular chip features")Signed-off-by Marek Vasut <[email protected]>---
Cc: Alex Helms <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Luca Ceresoli <[email protected]>
Cc: Magnus Damm <[email protected]>
Cc: Michael Turquette <[email protected]>
Cc: Nathan Chancellor <[email protected]>
Cc: Nick Desaulniers <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Tom Rix <[email protected]>
Cc: [email protected]
Cc: [email protected]--- drivers/clk/clk-versaclock5.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)drivers/clk/clk-versaclock5.c +0
-6@@ -1271,14 +1271,14 @@ static const struct vc5_chip_info idt_5p49v6975_info = { };static const struct i2c_device_id vc5_id[] = { - {"5p49v5923" , .driver_data =IDT_VC5_5P49V5923 }, - {"5p49v5925" , .driver_data =IDT_VC5_5P49V5925 }, - {"5p49v5933" , .driver_data =IDT_VC5_5P49V5933 }, - {"5p49v5935" , .driver_data =IDT_VC5_5P49V5935 }, - {"5p49v60" , .driver_data =IDT_VC6_5P49V60 }, - {"5p49v6901" , .driver_data =IDT_VC6_5P49V6901 },
drivers/clk/clk-versaclock5.c static const struct vc5_chip_info idt_5p49v6975_info = { · line 1281
Quoted 10 lines
drivers/clk/clk-versaclock5.c +8
-2- { "5p49v6965", .driver_data = IDT_VC6_5P49V6965 }, - { "5p49v6975", .driver_data = IDT_VC6_5P49V6975 }, + { "5p49v5923", .driver_data = (kernel_ulong_t)&idt_5p49v5923_info }, + { "5p49v5925", .driver_data = (kernel_ulong_t)&idt_5p49v5925_info }, + { "5p49v5933", .driver_data = (kernel_ulong_t)&idt_5p49v5933_info }, + { "5p49v5935", .driver_data = (kernel_ulong_t)&idt_5p49v5935_info }, + { "5p49v60", .driver_data = (kernel_ulong_t)&idt_5p49v60_info }, + { "5p49v6901", .driver_data = (kernel_ulong_t)&idt_5p49v6901_info }, + { "5p49v6965", .driver_data = (kernel_ulong_t)&idt_5p49v6965_info }, + { "5p49v6975", .driver_data = (kernel_ulong_t)&idt_5p49v6975_info },
Apparently nobody even used i2c device ids, otherwise this would have gone loudly bad!
Signature · 3 lines
Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Quoted 10 lines · Marek Vasut
The .driver_data content in
i2c_device_idtable must match the .data content inof_device_idtable, elsedevice_get_match_data()would return bogus value oni2c_device_idmatch. Align the two tables.The
i2c_device_idtable is now converted fromof_device_idusing '[email protected] = "idt,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'Fixes 9adddb01ce5f ("clk: vc5: Add structure to describe particular chip features")Signed-off-by Marek Vasut <[email protected]>
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
Quoting Marek Vasut (2023-05-07 06:39:04)
Quoted 11 lines
The .driver_data content in
i2c_device_idtable must match the .data content inof_device_idtable, elsedevice_get_match_data()would return bogus value oni2c_device_idmatch. Align the two tables.The
i2c_device_idtable is now converted fromof_device_idusing '[email protected] = "idt,\([^"]\+"\), .data = \(.*\)@"\1, .driver_data = (kernel_ulong_t)\2@'Fixes 9adddb01ce5f ("clk: vc5: Add structure to describe particular chip features")Signed-off-by Marek Vasut <[email protected]>---
Applied to clk-next