From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D13DFC7EE23 for ; Mon, 8 May 2023 12:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234271AbjEHMjc (ORCPT ); Mon, 8 May 2023 08:39:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234626AbjEHMj2 (ORCPT ); Mon, 8 May 2023 08:39:28 -0400 Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::228]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41CEE394A0; Mon, 8 May 2023 05:39:17 -0700 (PDT) Received: from booty (unknown [77.244.183.192]) (Authenticated sender: luca.ceresoli@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id DDD051BF205; Mon, 8 May 2023 12:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1683549555; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GBpPTSvjJBodq2hEUh+TCqSl291LoN170O0uNswowTg=; b=FCdBkLtYMFXKTLIhxQidLZ6ZHTsZ4TgPd/ccHxlEhAcdICE0SIW0g/RPUj2kPEFw8nh/M4 Nt0FKUIkaVvWSbYoOWyZwEQbrswQR/X3SD+PClP8jLGNG4mZSbCK9kzrPbZr79ptYHDqMJ y4TFe+9thtFdWV/pcYYNXyjInYOoF1PnUUnxCYnkpfTXhMA/LeANAyEQEXKwbRfS/QCFX4 n31XOIg/ukx2n6TBPsBTVACavfoJ+eP6XntZWeATLnhCpH3+ucqYkHgXtfTJ/yUzZPyGRK aXVlSy+tvkEQq2qxFgNB1/3fFO7ySzfZP+2Tpxa2g74XQxeX0GuF66iYd/XhuQ== Date: Mon, 8 May 2023 14:39:12 +0200 From: Luca Ceresoli To: Marek Vasut Cc: linux-clk@vger.kernel.org, Alex Helms , Geert Uytterhoeven , Magnus Damm , Michael Turquette , Nathan Chancellor , Nick Desaulniers , Stephen Boyd , Tom Rix , linux-renesas-soc@vger.kernel.org Subject: Re: [PATCH 1/3] clk: vc5: Fix .driver_data content in i2c_device_id Message-ID: <20230508143912.741e67a5@booty> In-Reply-To: <20230507133906.15061-1-marek.vasut+renesas@mailbox.org> References: <20230507133906.15061-1-marek.vasut+renesas@mailbox.org> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org Hi Marek, On Sun, 7 May 2023 15:39:04 +0200 Marek Vasut 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 > --- > Cc: Alex Helms > Cc: Geert Uytterhoeven > Cc: Luca Ceresoli > Cc: Magnus Damm > Cc: Michael Turquette > Cc: Nathan Chancellor > Cc: Nick Desaulniers > Cc: Stephen Boyd > Cc: Tom Rix > 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 Embedded Linux and Kernel engineering https://bootlin.com