From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: linux-clk@vger.kernel.org,
Alex Helms <alexander.helms.jy@renesas.com>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Magnus Damm <magnus.damm@gmail.com>,
Michael Turquette <mturquette@baylibre.com>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Stephen Boyd <sboyd@kernel.org>, Tom Rix <trix@redhat.com>,
linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH 1/3] clk: vc5: Fix .driver_data content in i2c_device_id
Date: Mon, 8 May 2023 14:39:12 +0200 [thread overview]
Message-ID: <20230508143912.741e67a5@booty> (raw)
In-Reply-To: <20230507133906.15061-1-marek.vasut+renesas@mailbox.org>
Hi Marek,
On Sun, 7 May 2023 15:39:04 +0200
Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:
> 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
> 's@.compatible = "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 <marek.vasut+renesas@mailbox.org>
> ---
> Cc: Alex Helms <alexander.helms.jy@renesas.com>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Luca Ceresoli <luca.ceresoli@bootlin.com>
> Cc: Magnus Damm <magnus.damm@gmail.com>
> Cc: Michael Turquette <mturquette@baylibre.com>
> Cc: Nathan Chancellor <nathan@kernel.org>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Cc: Stephen Boyd <sboyd@kernel.org>
> Cc: Tom Rix <trix@redhat.com>
> Cc: linux-clk@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
> drivers/clk/clk-versaclock5.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/clk-versaclock5.c b/drivers/clk/clk-versaclock5.c
> index fa71a57875ce..5452471b7ba5 100644
> --- a/drivers/clk/clk-versaclock5.c
> +++ b/drivers/clk/clk-versaclock5.c
> @@ -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 },
Apparently nobody even used i2c device ids, otherwise this would have
gone loudly bad!
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2023-05-08 12:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-07 13:39 [PATCH 1/3] clk: vc5: Fix .driver_data content in i2c_device_id Marek Vasut
2023-05-07 13:39 ` [PATCH 2/3] clk: vc7: " Marek Vasut
2023-05-08 13:05 ` Geert Uytterhoeven
2023-05-10 21:27 ` Stephen Boyd
2023-05-07 13:39 ` [PATCH 3/3] clk: rs9: " Marek Vasut
2023-05-08 13:05 ` Geert Uytterhoeven
2023-05-10 21:27 ` Stephen Boyd
2023-05-08 12:39 ` Luca Ceresoli [this message]
2023-05-08 13:01 ` [PATCH 1/3] clk: vc5: " Geert Uytterhoeven
2023-05-10 21:27 ` Stephen Boyd
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230508143912.741e67a5@booty \
--to=luca.ceresoli@bootlin.com \
--cc=alexander.helms.jy@renesas.com \
--cc=geert+renesas@glider.be \
--cc=linux-clk@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mturquette@baylibre.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=sboyd@kernel.org \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox