[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c88e81067826f04e2301b52eddb84ec84bbd1c9d.camel@pengutronix.de>
Date: Mon, 10 Jan 2022 12:37:24 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: Sergio Paracuellos <sergio.paracuellos@...il.com>,
linux-clk@...r.kernel.org
Cc: john@...ozen.org, linux-staging@...ts.linux.dev,
gregkh@...uxfoundation.org, neil@...wn.name,
linux-kernel@...r.kernel.org, sboyd@...nel.org
Subject: Re: [PATCH v7 3/4] clk: ralink: make system controller node a reset
provider
On Mon, 2022-01-10 at 12:10 +0100, Sergio Paracuellos wrote:
[...]
> +static int mt7621_rst_xlate(struct reset_controller_dev *rcdev,
> + const struct of_phandle_args *reset_spec)
> +{
> + unsigned long id = reset_spec->args[0];
> +
> + if (id == MT7621_RST_SYS)
if (id == MT7621_RST_SYS || id >= rcdev->nr_resets)
I forgot to mention that with .of_xlate set, the driver needs to check
whether id < nr_resets on its own.
regards
Philipp
Powered by blists - more mailing lists