Re: [PATCH v9 4/4] soc: imx8m: change to use platform driver

From: Fabio Estevam
Date: Tue Dec 22 2020 - 08:26:27 EST


Hi Alice,

On Tue, Dec 22, 2020 at 5:11 AM Alice Guo (OSS) <alice.guo@xxxxxxxxxxx> wrote:

> - soc_uid = readl_relaxed(ocotp_base + OCOTP_UID_HIGH);
> - soc_uid <<= 32;
> - soc_uid |= readl_relaxed(ocotp_base + OCOTP_UID_LOW);
> + if (dev) {
> + int ret = 0;

No need to initialize ret to 0.

> - imx8mm_soc_uid();
> + if (dev) {
> + int ret = 0;

Ditto.


> +/* Retain device_initcall is for backward compatibility with DTS. */
> +static int __init imx8_soc_init(void)
> +{
> + int ret = 0;

Ditto.

> +
> + if (of_find_matching_node_and_match(NULL, imx8_soc_match, NULL))
> + return 0;
> +
> + ret = imx8_soc_info(NULL);
> + return ret;

Or you could even get rid of 'ret' and return imx8_soc_info() directly.