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 12A182C0299 for ; Tue, 21 Apr 2026 09:56:33 +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=1776765395; cv=none; b=jdiY9UGyLmB5kXxkHivJ0XGFAg9JFqYo5c5B1VAdYcY5VYNFM6o3ekGwijhyA1JqwEIMp5dt1PLRfF6u99rOpn6cDqsozl94+sqy2sydM5A7zXsl5NwRDyH4giJzP02aYMdPbpzPvI2YU3KPxihYg560ePVrGboKCwpE9StIlQ0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776765395; c=relaxed/simple; bh=FNjjiRmHFAVsekADJqma64aVwQrk+ERG2MMcqqQqegQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=k0+Hz6KhKAtPKVLpk7bV1rCVdcKrc9K4Bn/cj2KrCtuHdWpjhuO4ef5TAjsT5q0RKKOYL0RY+svnkRXFY1gXfuBOe3mlK5eNEXTCAnkE+sVhDdQmbUefZ+Nl00BBDRTuVHgEG3R61G2n7xmiDrq+ahRPZIMPMvWF6GN5R+aDIJA= 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=VqAtaml1; 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="VqAtaml1" 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 D59E326A4; Tue, 21 Apr 2026 02:56:27 -0700 (PDT) Received: from e129823.arm.com (e129823.arm.com [10.1.197.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BBA2A3FBCB; Tue, 21 Apr 2026 02:56:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1776765393; bh=FNjjiRmHFAVsekADJqma64aVwQrk+ERG2MMcqqQqegQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VqAtaml1dSiFEsuIRFZ2zH/DkJzvYlrZMQoiSGGxdx/s8mNw/dQ1OTTZ54vgim+o6 gkHfaInNl3cGvxxwssFYQ6SsNh3vsXpdd4UyjHltmdmFAeuQqyN9inBmw3vxGR/pQJ nMuDWrcDoQYgPeN2rXRgOQKOyXCBpw/unAMZwvgc= Date: Tue, 21 Apr 2026 10:56:29 +0100 From: Yeoreum Yun To: Suzuki K Poulose Cc: Leo Yan , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, mike.leach@arm.com, james.clark@linaro.org, alexander.shishkin@linux.intel.com, jie.gan@oss.qualcomm.com Subject: Re: [PATCH v5 02/12] coresight: etm4x: fix underflow for nrseqstate Message-ID: References: <20260415165528.3369607-1-yeoreum.yun@arm.com> <20260415165528.3369607-3-yeoreum.yun@arm.com> <20260416151102.GL356832@e132581.arm.com> <6dcb14c1-0759-4f2a-8bbc-b85adf3d12f4@arm.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=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <6dcb14c1-0759-4f2a-8bbc-b85adf3d12f4@arm.com> On Tue, Apr 21, 2026 at 09:50:56AM +0100, Suzuki K Poulose wrote: > On 21/04/2026 09:50, Suzuki K Poulose wrote: > > On 16/04/2026 16:11, Leo Yan wrote: > > > On Wed, Apr 15, 2026 at 05:55:18PM +0100, Yeoreum Yun wrote: > > > > TCRSEQEVR is implemented only when TCRIDR5.NUMSEQSTATE is 0b100, > > > > in which case n ranges from 0 to 2; otherwise, > > > > TCRIDR5.NUMSEQSTATE is 0b000. > > > > > > My suggestion in previous version is not quite right, thanks for > > > making this correct. > > > > > > [...] > > > > > > > @@ -1395,6 +1395,8 @@ static ssize_t seq_idx_store(struct device *dev, > > > >       struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); > > > >       struct etmv4_config *config = &drvdata->config; > > > > +    if (!drvdata->nrseqstate) > > > > +        return -EINVAL; > > > > > > For "nrseqstate = 0" case, would it return -EOPNOTSUPP instead? > > > > Or should we make this only visible if the nrseqstore is meaningful ? > > > > Suzuki > > > > > > > > Otherwise, LGTM: > > > > > > Reviewed-by: Leo Yan > > > > Also, please add Fixes: tag for these bug fixes Okay. I'll add the tag. Thanks! -- Sincerely, Yeoreum Yun