Re: [PATCH linux-next 0/2] ACPI: Add support for ACPI RAS2 feature table

Borislav Petkov
2025-03-03T10:36:30Z

On Mon, Mar 03, 2025 at 05:35:38PM +0800, Jonathan Cameron wrote:
> Borislav via ras.git, or Rafael via acpi.git? I don't really
> have any preference other than making sure it doesn't fall down
> the cracks!

It's probably easier if I take it.

However, just from a cursory look, it would need some scrubbing. There's stuff
like:

+ ps_sm->params.requested_address_range[0] = 0;
+ ps_sm->params.requested_address_range[1] = 0;
+ ps_sm->params.scrub_params_in &= ~RAS2_PATROL_SCRUB_SCHRS_IN_MASK;
+ ps_sm->params.scrub_params_in |= FIELD_PREP(RAS2_PATROL_SCRUB_SCHRS_IN_MASK,
+ ras2_ctx->scrub_cycle_hrs);
+ ps_sm->params.patrol_scrub_command = RAS2_START_PATROL_SCRUBBER;

which definitely needs shortening. There's no need for a wholly written out
"requested_address_range". I know variables should have meaningfull names but
writing fiction shouldn't be either.

+static int ras2_acpi_parse_table(struct acpi_table_header *pAcpiTable)

Yuck, CamelCase?!

And I'm pretty sure if I start looking more, I'll find more funky stuff.

HTH.

--
Regards/Gruss,
Boris.