Re: [PATCH] RAS/AMD/FMPM: Fix build when debugfs is not enabled

From: Yazen Ghannam
Date: Tue Mar 26 2024 - 10:22:22 EST


On 3/26/24 10:07, Borislav Petkov wrote:
On Tue, Mar 26, 2024 at 09:41:41AM -0400, Yazen Ghannam wrote:
This isn't true which is why the module doesn't fail to load if debugfs
is not available.

How useful is this thing really without debugfs to dump records?


The goal of the module is to save and restore records across reboots.

The debugfs thing came later and the commit message states that it is
optional.

7d19eea51757 ("RAS/AMD/FMPM: Add debugfs interface to print record entries")

This was my first thought too. However, besides not true as stated
above, this also leaves the issue open for others to hit.

The others to hit? I don't get that part.


Sorry, I mean that if there's another user of ras_get_debugfs_root()
that doesn't depend on CONFIG_DEBUG_FS.

I think the fix below (not tested) would be more appropriate.

What do you think?

Sure, remove my fix and send me a tested version of yours and I'll swap
them if the driver is useful without debugfs...

Okay, will do.

Thanks,
Yazen