public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Borislav Petkov <bp@alien8.de>
Cc: Avadhut Naik <avadhut.naik@amd.com>,
	linux-edac@vger.kernel.org, yazen.ghannam@amd.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/4] EDAC/mc_sysfs: Begin deprecating legacy sysfs EDAC interface
Date: Thu, 30 Oct 2025 16:01:43 +0100	[thread overview]
Message-ID: <2025103029-reforest-negate-cc34@gregkh> (raw)
In-Reply-To: <20251029172419.GGaQJNw4Pofl1x1mve@fat_crate.local>

On Wed, Oct 29, 2025 at 06:24:19PM +0100, Borislav Petkov wrote:
> + Greg to tell us whether that would be a proper deprecation strategy.
> 
> On Mon, Oct 13, 2025 at 05:30:43PM +0000, Avadhut Naik wrote:
> > The legacy sysfs EDAC interface has been made obsolete more than a decade
> > ago through the introduction of a new per-DIMM interface.
> > 
> > The legacy interface however, hasn't been removed till date.
> > 
> > Begin deprecating it so that it can eventually be removed by v6.21.
> > 
> > Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
> > ---
> >  drivers/edac/Kconfig         |  2 +-
> >  drivers/edac/edac_mc.h       |  5 +++++
> >  drivers/edac/edac_mc_sysfs.c | 16 ++++++++++++++++
> >  3 files changed, 22 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
> > index 39352b9b7a7e..fdfeba848114 100644
> > --- a/drivers/edac/Kconfig
> > +++ b/drivers/edac/Kconfig
> > @@ -25,7 +25,7 @@ if EDAC
> >  
> >  config EDAC_LEGACY_SYSFS
> >  	bool "EDAC legacy sysfs"
> 
> Add "DEPRECATED: EDAC ..."
> 
> here.

Hah, good luck!

> > -	default y
> > +	default n
> >  	help
> >  	  Enable the compatibility sysfs nodes.
> >  	  Use 'Y' if your edac utilities aren't ported to work with the newer
> > diff --git a/drivers/edac/edac_mc.h b/drivers/edac/edac_mc.h
> > index 881b00eadf7a..78b49d6906fd 100644
> > --- a/drivers/edac/edac_mc.h
> > +++ b/drivers/edac/edac_mc.h
> > @@ -95,6 +95,11 @@ do {									\
> >  
> >  #define to_mci(k) container_of(k, struct mem_ctl_info, dev)
> >  
> > +static inline void deprecate_interface(void)
> > +{
> > +	pr_warn_once("NOTICE: The legacy EDAC sysfs interface has been deprecated and will be removed by v6.21. Please switch to the new interface!\n");
> > +}
> 
> You don't need to have a function which you replicate everywhere. Simply dump
> this notice once...
> 
> edac_create_sysfs_mci_device:
> 
> 	...
> 
> #ifdef CONFIG_EDAC_LEGACY_SYSFS
> 
> <--- here.
> 
>         err = edac_create_csrow_objects(mci);
>         if (err < 0)
>                 goto fail;
> #endif
> 
> So that it gets issued and hopefully someone sees it.
> 
> Then, I'd say around 6.19 we should make those functions return an error
> unconditionally and then zap them in 6.21.
> 
> That is, if no one comes crawling out of the woodwork with a valid use case.

No one is going to notice this type of kernel log message.  If you think
that no one is using the sysfs files, delete them now.  Why wait?

sysfs is meant to be such that userspace can handle file removals (i.e.
that value is not present.)  Unfortunately, sometimes this does not
actually happen and user tools do mess up and rely on things.  So either
no one uses the file and it can be removed now, OR you have to leave it
in for "forever".  There's no real chance to remove it later, that's
just postponing the decision.

good luck!

greg k-h

  parent reply	other threads:[~2025-10-30 15:01 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-13 17:30 [PATCH 0/4] Cleanups in amd64_edac Avadhut Naik
2025-10-13 17:30 ` [PATCH 1/4] EDAC/amd64: Generate ctl_name string at runtime Avadhut Naik
2025-10-20 13:47   ` Borislav Petkov
2025-10-20 18:28     ` Naik, Avadhut
2025-10-20 19:09       ` Borislav Petkov
2025-10-13 17:30 ` [PATCH 2/4] EDAC/amd64: Remove NUM_CONTROLLERS macro Avadhut Naik
2025-10-21 10:44   ` Borislav Petkov
2025-10-22  6:07     ` Naik, Avadhut
2025-10-13 17:30 ` [PATCH 3/4] EDAC/amd64: Set zn_regs_v2 flag for all AMD Family 1Ah-based SOCs Avadhut Naik
2025-10-29 17:10   ` Borislav Petkov
2025-10-30 13:48     ` Yazen Ghannam
2025-11-03 21:18       ` Borislav Petkov
2025-11-04 14:59         ` Yazen Ghannam
2025-10-13 17:30 ` [PATCH 4/4] EDAC/mc_sysfs: Begin deprecating legacy sysfs EDAC interface Avadhut Naik
2025-10-29 17:24   ` Borislav Petkov
2025-10-30 14:52     ` Naik, Avadhut
2025-10-30 15:01     ` Greg KH [this message]
2025-10-30 19:18       ` Borislav Petkov
2025-10-31 12:38         ` Greg KH
2025-10-31 12:54           ` Borislav Petkov
2025-10-31 19:34             ` Naik, Avadhut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025103029-reforest-negate-cc34@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=avadhut.naik@amd.com \
    --cc=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yazen.ghannam@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox