linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: djakov@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de,
	festevam@gmail.com, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, abel.vesa@nxp.com,
	abailon@baylibre.com, l.stach@pengutronix.de, marex@denx.de,
	paul.elder@ideasonboard.com, Markus.Niebel@ew.tq-group.com,
	aford173@gmail.com, kernel@pengutronix.de,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-imx@nxp.com,
	Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 3/8] interconnect: imx: fix max_node_id
Date: Sat, 4 Jun 2022 03:14:19 +0300	[thread overview]
Message-ID: <Ypqj278FfhmTKkNL@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20220601094156.3388454-4-peng.fan@oss.nxp.com>

Hi Peng,

Thank you for the patch.

On Wed, Jun 01, 2022 at 05:41:51PM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
> 
> max_node_id not equal to the ARRAY_SIZE of node array, need increase 1,
> otherwise xlate will fail for the last entry.
> 
> Fixes: f0d8048525d7d("interconnect: Add imx core driver")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  drivers/interconnect/imx/imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/interconnect/imx/imx.c b/drivers/interconnect/imx/imx.c
> index 249ca25d1d55..3c074933ed0c 100644
> --- a/drivers/interconnect/imx/imx.c
> +++ b/drivers/interconnect/imx/imx.c
> @@ -238,7 +238,7 @@ int imx_icc_register(struct platform_device *pdev,
>  	int ret;
>  
>  	/* icc_onecell_data is indexed by node_id, unlike nodes param */
> -	max_node_id = get_max_node_id(nodes, nodes_count);
> +	max_node_id = get_max_node_id(nodes, nodes_count) + 1;

I'd rename the max_node_id variable to num_nodes, as writing

	max_node_id = get_max_node_id(...) + 1;

looks weird.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  	data = devm_kzalloc(dev, struct_size(data, nodes, max_node_id),
>  			    GFP_KERNEL);
>  	if (!data)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2022-06-04  0:14 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01  9:41 [PATCH 0/8] interconnect: support i.MX8MP Peng Fan (OSS)
2022-06-01  9:41 ` [PATCH 1/8] dt-bindings: interconnect: imx8m: Add bindings for imx8mp noc Peng Fan (OSS)
2022-06-01 11:55   ` Krzysztof Kozlowski
2022-06-01 12:06     ` Peng Fan
2022-06-01 12:13       ` Krzysztof Kozlowski
2022-06-01  9:41 ` [PATCH 2/8] interconnect: add device managed bulk API Peng Fan (OSS)
2022-06-01 12:33   ` kernel test robot
2022-06-01 13:15   ` kernel test robot
2022-06-01 13:37   ` kernel test robot
2022-06-01 14:58   ` kernel test robot
2022-06-13 18:27   ` Georgi Djakov
2022-06-01  9:41 ` [PATCH 3/8] interconnect: imx: fix max_node_id Peng Fan (OSS)
2022-06-04  0:14   ` Laurent Pinchart [this message]
2022-06-13  1:17     ` Peng Fan
2022-06-01  9:41 ` [PATCH 4/8] interconnect: imx: set src node Peng Fan (OSS)
2022-06-01  9:41 ` [PATCH 5/8] interconnect: imx: introduce imx_icc_provider Peng Fan (OSS)
2022-06-01  9:41 ` [PATCH 6/8] interconnect: imx: set of_node for interconnect provider Peng Fan (OSS)
2022-06-01  9:41 ` [PATCH 7/8] interconnect: imx: configure NoC mode/prioriry/ext_control Peng Fan (OSS)
2022-06-01  9:41 ` [PATCH 8/8] interconnect: imx: Add platform driver for imx8mp Peng Fan (OSS)
2022-06-01 11:56   ` Krzysztof Kozlowski
2022-06-01 12:03     ` Peng Fan
2022-06-13  1:23 ` [PATCH 0/8] interconnect: support i.MX8MP Peng Fan
2022-06-14 17:39   ` Lucas Stach
2022-06-14 23:38     ` Peng Fan
2022-06-15  9:06       ` Lucas Stach
2022-06-15  9:28         ` Peng Fan
2022-06-15 10:30           ` Lucas Stach

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ypqj278FfhmTKkNL@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=Markus.Niebel@ew.tq-group.com \
    --cc=abailon@baylibre.com \
    --cc=abel.vesa@nxp.com \
    --cc=aford173@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=djakov@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=l.stach@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=paul.elder@ideasonboard.com \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).