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 53B0F37E2FD for ; Tue, 12 May 2026 15:24:10 +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=1778599451; cv=none; b=UZMvzPY29r39zW00fpWV1y5z8ixjMdeFz5tIzUGzD2EWOeN2hccKSPLIQZG/VsfxobXZtrTgZ0g9rOY3hqExDSnbsYDRqKrxBsJEIHV3fVBUAam3S5iv2hVsrmuzQv4n4KtOs9ksgqOxitQwAGFQL3HWA1ohnFXAzMD1vdtknB0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778599451; c=relaxed/simple; bh=XPwUdxVOc0Tqd107WVgjRsQ2UAF234jshz+3ch/zx5s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B57YCS2CqFa2rZwceM4aJ4gQMJJCH/wwl9Evf4dxaKlsjF940U45KFZQniFC0n9eyx3EOt7qryixXUd6wZTi+s9Vi3jbfp7Dn8JcFEoT/NnUd7kZMXoU176GL5NBYijrvZQNfsH9H6/QlwxYmi7tGkwyfOKp7orDM58hcD/9JFQ= 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=XXVtzqi8; 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="XXVtzqi8" 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 7230F1691; Tue, 12 May 2026 08:23:59 -0700 (PDT) Received: from localhost (e132581.arm.com [10.1.196.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 516BA3F905; Tue, 12 May 2026 08:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1778599444; bh=XPwUdxVOc0Tqd107WVgjRsQ2UAF234jshz+3ch/zx5s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=XXVtzqi8OLp1GOwHqyH658/tCsxQoR/N9z0Ii+Mu0dSY5kw+OcdUAMLVmibTZ6mHu DWySnsUW63/uuDwJ/UTa38Tl2bjQTeyxeDiGnHFu5MyRhon70hkn7f5q8lGNmE3fzZ dmU7lGdZiqOckaWU4Bb7/WPofxK4vzxqCwsGurTA= Date: Tue, 12 May 2026 16:24:02 +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, Richard Cheng Subject: Re: [PATCH v4] coresight: fix missing error code when trace ID is invalid Message-ID: <20260512152402.GB34802@e132581.arm.com> References: <20260512-fix-trace-id-error-v4-1-eb3de789767a@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: <20260512-fix-trace-id-error-v4-1-eb3de789767a@oss.qualcomm.com> On Tue, May 12, 2026 at 09:56:07AM +0800, Jie Gan wrote: > When coresight_path_assign_trace_id() cannot assign a valid trace ID, > coresight_enable_sysfs() takes the err_path goto with ret still 0, > returning success to the caller despite no trace session being started. > > Change coresight_path_assign_trace_id() to return int, moving the > IS_VALID_CS_TRACE_ID() check inside it so it returns -EINVAL on failure > and 0 on success. Update both callers to propagate this return value > directly instead of inspecting path->trace_id after the call. > > Fixes: d87d76d823d1 ("Coresight: Allocate trace ID after building the path") > Reviewed-by: James Clark > Reviewed-by: Richard Cheng > Signed-off-by: Jie Gan Reviewed-by: Leo Yan