[PATCH v10 4/5] edac: Add APM X-Gene SoC EDAC driver
Arnd Bergmann
arnd at arndb.de
Fri May 22 01:59:28 PDT 2015
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
More information about the linux-arm-kernel
mailing list