lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220604112538.p4hlzgqnodyvftsj@pengutronix.de>
Date:   Sat, 4 Jun 2022 13:25:38 +0200
From:   Marc Kleine-Budde <mkl@...gutronix.de>
To:     Vincent Mailhol <mailhol.vincent@...adoo.fr>
Cc:     linux-can@...r.kernel.org, linux-kernel@...r.kernel.org,
        Max Staudt <max@...as.org>,
        Oliver Hartkopp <socketcan@...tkopp.net>,
        netdev@...r.kernel.org
Subject: Re: [PATCH v4 3/7] can: bittiming: move bittiming calculation
 functions to calc_bittiming.c

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:
> 
> bar-$(CONFIG_FOO) := foo.o
> 
> bittiming.c instead uses some #ifdef CONFIG_CAN_CALC_BITTIMG.
> 
> 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.
> 
> Signed-off-by: Vincent Mailhol <mailhol.vincent@...adoo.fr>
> ---
>  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
> 
> 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.
>  
>  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) += dev.o
>  can-dev-$(CONFIG_CAN_NETLINK) += length.o
>  can-dev-$(CONFIG_CAN_NETLINK) += netlink.o
>  can-dev-$(CONFIG_CAN_NETLINK) += rx-offload.o
> +
> +can-dev-$(CONFIG_CAN_CALC_BITTIMING) += calc_bittiming.o

Nitpick:
Can we keep this list sorted?

Marc

-- 
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 |

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ