Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1253815lqo; Sat, 11 May 2024 14:56:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVjZytT/YSSh0kYAIT3N5HhrL/P8Nuk5CDhLSrwb1fuFeSIPjba5UW17gW3tMFk63ncJQqGtsv+X38WnBIJKLHslHzAcD8i7Q5m7TGobw== X-Google-Smtp-Source: AGHT+IFzHI24qjspu/TytrDw99TiM7v8c8p6gLQNyh6gQsiI/gIHwh/pZOOJWDT8UlZjAg/CzlLY X-Received: by 2002:a05:6358:1081:b0:183:645b:cfa4 with SMTP id e5c5f4694b2df-193bb00f4e5mr728746455d.16.1715464596671; Sat, 11 May 2024 14:56:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715464596; cv=pass; d=google.com; s=arc-20160816; b=sXHzsYZBJwbeARQOcDSwhcOn9+6ywiQqvyAMytnCw9Sq4JU/CvzbYMBSeuW+XhkOCX p8REulWbG1pD/FVrfXFLHiNnI4iroCm2qUB9scf3ZbCEUTiUzUuxfrW/0uwg/OJ+qJMc DJ7sr0DQTzIwBGJ75US0Eqo+9G9rOo3KQVMCn4kmeanwxq0YbpHBCfQwTamo6gnZNCbR XC4Pt6Yr9lwmMEQTjARxWIveW9m1w0zmlmJAQ/vXm/QIJnTi7Be8UF3fnTsLlr/GgAeH LKpjLz37NKUXFCs5EU+y7o0wNMiWuRIXES87D1fNmM4sNk7J65wISt+sXbbeCXCyTI/H iOeA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=QvgC56LyaFUK4C15m3b/VQxk0Rs7izNvxRwmFZWzOTk=; fh=XakmFMAFEPX/T/RQ9FOzObdxutXGBdYy2q9R6xitqrc=; b=Y3vc7OZekl01VgVHrRWWKthrDXdXaFI+q4GxRnMAeLX1UTRXsaQAl4pYAtmyGSrzq6 kskoCXJfoa6O/gnWCbRiNc+U5e1dwIpodiCI5SsN1ZxINHkT8JpgMhEmypqYfx8e4enO 60pOJxBVANW+x9TfxJGju0BAz5jA9sjAgwmyHrRGG2KYL8Pxw39JLAV8up69Chip7U7Z VzQ9f6YY2FjbsQ8kvhsmeobsakFm90NI/dlMtlfjhXtEQjmE/xqC2FINyLZH2Ikw50xM KKC46Hf4b6VFadgLq34SIXo23TVYZtE0aleqIhJGMtoadTrdl0AdtgKaniYSazmh/tje T4OA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uCRuRaDv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-176742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2b670f4e136si6252687a91.49.2024.05.11.14.56.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 14:56:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uCRuRaDv; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-176742-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176742-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 2FD20B20E0A for ; Sat, 11 May 2024 21:56:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92C1F46522; Sat, 11 May 2024 21:56:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uCRuRaDv" Received: from mail-lf1-f51.google.com (mail-lf1-f51.google.com [209.85.167.51]) (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 01EB224B26 for ; Sat, 11 May 2024 21:56:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715464570; cv=none; b=WcqAmlzGwV0/utcdhiZDuVsO5fyudq0UicHYjerxcVY4jiERUZqkFjYNbjL1fXDh0oKbQ5F2kwEsOgDQAChJ1UbH6cIxCfTMgYXle3/Fw42WgQRtYkK9tqbbu0780UvyHIMw5OoZkC+BkDdruBpDwsYlnfcGd4ulMo59uBeiHso= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715464570; c=relaxed/simple; bh=owB14EagmPWW4gOZA+FP/m7NDDNKyR5GX/j8+fIMUws=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kjjvcCNg9sycxUrzvL2tDaH76padFQVvJIl5pn37SFQiao8CkUsGU43ccz2QZNbBfWLofbVCEg4fJbrHx3HxBE20IxEoNvvfGoVqDVjmKddH/jdmo3ujoj57nROKJ/wCpndYu+4K5IT9RcEoN66Go297ZBovjnU0k0AxtF+tRjU= 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=uCRuRaDv; arc=none smtp.client-ip=209.85.167.51 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 Received: by mail-lf1-f51.google.com with SMTP id 2adb3069b0e04-51f174e316eso3754634e87.0 for ; Sat, 11 May 2024 14:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715464567; x=1716069367; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=QvgC56LyaFUK4C15m3b/VQxk0Rs7izNvxRwmFZWzOTk=; b=uCRuRaDvTYZu3Dt+uXcG5QSA4Wr0Sdoa5zCLVEajQcoGxQHgTHsFp5sA3zcPKtDuu8 4jlypyOttBYRLLXYcfaGRouUtzmM3/FNp+rA2jrZj3LZ1mZogKdgvvAgYEUzvDiCusPX VaRrEQDs3MLHL5W/42+w/Jl3vm7YBxxDMPhwGem29AmBR0MBhl9CQjv575ONdJ0bDma2 kY/TxVixp9WxBfgvHVujhXuCnIw+uhlVJFqb1KaN8+scnvyRXy/02JVFQF82FdSdGvQD RzJ+Qh+wlHuIYivy4trJTFVEoPNPj7DgFqplmfnCxQMgBqARS4nJ8/vU2ayaWbEDZCv7 jkOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715464567; x=1716069367; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QvgC56LyaFUK4C15m3b/VQxk0Rs7izNvxRwmFZWzOTk=; b=BPFTkR4GCdbdtQsTnS6BzPaVorEkHyZpCI/s6Mf5wfGkKdJhkRyiOOXLt+mG1Lilfr ez4wLKtsyL1CXnGnct/fy8km/davB9q0wNzMjct+Pf+6ymqtsfvUw1d9xfLmymlat22L JYtZ+19iPFarYIq2YI6xH+itB9AGCapgsw6Pcap59zbrfeH//U0rAmdQUa1BeZsgreZP yCOtIJSRFXso9v6FCSHxtEGgT/Ks8o77fo9hueef7Dk/QFRpjORTXmebSaK8EhaL6nPZ PXiYXUr8R2yppb712TVb7/aKn5ZjfEm887zrnDRb7OOt7ex7ehcYJ8mrPbvt5sQ5I7VI aJCw== X-Forwarded-Encrypted: i=1; AJvYcCUHN0MGa9CGQIXklJ5yXJiLv+NBFPJK/7UYjTKePQkULKHmMNFRFFcejxz5Xc4AWz38+redb83byL7vs2oipOf7E9ACnCszlRQsed7q X-Gm-Message-State: AOJu0YwPAmSaG4kTssfMG8NLR6NZE0igrgFtmMTHO5n+hUKamtDzNjaS 7VsUUdoztPUmOlgdYlqtu3KkE4LhNAkGzNOp77JuSbztu10zAYmkmFtGRwMXi64= X-Received: by 2002:ac2:46e7:0:b0:51e:f68b:d266 with SMTP id 2adb3069b0e04-5220fe78ceamr3485972e87.50.1715464567182; Sat, 11 May 2024 14:56:07 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-521f39d31d1sm1127576e87.286.2024.05.11.14.56.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 May 2024 14:56:06 -0700 (PDT) From: Dmitry Baryshkov Date: Sun, 12 May 2024 00:56:04 +0300 Subject: [PATCH v8 2/5] soc: qcom: pdr: fix parsing of domains lists 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="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240512-qcom-pd-mapper-v8-2-5ecbb276fcc0@linaro.org> References: <20240512-qcom-pd-mapper-v8-0-5ecbb276fcc0@linaro.org> In-Reply-To: <20240512-qcom-pd-mapper-v8-0-5ecbb276fcc0@linaro.org> To: Bjorn Andersson , Konrad Dybcio , Sibi Sankar , Mathieu Poirier Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Johan Hovold , Xilin Wu , Bryan O'Donoghue , Steev Klimaszewski , Alexey Minnekhanov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1150; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=owB14EagmPWW4gOZA+FP/m7NDDNKyR5GX/j8+fIMUws=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmP+l02sEGrQpRPdi1hPa1DAZOE/JO4CuTM1Dkk wrPcB/JaQSJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZj/pdAAKCRCLPIo+Aiko 1dAqB/4nkeRSMzX9CaTIhgjF60nM+tE0UzqvRKW1UHEMWlJEbUSgo2xYkBcv9Hu6VcZXnN42ogj 4ZHBlplcE/2NEnqRlwrXNu841a7E23gZLTVZCDoh1Li4BstRgOFFiIAY+cnUOM4JBNYc8LsQOdq qAVq1PYBbvfBaCjw/yGLqUlbSpZibg6W2klgGs0WIAgz3zO/iFF2zGuGCmk/OoQ/ZK1F0Kku2Qm NW4cjv04HgNfWlDH0UwGIDFdLiZP5Ay5AVtm9s7MmM/mIvM4b3VDzKRU7KroXscSNp6aSrtAcTu kQHIJA699+tBbqaeCvP/OoMVHN/to1+eLEd8B0vrWwtw2gOe X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A While parsing the domains list, start offsets from 0 rather than from domains_read. The domains_read is equal to the total count of the domains we have seen, while the domains list in the message starts from offset 0. Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers") Tested-by: Steev Klimaszewski Tested-by: Alexey Minnekhanov Signed-off-by: Dmitry Baryshkov --- drivers/soc/qcom/pdr_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/qcom/pdr_interface.c b/drivers/soc/qcom/pdr_interface.c index e014dd2d8ab3..d495ee736519 100644 --- a/drivers/soc/qcom/pdr_interface.c +++ b/drivers/soc/qcom/pdr_interface.c @@ -422,7 +422,7 @@ static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds) if (ret < 0) goto out; - for (i = domains_read; i < resp->domain_list_len; i++) { + for (i = 0; i < resp->domain_list_len; i++) { entry = &resp->domain_list[i]; if (strnlen(entry->name, sizeof(entry->name)) == sizeof(entry->name)) -- 2.39.2