[PATCH v10 4/5] edac: Add APM X-Gene SoC EDAC driver

Arnd Bergmann
2015-05-22T08:59:28Z

On Monday 18 May 2015 17:24:40 Loc Ho wrote:
> + tmp_ctx.mcu_id = ((res.start >> 16) & 0xF) / 4;
>

Just found this line: you are effectively hardcoding the physical
register layout of the chip in the driver here, to get the index
of the memory controller. This is a very bad idea as it prevents
you from reusing this driver for another chip that puts the
same registers in a different place, don't do that.

Arnd