Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp495080pxb; Mon, 25 Oct 2021 12:22:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSdOsWyvXm/MJptSrzMj70dO5TISIwpnpusj4tnDGN7SXSuybiaMeOwmtZKQH0sdGGM9nV X-Received: by 2002:a17:90b:805:: with SMTP id bk5mr18656900pjb.124.1635189736661; Mon, 25 Oct 2021 12:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635189736; cv=none; d=google.com; s=arc-20160816; b=qs5Zto/JlTLjqmXm7hl836yQg9VBJe37PCN/5CYVKAGmDncHV6N2J7RZLr2tlkamIh 0cvGQwNGzUhnEHJb2TuhVuTYtzH8nudCl/uJLD0UqfC4Wqn9vq1mKW4g8hsNaGVcZnAB mvZRnMU8U/Ouxy05PfIzzs1uxvk2So+M3rKKDZMHuL5nyy43InsOf+gMxgwaC4VZphl6 /lH2RkyWxM1HdTfmrl300Q5Tb+SdiCm3Zn5cAuyLPE6slMl0n2SnEEx8DxFRO2w97j+0 /G/kf2FmCWYqv6nqEEkKcXAx2R87nsNEEoz0Le2lRa7lMSFUWpxdh0nkQ4DNCFsH0Q3B bQOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=0W89wY5ktyrMvENcYh0nRxWDxfoqJRyHia44B8svUww=; b=ewmpFyevHJvEerQOJHS8YR4+qBRagbPkpF94Gt74EZrnFTwv/sN11ffFKuZRTS1yvc wswZm6NWMLwaAt+7V1IaGb5O7dBZz8ao6meGgWLqj6pQKKL5P/1XLzyMe5IkJkgoUHtX vW5Pzi2YVa0hQSrWReFBXE+nXxv3xcZiV3zGZQRJSDiOcIR/nsleZ1p5AoGE9RoNMndL sF3Yugbzk/vwogg78h7DEgTDIiYRpEomhYBHz6iVi0f2YcUoaifAV1OtDBPfj0qwnxo9 0DITS3fkWbUR3Wrh6n2CkmWPrzmffRvGMS4YFf8d7MY+SsJ0zqF9TPpFmrD10mphAzyz WLSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si24932372pgt.343.2021.10.25.12.22.03; Mon, 25 Oct 2021 12:22:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231339AbhJYTJT (ORCPT + 99 others); Mon, 25 Oct 2021 15:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231303AbhJYTJS (ORCPT ); Mon, 25 Oct 2021 15:09:18 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACFD8C061745 for ; Mon, 25 Oct 2021 12:06:55 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mf5J8-0001dM-6j; Mon, 25 Oct 2021 21:06:54 +0200 Received: from pengutronix.de (2a03-f580-87bc-d400-e094-d8e8-b5aa-4a00.ip6.dokom21.de [IPv6:2a03:f580:87bc:d400:e094:d8e8:b5aa:4a00]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 3C9A169DAE8; Mon, 25 Oct 2021 19:06:53 +0000 (UTC) Date: Mon, 25 Oct 2021 21:06:51 +0200 From: Marc Kleine-Budde To: Vincent MAILHOL Cc: linux-can , netdev , open list Subject: Re: [PATCH v2 1/3] can: dev: replace can_priv::ctrlmode_static by can_get_static_ctrlmode() Message-ID: <20211025190651.p4ivcrqinknmwuu5@pengutronix.de> References: <20211009131304.19729-1-mailhol.vincent@wanadoo.fr> <20211009131304.19729-2-mailhol.vincent@wanadoo.fr> <20211024183007.u5pvfnlawhf36lfn@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="hdl3z2qryohrhhie" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --hdl3z2qryohrhhie Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 26.10.2021 02:22:36, Vincent MAILHOL wrote: > Welcome back on the mailing list, hope you had some nice > holidays! Thanks was really nice, good weather, 1000km of cycling and hanging around in Vienna. :D > And also thanks a lot for your support over the last > few months on my other series to introduce the TDC netlink > interface :) The pleasure is on my side, working with you! > Le lun. 25 oct. 2021 =C3=A0 03:30, Marc Kleine-Budde = a =C3=A9crit : > > > > On 09.10.2021 22:13:02, Vincent Mailhol wrote: > > > The statically enabled features of a CAN controller can be retrieved > > > using below formula: > > > > > > | u32 ctrlmode_static =3D priv->ctrlmode & ~priv->ctrlmode_supported; > > > > > > As such, there is no need to store this information. This patch remove > > > the field ctrlmode_static of struct can_priv and provides, in > > > replacement, the inline function can_get_static_ctrlmode() which > > > returns the same value. > > > > > > A condition sine qua non for this to work is that the controller > > > static modes should never be set in can_priv::ctrlmode_supported. This > > > is already the case for existing drivers, however, we added a warning > > > message in can_set_static_ctrlmode() to check that. > > > > Please make the can_set_static_ctrlmode to return an error in case of a > > problem. Adjust the drivers using the function is this patch, too. >=20 > I didn't do so initially because this is more a static > configuration issue that should only occur during > development. Nonetheless, what you suggest is really simple. >=20 > I will just split the patch in two: one of the setter and one for > the getter and address your comments. Fine with me. Most important thing is, that the kernel compiles after each patch. regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --hdl3z2qryohrhhie Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEK3kIWJt9yTYMP3ehqclaivrt76kFAmF3AEkACgkQqclaivrt 76lZQwf/aUFiJLjCo3hbPXGkOXwuXKQNKDV4YgEBk31+pHC3hCFuL9sdnwizXIGd xjccJ0e4gCK5rFvKjKv3GVpemP6gKEZxEo9MAPWjOsqSPxCy3B65yUJTQGfFrv9H jDvVr2dMfYTTWw8pg1//7PfCpc5FjBR/oR3UZfkcmUbP17FF5ktYErF+86CakuyG 5mIdzZDwmcod3F2u8nbE60kYeCueYBq1t6VsP0n6HMBJBqd/OdnrraAloDvYHb87 pehrAx87/YTnr3/aCoBQXPVBzCUvtgUNLsZzTQskbNJRVaYJ8SgqyGXHVw4RyadI fPjJNHcsMbCQpbW4t4NNwYnAbMMokA== =PK3o -----END PGP SIGNATURE----- --hdl3z2qryohrhhie--