Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1395155lqa; Mon, 29 Apr 2024 07:25:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXZWSFnfJ5ZkRBOARzxpgT3j7Dlk49p/7VoTD/G/n4BIVcexF/LGE5qwUeJP3wNbttVVTYfmzZoCMCb8MJtjYvej33Eb7iPpugUqnHt2Q== X-Google-Smtp-Source: AGHT+IFCuz9C+fFpB4zsnhjzxxCia9TaYQndwTI7/p57D9L72LmQDR4X34NOZVu5CZHBonepwFUG X-Received: by 2002:a17:903:22c9:b0:1eb:1af6:e7ea with SMTP id y9-20020a17090322c900b001eb1af6e7eamr10471622plg.34.1714400741699; Mon, 29 Apr 2024 07:25:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714400741; cv=pass; d=google.com; s=arc-20160816; b=dzPXun2iaFMpb+R9VSKkyhgljQCaC/AfEgY9orWRJ5xOkudWBMuwm8ww3wOQ+iw2Di MmlhPDnGHgYkPh9zH3TjB+UEVR7prPUALWmZxHyfmB00pwhlMiOKOKNbIu0pDllH0hgH 3Z9JTsiw8a4nMETeCueooAoU/Vw53cWDbIwCEmE7rDh3qACwHo2P65b7T3oRc6MAnxNs aBjl3GzODDwZGxApWECEf85iCLdrfZ7KbA6Dbss+G1PhGgiVYDRuoG9cAqF1gPYiUUyB eTtO+qwlIjHpTrh2+L7q6Gny/aF/csR8kL9CW5s6vTSbQxm43ft0Ni3d8C2UAtIGJU6m 3jXQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=r9cKsEjWAqPzp0tcmkjp7/SEu3eYBoWu5MsVdF+a5c0=; fh=mp5dXrPiRTLy0WeGcL4Be+g2ODZx4bHQ2UXHL7DrIbU=; b=p8YCxZN0OIOt/2I8dhbHgiPOr4SXsE/pAI2KqkYbuFB3D8ku+fsC9+PSrsILDgiKnc OH2CwXJIKDd5AhSSCeyetoHUpMAQRV4MZtqRQNGokqHaZxT1RxHWibk8t2aV9Rro4cxG A91pddmsLbgtCRPwbF3jWHXR4NtE1JEpC0tdBpfFBZ4yaIUQrJ2vSGy9nCdnc1CQ+avD 1J3r37NomTgtu6ahe9njb53IkkXZuM1fsNzyebY1n0OJ6aen1R6a1nRc49Lta8BnmurO y9POXfbqwGjpSW2/lpwwO+nWLHoVOhCqcX68E14Go4naHlCX/8qAHy0FA/tSe3G/5CL9 e7LQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-162403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162403-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id iz12-20020a170902ef8c00b001e247c705adsi19732663plb.376.2024.04.29.07.25.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Apr 2024 07:25:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-162403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-162403-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-162403-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 67ECAB2B1BC for ; Mon, 29 Apr 2024 13:56:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22E0E74BF5; Mon, 29 Apr 2024 13:56:19 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4412745C0 for ; Mon, 29 Apr 2024 13:56:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714398978; cv=none; b=ZRNON9yrJqjHKr9cJWzlNAfaTFFV64Cv+2f/ZIO6nYSLD2q0YrmX6ipWqxxAVwBYY/VV4dQmtOqMqRZDT5duxwe4/Z0ZeERI/YjQs40iSuUQBmuHk9hXGsk96PdJ5uKziqXzkyRrWgfkhYrVLd5AfBCQrLmRu2n1WCnBczJ5WgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714398978; c=relaxed/simple; bh=XJJqLybtv4ZNsL2tQOnqLpSX+EdHqF6ImFUkTFrJaXE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AiLGl5ktyD+BjP8x7ngWnbcF7kk3EpbaFOgixp7ttRZz8tomQ5CZtabwSrIlUzsqkepiYY2ck7tJOOMECksj1nhuWYaERykAmOj4g42ZELNjfzrZ4JF5ZWM9DzNepFTMAojyZ4/5fXDA5/7JOez48nuQS0V/+oPl6GPyLtfXXIw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s1RU7-0001tD-C8; Mon, 29 Apr 2024 15:55:59 +0200 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s1RU5-00EzUo-VH; Mon, 29 Apr 2024 15:55:57 +0200 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s1RU5-00BTdr-2q; Mon, 29 Apr 2024 15:55:57 +0200 Date: Mon, 29 Apr 2024 15:55:57 +0200 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Andy Shevchenko Cc: Arnd Bergmann , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Wolfram Sang , linux-i2c@vger.kernel.org, kernel@pengutronix.de Subject: Re: [PATCH RFC] i2c: Add a void pointer to i2c_device_id Message-ID: References: <20240426213832.915485-2-u.kleine-koenig@pengutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yplwnmmgy24mn2r3" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org --yplwnmmgy24mn2r3 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Andy, On Mon, Apr 29, 2024 at 01:28:32PM +0300, Andy Shevchenko wrote: > On Mon, Apr 29, 2024 at 12:21:05PM +0200, Uwe Kleine-K=F6nig wrote: > > On Mon, Apr 29, 2024 at 11:54:29AM +0300, Andy Shevchenko wrote: > > > On Fri, Apr 26, 2024 at 11:38:33PM +0200, Uwe Kleine-K=F6nig wrote: >=20 > ... >=20 > > > > static const struct i2c_device_id wlf_gf_module_id[] =3D { > > > > - { "wlf-gf-module", 0 }, > > > > + { "wlf-gf-module", }, > > >=20 > > > In such cases the inner comma is redundant as well. > >=20 > > I would tend to keep the comma, but no strong opinion on my side. >=20 > It's just a confusing leftover in my opinion. >=20 > > If another member init is added later, the line has to be touched > > anyhow, but in the layout: > >=20 > > ... =3D { > > { > > "wlf-gf-module", > > }, > > { } > > } > >=20 > > I'd keep it for sure. >=20 > That's not what I object. Here I am 100% with you. OK, agreed. I'm not sure yet if I prefer static const struct i2c_device_id wlf_gf_module_id[] =3D { { "wlf-gf-module" }, { } }; or static const struct i2c_device_id wlf_gf_module_id[] =3D { { .name =3D "wlf-gf-module" }, { } }; > > > In general idea might be okay, but I always have the same Q (do we ha= ve it > > > being clarified in the documentation, btw): is an ID table the ABI or= not? > > > In another word, how should we treat the changes there, because ID ta= bles > > > are being used by the user space tools. > >=20 > > Note that the layout doesn't change and the traditional interpretation > > of the data still works fine. Or do you see something that I miss? >=20 > Do we have any configurations / architectures / etc when > sizeof(kernel_ulong_t) !=3D sizeof(void *) ? If not, we are fine. According to https://wiki.debian.org/ArchitectureSpecificsMemo (my goto address for such questions) we have sizeof(void *) =3D=3D sizeof(long) on all archs. Also storing a pointer in today's struct i2c_device_id::driver_data is so common that it should be safe to assume that sizeof(void *) <=3D sizeof(kernel_ulong_t). And that <=3D is enough that the union doesn't get bigger. Best regards Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --yplwnmmgy24mn2r3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEP4GsaTp6HlmJrf7Tj4D7WH0S/k4FAmYvpuwACgkQj4D7WH0S /k6DJAgAqZLAEMwQxR26phS6LkfoFWF90kQ7uLUalhP6/azWI17TvOZ8dT+wvyIs ivFfDWWPKzm6I2oQVwxE7wjXfaywlXIPoB+3fPlwjnsXk3vkgh1Yr5riUwS/cA/D oAxMwDqEWAR5lpJpYPtaS0ROcTQyUSwpVF3sOK0X5Nx3UPu7Bp9T6/Wy2Zx48GxH AzrhhNj5Q0di//Bf6mI23ldI4CcPk2b1dweu/QYYIvczddF411DOQQpOMCmvegRg BZeh2hZLOyjqIDDUIo1NYCG9s9uZ2tJ3isNeL5qa7iA9ia36CBERhTVjHlCSQksA 2RRvwiFhudWYAxMFrsc1ZOq0IfbE/w== =78yx -----END PGP SIGNATURE----- --yplwnmmgy24mn2r3--