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 CD8A82F8E95 for ; Fri, 8 May 2026 13:44:39 +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=1778247881; cv=none; b=B+Sv0ZF5v9ABiZ2z/xx1ICF4Ntt0G29kib95RhRC/JgovX8IFYOPNvV39BkSeTRf/3LOHPZiwbz9luqtpGXdi2MjOLaP2+ek21nO7d4iIafrZlDRAurvgiThnu2Scg7S0x0faSAnv5T0KnTk4rto2v5t0foC9TwJd8Xfti3jh7A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778247881; c=relaxed/simple; bh=sKvxQrZlnxkP3PVGyMsRfHU0bXPzYb1BLgQ8VEd5a3A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=DCMpsKdnKRJmQdCkVCShLUnoXOETjeRAxrJcBbgFn3bfiIvh832zOT5ecddpT7KQUZeap5zixI15Z5VxhMyN4vakhx0toOiOSxxSNj29XHV3hSJ1sP6TcTLmn1Ron25maWLSm+1DMrP3IayEdA1dMzxHzlrJoicuDwRNKSfm6AA= 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=iR0Ru+s2; 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="iR0Ru+s2" 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 E980326BC; Fri, 8 May 2026 06:44:33 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D20293F836; Fri, 8 May 2026 06:44:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1778247879; bh=sKvxQrZlnxkP3PVGyMsRfHU0bXPzYb1BLgQ8VEd5a3A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iR0Ru+s2ENCD6wmO1QZZpd6dvtbHiaMhYuoLZ2OO+GUuhPfgZreucfHp1vDI5TEKC dpvYmQProh3aspY/KAXE7orRxnHENq4Iu4h0LGh+lJ2N9YPQ4n8pxyaQIfByoyavMC 62AOEV6mnqa+0oM/bXn1eocs/0D06jktdDDIc8cM= Date: Fri, 8 May 2026 14:44:37 +0100 From: Leo Yan To: Jie Gan Cc: Suzuki K Poulose , Mike Leach , James Clark , Alexander Shishkin , Tingwei Zhang , coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] coresight: fix missing error code when trace ID is invalid Message-ID: <20260508134437.GH3778514@e132581.arm.com> References: <20260508-fix-trace-id-error-v1-1-5f11a5456fdf@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: <20260508-fix-trace-id-error-v1-1-5f11a5456fdf@oss.qualcomm.com> On Fri, May 08, 2026 at 01:45:35PM +0800, Jie Gan wrote: [...] > coresight_path_assign_trace_id(path, CS_MODE_SYSFS); > - if (!IS_VALID_CS_TRACE_ID(path->trace_id)) > + if (!IS_VALID_CS_TRACE_ID(path->trace_id)) { > + ret = -EINVAL; > goto err_path; > + } On the top of this patch, could we do a further improvement? Move IS_VALID_CS_TRACE_ID() into coresight_path_assign_trace_id() and return 0 for success and < 0 for failures. As result, callers only need to check the returned value. For this patch: Reviewed-by: Leo Yan