[PATCH] EDAC/synopsys: Clear the ecc counters at init
Borislav Petkov
bp at alien8.de
Thu Jun 26 07:10:23 PDT 2025
On Thu, Jun 12, 2025 at 11:42:13AM +0000, Datta, Shubhrajyoti wrote:
> Please find the diff below
Good first try, however...
> -/**
> - * zynqmp_get_ecc_state - Return the controller ECC enable/disable status.
> - * @base: DDR memory controller base address.
> - *
> - * Get the ECC enable/disable status for the controller.
> - *
> - * Return: a ECC status boolean i.e true/false - enabled/disabled.
> - */
> -static bool zynqmp_get_ecc_state(void __iomem *base)
> +static bool get_ecc_state(struct synps_edac_priv *priv)
This function's signature should be:
static bool get_ecc_state(void __iomem *base, bool is_zynq)
or so.
Or you'd have to invent a proper way to figure out what hardware the driver is
running on. Definitely not:
if (!priv->p_data->quirks)
I have no clue how the device tree stuff makes the strings you pass in
synps_edac_match available again but there should be a proper way to check the
hw you're running on - not some arbitrary random case where zynq hw doesn't
have quirks because once someone adds quirks, your scheme is down the drain.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
More information about the linux-arm-kernel
mailing list