From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 63AC739D6D4 for ; Mon, 27 Apr 2026 11:03:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777287826; cv=none; b=RRuSHT9aKfVMUF0+sAlDZ42W0cIni/OUNPBmU/HbiNdgbMs2HVOsrirncRrRY+r41vB4EGpwYglFFuozZVN/16rB3ZLHIfQ0BzSWy/x9hdWnZX52kDQ3rWDfFmEbwP+5qVH7bUQfIfMOM+QY+lRl1X/QbqkBi+r9JL6dFFdyy8w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777287826; c=relaxed/simple; bh=RGu2430lNGgXf1aFh7GGMH4xc5y/o0HdWxVr81e1cSw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ECxHELdUhNvA20BMrKcjJnl7SbAsNiznV8Yt+rvxECrQyIsUeqB00dIz+6L12u6GbZogUAVxcTAyi45cM9ndJgFuAnKaCsl75CxGbznu9LWoPtAGSC0Relm3Q3fn6/YVqwdOm3qBcE2OfZrMAa3cNRyizgbblrbyr4BrNJH04qQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=o3jHWTSc; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="o3jHWTSc" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3A0C31684; Mon, 27 Apr 2026 04:03:39 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4B8443F763; Mon, 27 Apr 2026 04:03:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1777287824; bh=RGu2430lNGgXf1aFh7GGMH4xc5y/o0HdWxVr81e1cSw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=o3jHWTScA0Zo9XQQ+v+cdNdzLLYxdC+eZJZSvFwcN7rC/61dcZj0dtvIOpdD811qB kXwYaQAHCcSzXfV+n1QAY8hHb3MvbV0UMM2zgu/NH273ZILIYiYKdO+wwcX/ARnTCh JGJ4kQyXJpENctegHrpXA68JDCCKIyntc8y9Em3Q= Date: Mon, 27 Apr 2026 12:03:42 +0100 From: Leo Yan To: Yingchao Deng Cc: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Mathieu Poirier , Greg Kroah-Hartman , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, quic_yingdeng@quicinc.com, Jinlong Mao , Tingwei Zhang , Jie Gan Subject: Re: [PATCH] coresight: cti: Fix DT filter signals silently ignored Message-ID: <20260427110342.GH929984@e132581.arm.com> References: <20260426-nr_sigs-v1-1-3b9df99dab97@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: <20260426-nr_sigs-v1-1-3b9df99dab97@oss.qualcomm.com> On Sun, Apr 26, 2026 at 05:59:34PM +0800, Yingchao Deng wrote: > In cti_plat_process_filter_sigs(), after allocating a temporary > cti_trig_grp struct via kzalloc_obj(), the code never assigns tg->nr_sigs > = nr_filter_sigs. Since kzalloc zero-initialises the struct, tg->nr_sigs > remains 0. cti_plat_read_trig_group() guards with: > if (!tgrp->nr_sigs) > return 0; > > so it returns immediately without reading any signal indices from DT. > > Fix by assigning tg->nr_sigs before calling cti_plat_read_trig_group(). > > Fixes: a5614770ab97 ("coresight: cti: Add device tree support for custom CTI") > Signed-off-by: Yingchao Deng > --- > drivers/hwtracing/coresight/coresight-cti-platform.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/hwtracing/coresight/coresight-cti-platform.c b/drivers/hwtracing/coresight/coresight-cti-platform.c > index 4eff96f48594..d6d5388705c3 100644 > --- a/drivers/hwtracing/coresight/coresight-cti-platform.c > +++ b/drivers/hwtracing/coresight/coresight-cti-platform.c > @@ -329,6 +329,7 @@ static int cti_plat_process_filter_sigs(struct cti_drvdata *drvdata, > if (!tg) > return -ENOMEM; > > + tg->nr_sigs = nr_filter_sigs; > err = cti_plat_read_trig_group(tg, fwnode, CTI_DT_FILTER_OUT_SIGS); I checked the naming, seems tg->nr_sigs is the right field to store the number. LGTM: Reviewed-by: Leo Yan