Received: by 10.223.185.116 with SMTP id b49csp4822089wrg; Wed, 7 Mar 2018 01:22:58 -0800 (PST) X-Google-Smtp-Source: AG47ELsd0kFH/l8G+1bLt7uiSK1m6K2tEmG1vhZ/o1GADLJW1dRET6kUv0T7jcL7YmkMgPxf3SPQ X-Received: by 2002:a17:902:608e:: with SMTP id s14-v6mr9796991plj.67.1520414577939; Wed, 07 Mar 2018 01:22:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520414577; cv=none; d=google.com; s=arc-20160816; b=c8E/OY0d2uYluIt1EN/ybMVfoW+/Al5Cf6FdJcgZvZ61Frz0fYqJ2k/rlB6fEIe5lY DJy9Ue0D7VBb2zBLmmpCRYnFYzJgqk8SWH0qmWV86CqLDTuGRW9C9hsqVW9h1orKb7pj GAUQB2YIughCcuwBgZdVvs/8n9XP8MzJsJ7mEKiORZUUcdAfDGXNEQANuQoXgz23AfMk 1c+qZxMIOwgUjMu4WjafXoptTNvOTQlIl/1JZ65sfB9pYufW2ffrJL6hY2kWuL6N9cFl 5thqYIA+BBlvKecS8nQKq2J/vKtHWfBdEsHd9spTencUY903U55z8hzOI1Phjvca8gMe mCKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=a6lmrJyJ4CFr/MZzW9aOHk55+azjDTiKZyg7y6Mix/w=; b=fj9eHZCkK0JVXq+oWvRceJocT5nUSZQfnsfAPENTcBRAQlazf2ICffDQbaNt1Y1ZAa jG8c6yNfw7T/PwixCQEgp6tErB2G7ftRqGcgZDCRICho12IjAu4O1UPkS/ZHW5XtyilD 5tqh/lEYIuu2+KfW54mZuYuyWhfISAbPDhyNFqU17C80akpnP4heFcjDdZJMm6vBVfTu XJRGS/5SjiH/RmXhbFg9wfCBV2zgL7Jojrq/T0o53eYmBt5J5ATAdczoOyvKBVxPkqNy 0pY9Wr57d4+DC/pEe6JiqP3LJ0CWf/r8DF130TFK3I4jKqHuqOSy7EHOUPeAhkg1ysKu b+xQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 8si13562980pfn.113.2018.03.07.01.22.43; Wed, 07 Mar 2018 01:22:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751197AbeCGJVw (ORCPT + 99 others); Wed, 7 Mar 2018 04:21:52 -0500 Received: from mailgw01.mediatek.com ([210.61.82.183]:43422 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751036AbeCGJVu (ORCPT ); Wed, 7 Mar 2018 04:21:50 -0500 X-UUID: 540e87e85c8047f98d76054730a301a0-20180307 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 14781281; Wed, 07 Mar 2018 17:21:47 +0800 Received: from mtkcas09.mediatek.inc (172.21.101.178) by mtkexhb01.mediatek.inc (172.21.101.102) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 7 Mar 2018 17:21:45 +0800 Received: from [172.21.77.33] (172.21.77.33) by mtkcas09.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 7 Mar 2018 17:21:39 +0800 Message-ID: <1520414499.677.5.camel@mtkswgap22> Subject: Re: [PATCH] soc: mediatek: fix the mistaken pointer accessed when subdomains are added From: Sean Wang To: CC: , , , , , , , Date: Wed, 7 Mar 2018 17:21:39 +0800 In-Reply-To: <9d9d75250bf62b491294a0c550c35ab7aba05eef.1518113047.git.sean.wang@mediatek.com> References: <9d9d75250bf62b491294a0c550c35ab7aba05eef.1518113047.git.sean.wang@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Matthis also a gentle ping for the patch Sean On Fri, 2018-02-09 at 02:07 +0800, sean.wang@mediatek.com wrote: > From: Sean Wang > > Fix the pointer to struct scp_subdomian not being moved forward > when each sub-domain is expected to be iteratively added through > pm_genpd_add_subdomain call. > > Cc: stable@vger.kernel.org > Fixes: 53fddb1a66dd ("soc: mediatek: reduce code duplication of scpsys_probe across all SoCs") > Reported-by: Weiyi Lu > Signed-off-by: Sean Wang > --- > drivers/soc/mediatek/mtk-scpsys.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/soc/mediatek/mtk-scpsys.c b/drivers/soc/mediatek/mtk-scpsys.c > index fc55faa..9de801e 100644 > --- a/drivers/soc/mediatek/mtk-scpsys.c > +++ b/drivers/soc/mediatek/mtk-scpsys.c > @@ -1048,7 +1048,7 @@ static int scpsys_probe(struct platform_device *pdev) > > pd_data = &scp->pd_data; > > - for (i = 0, sd = soc->subdomains ; i < soc->num_subdomains ; i++) { > + for (i = 0, sd = soc->subdomains; i < soc->num_subdomains; i++, sd++) { > ret = pm_genpd_add_subdomain(pd_data->domains[sd->origin], > pd_data->domains[sd->subdomain]); > if (ret && IS_ENABLED(CONFIG_PM))