Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp96362iof; Sun, 5 Jun 2022 22:14:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrrZ9kkOfjhE8RLcgNpchC3Nr9B51mLPv/PurhKNDKPULbyzBXqbxoVTb4Mc8ByF6aAYH2 X-Received: by 2002:a17:90b:164a:b0:1e8:8e0c:88dc with SMTP id il10-20020a17090b164a00b001e88e0c88dcmr1606192pjb.237.1654492470743; Sun, 05 Jun 2022 22:14:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654492470; cv=none; d=google.com; s=arc-20160816; b=lpN+YJ3Vvfkvva63qHE3g0EoMFba2+Im5z+TiCsU1rzwQUgyJc0pyp1YvvANNu9MSP gcX0R3kdXhZat9PBj/vgd2HpT+XXzl7y1jVV1C5nr737uU276q3L+AoAd1aWgE0q2Xse AQ/XH7KCUBYpvuDiZSebEvXFmMtV+St71fGs9WMaDHZ9urf5EUjqZaI6oOsXnCMyNOJm AbCL//52JEvYQCDq+Q4ocGMXuZy5Zm3yP5CgpQjIgZmGdnwMJgWNTCrjv90zWGpQPr02 4q9B/JFAuDtwJerak35GAfxzTKex6UjGQFKQyrpuvyWTWhEcQikFN9RvCP4NwsWhKEQ/ SJFQ== 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=wXs5iKZRsJWPCj51IUQN4i0VDzPXWdM1sd9RWtu2tF4=; b=Bm4T5/eesQJax2jCpGmYkkjcSXz5Dyr1426fcw+q5HoA7CWLeQcDxQBejzKmcctj3m ikmuEaz4fumPF2nksioqDMj8b/ODvgG82TSuBdNtvKmJvhWkHBeypgmt6CWSA4hrzkC5 538CEYAJ99zFS6ylI2e3DyspV9uGNmu46LCcdBN/JEbg/7ThtN2db/tgLQiTVpsDYtpn k8C0E82VvJS8CXXaoDmvEXxakcnKz3qxt3GnMMZU/WdEZCjNyys2sdQXLC327j4xM9fD BK30nIeTxlYr+tW3aiTDqbJF+KG/fIId3Sym8TB91Bh6KzvOITgzIgNmhuG0BRi1ctUR PHgA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d23-20020a630e17000000b003fbfe86551fsi21053468pgl.301.2022.06.05.22.14.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 22:14:30 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 63D4715EA5F; Sun, 5 Jun 2022 21:20:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235287AbiFDLZp (ORCPT + 99 others); Sat, 4 Jun 2022 07:25:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235195AbiFDLZm (ORCPT ); Sat, 4 Jun 2022 07:25:42 -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 CD2F92CCA2 for ; Sat, 4 Jun 2022 04:25:41 -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 1nxRuV-0000q2-N8; Sat, 04 Jun 2022 13:25:39 +0200 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) 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 C878A8C2E0; Sat, 4 Jun 2022 11:25:38 +0000 (UTC) Date: Sat, 4 Jun 2022 13:25:38 +0200 From: Marc Kleine-Budde To: Vincent Mailhol Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt , Oliver Hartkopp , netdev@vger.kernel.org Subject: Re: [PATCH v4 3/7] can: bittiming: move bittiming calculation functions to calc_bittiming.c Message-ID: <20220604112538.p4hlzgqnodyvftsj@pengutronix.de> References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220603102848.17907-1-mailhol.vincent@wanadoo.fr> <20220603102848.17907-4-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="fmzaihovq3ararpb" Content-Disposition: inline In-Reply-To: <20220603102848.17907-4-mailhol.vincent@wanadoo.fr> 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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --fmzaihovq3ararpb Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 03.06.2022 19:28:44, Vincent Mailhol wrote: > The canonical way to select or deselect an object during compilation > is to use this pattern in the relevant Makefile: >=20 > bar-$(CONFIG_FOO) :=3D foo.o >=20 > bittiming.c instead uses some #ifdef CONFIG_CAN_CALC_BITTIMG. >=20 > Create a new file named calc_bittiming.c with all the functions which > are conditionally compiled with CONFIG_CAN_CALC_BITTIMG and modify the > Makefile according to above pattern. >=20 > Signed-off-by: Vincent Mailhol > --- > drivers/net/can/Kconfig | 4 + > drivers/net/can/dev/Makefile | 2 + > drivers/net/can/dev/bittiming.c | 197 -------------------------- > drivers/net/can/dev/calc_bittiming.c | 202 +++++++++++++++++++++++++++ > 4 files changed, 208 insertions(+), 197 deletions(-) > create mode 100644 drivers/net/can/dev/calc_bittiming.c >=20 > diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig > index b1e47f6c5586..8f3b97aea638 100644 > --- a/drivers/net/can/Kconfig > +++ b/drivers/net/can/Kconfig > @@ -96,6 +96,10 @@ config CAN_CALC_BITTIMING > source clock frequencies. Disabling saves some space, but then the > bit-timing parameters must be specified directly using the Netlink > arguments "tq", "prop_seg", "phase_seg1", "phase_seg2" and "sjw". > + > + The additional features selected by this option will be added to the > + can-dev module. > + > If unsure, say Y. > =20 > config CAN_AT91 > diff --git a/drivers/net/can/dev/Makefile b/drivers/net/can/dev/Makefile > index 919f87e36eed..b8a55b1d90cd 100644 > --- a/drivers/net/can/dev/Makefile > +++ b/drivers/net/can/dev/Makefile > @@ -9,3 +9,5 @@ can-dev-$(CONFIG_CAN_NETLINK) +=3D dev.o > can-dev-$(CONFIG_CAN_NETLINK) +=3D length.o > can-dev-$(CONFIG_CAN_NETLINK) +=3D netlink.o > can-dev-$(CONFIG_CAN_NETLINK) +=3D rx-offload.o > + > +can-dev-$(CONFIG_CAN_CALC_BITTIMING) +=3D calc_bittiming.o Nitpick: Can we keep this list sorted? 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 | --fmzaihovq3ararpb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmKbQS8ACgkQrX5LkNig 010fHAf9EqWC7V8zYRf8tGNLSdm/oEsh1naw8BqOxpmbMdPMxbOaSe7WN5BYJjAc lRtXQVh0Sog3DkmHNso25zttV5HRJ/iZ139Mjko0TkQaJ2wWzbTIuQ17iBN1TkIP vidEwAwgQlPI8PiKVegZWiekwCK/XGxDgJZVZAE+7W+Ovg88eHXZwtT5o+Idhcll g2hH8VY5Um6sBmg08jF4FuJWReRJmTQ6fXdUeQHbs5nkrMYEL8ojIgmmPMneNbac tBsGAU/HXIq8wY6no2qt7iPr6efZ0SEhh8T9SgdWkI32T1cGIVMIf8R0GbBFlmS8 x4goNIHA4MPFoGcZrbAj1DYZ2SFR/Q== =fWUj -----END PGP SIGNATURE----- --fmzaihovq3ararpb--