Message ID | 20240627173251.25718-3-fancer.lancer@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | EDAC/mc/synopsys: Various fixes and cleanups | expand |
On Thu, Jun 27, 2024 at 08:32:09PM +0300, Serge Semin wrote: > The mem_ctl_info.scrub_cap field is supposed to be set with the ECC > scrub-related flags. Instead the driver erroneously initializes it with > the SCRUB_HW_SRC flag ID. It's definitely wrong, but it hasn't caused any > problem so far since the structure field isn't used by the EDAC core. Fix > it anyway by using the SCRUB_FLAG_HW_SRC macro to initialize the field. This hasn't been used at least since it got added by commit da9bb1d27b21cb24cbb6a2efb5d3c464d357a01e Author: Alan Cox <alan@lxorguk.ukuu.org.uk> Date: Wed Jan 18 17:44:13 2006 -0800 [PATCH] EDAC: core EDAC support code AFAICT. Please remove ->scrub_cap along with enum scrub_type instead. We can always resurrect it if needed. Thx.
On Tue, Jul 09, 2024 at 01:35:22PM +0200, Borislav Petkov wrote: > On Thu, Jun 27, 2024 at 08:32:09PM +0300, Serge Semin wrote: > > The mem_ctl_info.scrub_cap field is supposed to be set with the ECC > > scrub-related flags. Instead the driver erroneously initializes it with > > the SCRUB_HW_SRC flag ID. It's definitely wrong, but it hasn't caused any > > problem so far since the structure field isn't used by the EDAC core. Fix > > it anyway by using the SCRUB_FLAG_HW_SRC macro to initialize the field. > > This hasn't been used at least since it got added by > > commit da9bb1d27b21cb24cbb6a2efb5d3c464d357a01e > Author: Alan Cox <alan@lxorguk.ukuu.org.uk> > Date: Wed Jan 18 17:44:13 2006 -0800 > > [PATCH] EDAC: core EDAC support code > > AFAICT. > > Please remove ->scrub_cap along with enum scrub_type instead. > > We can always resurrect it if needed. Agreed. I'll drop all of these from the EDAC core and drivers. -Serge(y) > > Thx. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette
diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c index b6bdbc1289f3..2b23d5ef9cff 100644 --- a/drivers/edac/synopsys_edac.c +++ b/drivers/edac/synopsys_edac.c @@ -855,7 +855,7 @@ static void mc_init(struct mem_ctl_info *mci, struct platform_device *pdev) /* Initialize controller capabilities and configuration */ mci->mtype_cap = MEM_FLAG_DDR3 | MEM_FLAG_DDR2; mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; - mci->scrub_cap = SCRUB_HW_SRC; + mci->scrub_cap = SCRUB_FLAG_HW_SRC; mci->scrub_mode = SCRUB_NONE; mci->edac_cap = EDAC_FLAG_SECDED;
The mem_ctl_info.scrub_cap field is supposed to be set with the ECC scrub-related flags. Instead the driver erroneously initializes it with the SCRUB_HW_SRC flag ID. It's definitely wrong, but it hasn't caused any problem so far since the structure field isn't used by the EDAC core. Fix it anyway by using the SCRUB_FLAG_HW_SRC macro to initialize the field. Fixes: ae9b56e3996d ("EDAC, synps: Add EDAC support for zynq ddr ecc controller") Signed-off-by: Serge Semin <fancer.lancer@gmail.com> --- drivers/edac/synopsys_edac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)