Re: [PATCH v4 12/24] EDAC/amd64: Define function to get number of interleaved channels

From: Yazen Ghannam
Date: Wed Mar 09 2022 - 17:13:13 EST


On Mon, Feb 14, 2022 at 01:20:44PM +0100, Borislav Petkov wrote:
> On Thu, Jan 27, 2022 at 08:41:03PM +0000, Yazen Ghannam wrote:
> > Move number of interleaved channel calculation to a separate helper
> > function. Drop unused cases.
>
> ... or by looking at that change, I think you want to have each separate
> step in the address massaging be a separate function. Which, if so,
> makes sense but you have to say it...
>

Yep, will do.

> ...
>
> > +static void get_intlv_num_chan(struct addr_ctx *ctx)
> > +{
> > + /* Save the log2(# of channels). */
> > + switch (ctx->intlv_mode) {
> > + case NONE:
> > + ctx->intlv_num_chan = 0;
> > + break;
> > + case NOHASH_2CH:
> > + case DF2_HASH_2CH:
> > + ctx->intlv_num_chan = 1;
> > + break;
> > + default:
> > + /* Valid interleaving modes where checked earlier. */
>
> "were"

Will fix.

Thanks,
Yazen