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 - 11:13:33 EST


On Thu, Aug 08, 2019 at 11:08:49AM -0400, Valdis KlÄtnieks wrote:
> On Thu, 08 Aug 2019 16:20:55 +0200, Borislav Petkov said:
> > config RAS_CEC
> > depends on X86_MCE && MEMORY_FAILURE && DEBUG_FS
> > ^^^^^^^^
>
> I'm willing to respin that patch that way instead - if cec.c is basically
> pointless without debugfs, that's probably a good solution. My first read
> of the code was that the debugfs support was "additional optional" code,
> not "this is pointless without it" code.

That's already there so no need.

I'm build-testing a slightly different version of yours and I'll commit
it if it passes the build smoke tests:

---
diff --git a/drivers/ras/Makefile b/drivers/ras/Makefile
index ef6777e14d3d..6f0404f50107 100644
--- a/drivers/ras/Makefile
+++ b/drivers/ras/Makefile
@@ -1,3 +1,4 @@
# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_RAS) += ras.o debugfs.o
+obj-$(CONFIG_RAS) += ras.o
+obj-$(CONFIG_DEBUG_FS) += debugfs.o
obj-$(CONFIG_RAS_CEC) += cec.o
---

Thx.

--
Regards/Gruss,
Boris.

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