[PATCH v7 01/10] EDAC/aspeed: Stop keeping driver state in global variables

Ryan Chen ryan_chen at aspeedtech.com
Mon Nov 30 22:36:51 PST 2026


> Subject: Re: [PATCH v7 01/10] EDAC/aspeed: Stop keeping driver state in global
> variables
> 
> On Mon, Nov 30, 2026 at 03:24:28PM +0800, Ryan Chen wrote:
> > The register map and the interrupt number are global variables. The
> > following changes need to keep more state for the device, such as a
> > lock and the chip type, and adding more globals for that is not the
> > right way.
> 
> Change that commit text to:
> 
> "EDAC/aspeed: Add a driver private struct
> 
> Collect all driver-specific variables in a private driver structure, like it is
> usually done for EDAC drivers."

Will update.

> 
> This is much clearer.
> 
> Also, what is "struct aspeed_edac"'s name telling me?
> 
> Your struct names should be descriptive and say what they are. For example:
> 
> struct driver_priv or so.

Will rename it to struct driver_priv.

> 
> And then declarations like:
> 
> 	struct driver_priv *priv = mci->pvt_info;
> 
> make perfect sense.
> 
> Same with:
> 
> struct aspeed_edac_chip
> 
> which appears later.
> 
> This is not an "EDAC chip" but an aspeed memory controller chip, AFAICT.
> Right?
> 
> So "struct aspeed_mc" perhaps?

I will rename it to struct aspeed_mc.
the ast2400_edac, ast2600_edac and ast2700_edac tables become
ast2400_mc, ast2600_mc and ast2700_mc.

I will also go over the other names in the series before sending v8.

Thanks your review.
Ryan
> 
> Naming is sooo important.
> 
> And so on.
> 
> Other than that, I cannot spot any more nasties.
> 
> Thx.
> 
> --
> Regards/Gruss,
>     Boris.
> 
> https://people.kernel.org/tglx/notes-about-netiquette


More information about the linux-arm-kernel mailing list