From: Borislav Petkov <bp@alien8.de>
To: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Stefan Schaeckeler <sschaeck@cisco.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Joel Stanley <joel@jms.id.au>,
Andrew Jeffery <andrew@codeconstruct.com.au>,
Tony Luck <tony.luck@intel.com>,
Billy Tsai <billy_tsai@aspeedtech.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-edac@vger.kernel.org
Subject: Re: [PATCH v7 01/10] EDAC/aspeed: Stop keeping driver state in global variables
Date: Mon, 30 Nov 2026 18:38:46 -0800 [thread overview]
Message-ID: <20261201023846.GAaw4zNheOnmaP9Y4T@fat_crate.local> (raw)
In-Reply-To: <20261130-edac-v7-1-3aaf6d243f07@aspeedtech.com>
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."
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.
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?
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
next prev parent reply other threads:[~2026-12-01 2:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 7:24 [PATCH v7 00/10] Add Aspeed AST2700 SDRAM EDAC support Ryan Chen
2026-11-30 7:24 ` [PATCH v7 01/10] EDAC/aspeed: Stop keeping driver state in global variables Ryan Chen
2026-12-01 2:38 ` Borislav Petkov [this message]
2026-12-01 6:36 ` Ryan Chen
2026-11-30 7:24 ` [PATCH v7 02/10] EDAC/aspeed: Replace regmap with direct register access Ryan Chen
2026-11-30 7:24 ` [PATCH v7 03/10] EDAC/aspeed: Put the differences between chips in a table Ryan Chen
2026-11-30 7:24 ` [PATCH v7 04/10] EDAC/aspeed: Don't unlock the interrupt control register on AST2600 Ryan Chen
2026-11-30 7:24 ` [PATCH v7 05/10] EDAC/aspeed: Let each chip provide its own interrupt handling Ryan Chen
2026-11-30 7:24 ` [PATCH v7 06/10] EDAC/aspeed: Allow reporting an error without an address Ryan Chen
2026-11-30 7:24 ` [PATCH v7 07/10] EDAC/aspeed: Allow error addresses above 4 GiB Ryan Chen
2026-11-30 7:24 ` [PATCH v7 08/10] EDAC/aspeed: Disable interrupts before requesting the interrupt line Ryan Chen
2026-11-30 7:24 ` [PATCH v7 09/10] EDAC/aspeed: Add AST2700 support Ryan Chen
2026-11-30 7:24 ` [PATCH v7 10/10] MAINTAINERS: Step down as Aspeed AST2500 EDAC driver maintainer Ryan Chen
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=20261201023846.GAaw4zNheOnmaP9Y4T@fat_crate.local \
--to=bp@alien8.de \
--cc=andrew@codeconstruct.com.au \
--cc=billy_tsai@aspeedtech.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=ryan_chen@aspeedtech.com \
--cc=sschaeck@cisco.com \
--cc=tony.luck@intel.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
all inboxes | Powered by JetHome®