Re: [PATCH v2 1/2] drivers/ras: Don't build debugfs.o if no debugfs in config

From: Borislav Petkov
Date: Thu Aug 08 2019 - 05:30:15 EST


On Wed, Aug 07, 2019 at 06:55:56PM -0400, Valdis KlÄtnieks wrote:
> There's no reason to build the debugfs.o if the kernel config doesn't
> even include CONFIG_DEBUG_FS
>
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@xxxxxx>
>
> diff --git a/drivers/ras/Makefile b/drivers/ras/Makefile
> index ef6777e14d3d..07a5c391cc23 100644
> --- a/drivers/ras/Makefile
> +++ b/drivers/ras/Makefile
> @@ -1,3 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0-only
> -obj-$(CONFIG_RAS) += ras.o debugfs.o
> +obj-$(CONFIG_RAS) += ras.o
> +ifeq ($(CONFIG_DEBUG_FS),y)
> +obj-$(CONFIG_RAS) += debugfs.o
> +endif
> obj-$(CONFIG_RAS_CEC) += cec.o

If this is not causing real trouble then I'd prefer to keep it this way
because ras.c is pretty useless without the debugfs functionality.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.