From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21D692BE7CB for ; Thu, 27 Nov 2025 15:36:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764257782; cv=none; b=IYeUtCuD3tp322sBP0hI95vr88Ii5mfGOiaptt3HLEUbjGIeBCIOBwk30nmRJDMJyGYisT4w7szRGT6fgvFw05T22KO/fQx3swuEXlmIiiwwGEMIbggk8RU4kX10rsZlQXdPJt/BoJHxNyY4gEAmKY/CVyyJLhKp14maD4yMc/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1764257782; c=relaxed/simple; bh=7RZk2pHlQUj40DVRyxyznQQjK2EyOPEd1zVgC1z1Y0U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XMe11E4Y6SQxxt0XLcIBTXRJGB81elNhyjKCCf7ibB+gLNKpnymLKrHca7QpwtLmuxi1QbZ2SVR38lYIb4PJ2clOyalApfkPGSU6CQAlZySiM3OSaryy+cEXV6Zty/K0htX9zea4TuodBgAXsnXd2kQZRKbENU/ynzWgxqNeOHY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=naydhTUd; arc=none smtp.client-ip=209.85.216.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="naydhTUd" Received: by mail-pj1-f54.google.com with SMTP id 98e67ed59e1d1-343514c7854so572404a91.1 for ; Thu, 27 Nov 2025 07:36:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1764257780; x=1764862580; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=6siSnDiVGTZsS7iG2F0xSpzoZMH3VN+sYpf9IBWS2/I=; b=naydhTUd8mcEiTA4knyZPkeb88VyILNGtqpL6zTi/Jxod93ul3uwakk1UxDF7nPFv4 kYwBe5OpN3QLM0w6BJ8GafOnS9ebYpfelDBLoDF8lnPFe6Y6JI7rlmC+buxpYHTMZzMQ G7cO6xdda2CGGzZo1eSnPrFt6zVvf76+JeaLu6RAPESFQTm9wgfgSVDzuNgrRavU9mKm G+EIFBG9uvUsvDs4+A1I40EBZPIp3PmW7ZTapVVbErAz4cwBEHGOtq/RuaJMlFsLMpo4 GHrfD5OfIcNkocCa02sv7f+V4uQ2hrxHgG5BikMLJzB24ySZQtK7GM+31BsbmKxt9w/I iaVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764257780; x=1764862580; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6siSnDiVGTZsS7iG2F0xSpzoZMH3VN+sYpf9IBWS2/I=; b=u5d70poqj8TP/dW9Yl4MyBx3p6HUjE5mgsiEa6MbllI1S5yfGzL1aF50GPJawlVZJD 4R3ps8gRdCB0PoFIAXPpLPxWuwGZHQP8Anry+jgjBiNaMHEKCRVPFb+f1+QKDMii5t/Q Ckjl1P0yl3GHfSKy8xNr/XDi/7h9RT0R25fgo+ROKhKsWr2rPRzijbI4W7nrjiJBv5Dt 13mFhkuceMUDP75mFV9BrGUDpa7hTzyPEoxAUJ3/hCgBFb3rNuNDYgNtasYMOQ8/i664 qRnMvueLjG/nA9KxJirTDa306ByzYrqWfSZaNx15z3sNCpvj6N5YycIDRVbRJWsZV3oQ bwxw== X-Forwarded-Encrypted: i=1; AJvYcCVyqDZLB9WNJJhxTl5RMr3+beGvxYSMLamrEjXcxMT8jzSvlApgkA6mVldiA0+82Ip9fhgJ3twMXeixji0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywl12YkPVfd1I6o2G9OtZIgdQuLHOeoqwEOkGaNf9N7KRRX6rIG eH2A7e5P02kwK3252sYP2VhR/lK9dDNrc26mC4moOYhxfzSnvLIfSo9OKMbpzEPTLCw= X-Gm-Gg: ASbGnctOgeAZpffROOzDw5hRevL75TWK9V1Lxz7JTwpWqiH+d7R2AFAaHVUU/xZy3Gm gte5Hbt9bgMF3niz/TUkjfazBtLAWawDcWX1ZDz167AzsgareCITRBSbDSZkM2e3hIwdq3bPw6b OmhSUCN2HkaKegd9WmYU1e5ycgCGFK4WrY+44tRQFgukl03xEksAfCq2THlHIs/lh9Mo1Vr9lVH +Vmvg1rcIqAq5rZLnd+abLOh6ORxbemdaohH9WGqxR5fQmWS1ah3e0ZoAAm946Ib53fciTMOPmT WGqKFZD16fibOJKT/YiOohYHk2cpvX3Pmc9LR2imr+npo+LR4j3jKOgyjRb0kmkAsKVe3RVAbVZ OA9ZFSn4LiW60RLUzt4EKAFpdv4hNYrt2vr756OEGCtz0ENEIJQWvTDd8iyLD2Db/Xz/aX8/zLn bQvlHrHo+BZIdgcA== X-Google-Smtp-Source: AGHT+IFazut7ZcKlnL0DT/Iw4tQemIOZ/nMnozSi86+NKtlcAazOOXJ8k38JC8Q24R2278AB7f5H0Q== X-Received: by 2002:a17:90b:38ca:b0:32e:23c9:6f41 with SMTP id 98e67ed59e1d1-347331be358mr22188175a91.5.1764257780482; Thu, 27 Nov 2025 07:36:20 -0800 (PST) Received: from p14s ([2604:3d09:148c:c800:9ef4:efaa:23ae:f181]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3475e87fc99sm5019619a91.0.2025.11.27.07.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Nov 2025 07:36:19 -0800 (PST) Date: Thu, 27 Nov 2025 08:36:17 -0700 From: Mathieu Poirier To: Bjorn Andersson Cc: Patrice Chotard , Bjorn Andersson , "Rob Herring (Arm)" , Arnaud Pouliquen , Geert Uytterhoeven , linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] remoteproc: st: Fix indexing of memory-regions Message-ID: References: <20251126-st-remoteproc-double-index-v1-1-3b0a8b21ac18@oss.qualcomm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251126-st-remoteproc-double-index-v1-1-3b0a8b21ac18@oss.qualcomm.com> On Wed, Nov 26, 2025 at 12:17:59PM -0600, Bjorn Andersson wrote: > The recent transition to use of_reserved_mem_region_to_resource() > changes the while loop to a for loop, but the increment of the "index" > variable was left behind at the end of the loop, as highlighted by the > following error/warning: > > error: variable 'index' is incremented both in the loop header and in the loop body [-Werror,-Wfor-loop-analysis] > > Drop the extra increment to avoid skipping over every other > memory-region in the loop. > > Fixes: 67a7bc7f0358 ("remoteproc: Use of_reserved_mem_region_* functions for "memory-region"") > Signed-off-by: Bjorn Andersson > --- > drivers/remoteproc/st_remoteproc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/drivers/remoteproc/st_remoteproc.c b/drivers/remoteproc/st_remoteproc.c > index 747bbe7f6f7c6be160f4f6a0202eb8df20dc5bc9..a07edf7217d21a3f08d26592e8a14814608507f8 100644 > --- a/drivers/remoteproc/st_remoteproc.c > +++ b/drivers/remoteproc/st_remoteproc.c > @@ -155,7 +155,6 @@ static int st_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) > return -ENOMEM; > > rproc_add_carveout(rproc, mem); > - index++; Really good - applied. Thanks, Mathieu > } > > return rproc_elf_load_rsc_table(rproc, fw); > > --- > base-commit: 663d0d1af3faefe673cabf4b6b077149a87ad71f > change-id: 20251126-st-remoteproc-double-index-29a2e40e74bb > > Best regards, > -- > Bjorn Andersson >