From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0B3EE43C066; Wed, 21 Jan 2026 10:06:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768990008; cv=none; b=dCstsvg79Xh7FDx4cwYz7vNgMgrFG6Wl6YMtaHOI+GIooFThbZAAun8qY30WK4U1g8B2Ocg/d1YotZiMZgea9yFeTAQMXRiA6gnRiMAId9F4lS6sCDWDGu/xiMVZEj3PxlDbffjm/dpZWFegzMX8Is4ZyMOP9HJt8iuV5nV07mQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768990008; c=relaxed/simple; bh=EIr0H3QzcxeQI+iM14EZQvj7pqlo4qG/bQ5j6kH556Q=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=sEbQBABhK1uegDWO/bjGilt6qaF9S+pS8wauUTnJAhgmwAjs+vWjK5tHoeejgnQ33mZPBdVjZwhEU0wbY3KUjS4L6rw6u32NOApa0vx+gDzQdhRqRMdHf7bexfW+a7B4JRSI21S4kXpz1Exh2fEiiE0eu0x/1pKBnNOXQgZ9HrQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=SZA7PsmK; arc=none smtp.client-ip=80.241.56.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="SZA7PsmK" Received: from smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4dx0GS2hCdz9tnv; Wed, 21 Jan 2026 11:06:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1768990000; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0y6EFZTNf6M4KpxTP2xOAcMrDMy6ctYywtbB88AC34U=; b=SZA7PsmKv+cs/d40OPKibpXpT5IVBVhPm2A+Xo0z7Gh6yHQKlx07XzAcvzj1vpKGZ6/HGp yLASP7+HvBoWlqevaHK9nDiv9D+zJR/MK4NcfzvmA11/qSkB/26atzZVdHCkj4GX9xwauD BcpZyBiUh0PZBzNWNS4ArYUSzIghnh9LBejEB+2/9rHlmtbuyQMSPgHOly1aUQVtSLD8Re YBAxLfG4ry7meVxiA8GAogHm8fndLtOAMCXZwlbJVuTVU9LLlMdYFXBybugpvaWelDwrH/ Qw5VVQFFBuSG0DeAPZwTu7G5GJ5OlKRli8gyrxNw6464T+scnWDY3KxRWq8Qpw== Message-ID: Date: Wed, 21 Jan 2026 11:06:38 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v2] clk: rs9: Add clock index range check to rs9_of_clk_get() To: Geert Uytterhoeven Cc: Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <4cb63bd8b1e49407831431fbc88b218f720a74fd.1768899891.git.geert+renesas@glider.be> <10de432d-b38a-4fe2-959b-d9fa4e08e6c1@mailbox.org> Content-Language: en-US From: Marek Vasut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-META: q9iuus158ciorc1uxtegmriz1sxjcn8m X-MBO-RS-ID: c42b6f00ac8d7ace3ae On 1/21/26 10:34 AM, Geert Uytterhoeven wrote: Hello Geert, >>> diff --git a/drivers/clk/clk-renesas-pcie.c b/drivers/clk/clk-renesas-pcie.c >>> index aa108df12e44fb9f..1adc5365ba1a3d59 100644 >>> --- a/drivers/clk/clk-renesas-pcie.c >>> +++ b/drivers/clk/clk-renesas-pcie.c >>> @@ -277,6 +277,9 @@ rs9_of_clk_get(struct of_phandle_args *clkspec, void *data) >>> struct rs9_driver_data *rs9 = data; >>> unsigned int idx = clkspec->args[0]; >>> >>> + if (idx >= rs9->chip_info->num_clks) >> >> of_clk_src_onecell_get() does a pr_err("%s: invalid clock index %u\n", >> __func__, idx); on error, should this function do the same ? > > I can add it if you want. But this function will (hopefully) be > short-lived anyway. This will be backported to stable, the rewrite to onecell won't, so this will be long lived in stable backports. Please add it. Thank you !