From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 986A232E122 for ; Tue, 17 Feb 2026 14:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771339878; cv=none; b=Iw9KyOT4IQVb6Ob1nE1l64xBB0z5W46yPzJKUD3QTk2VvZ8vaQLSVv3ik4vq+z9g/9UeRLWyxNm7ANVXLEi+ohq4CESYiGOayg+KrotpbUwFTR9P9IsDvAmt4YJoTzdxeblS0PoGvZTV1H5SHjslu4cbm2ZT9PfLm01RpJRKnRE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771339878; c=relaxed/simple; bh=hl3fEq9PuUnaDuLw/grJpubUxpxwenE+XonCPWEyvPE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=r5iX9+hN2H9ssmm+Lm1OqYWlGFvHVNDxBs3+TOBp8xQWXnm/wr42iDLuPbd1dfmXVhQ4OC6CuGU5t+21jVAUPAOEchbOTzBcCAoKS7c41WN69SvwzUhueWLYH7LHczOhBvkmbRjVU2Azww81l2+NEPk7WJjYYLBLXh1OQgdIVh0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=tVTt9/59; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="tVTt9/59" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-4376c0bffc1so3278829f8f.0 for ; Tue, 17 Feb 2026 06:51:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1771339875; x=1771944675; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=b67H6Br6AJpdiB9/1JXaxdAZWFTKfbCqKai2ICAEzVM=; b=tVTt9/59Q4igjXF6RD9A6DTCimJ9ksT0tOOJ3L9QjDX7XTSzuuplXCD/DHJTqhvLn1 WfHqs88rMzApzWUvncXPZJyUViTGamamZdXY9B/2xcefXa1LuX4inc15grYEpsbgR8E4 P9Rh82INufS1HdB86xJ9PYOn0HF4A8p04uc8ZEdV6ZzFtv8TXvB3znxmbkwCmBucRrGO NZZH6M4n4RkyoNWDXiqN3frf2XzuKQTmuX9VRCR+ti4drojzcpmmHpGj+YEg7O14od25 KAohXgMljsTitAVg7WWF8yU0TUrGO0nnVhRPriHaIZn7ve2Dql8QfzyjEZaiSuMGwySG Nt2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771339875; x=1771944675; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=b67H6Br6AJpdiB9/1JXaxdAZWFTKfbCqKai2ICAEzVM=; b=vBZlsB953PKH09xUqMo0TvspLxZWLFn/HETII+h4Omos3kb4NCFjcs5tIUtJy5H4X2 InXQvtKVOgzO+WKbkQg8LMBREJxspJtz/GbRQap8uM3YaQAQdWzad7b6e2KZzta+nLkv S3ZqW+ezWzYgfXVTWUmjE9i2JnNHYWdizHUTV4z+dvG0CyyxE/ZRYwkIS1KjMNIAs43W 1Sq5yAI9xaURdj/rm42xVn5/KQyJTi96zbHdPKx1cvX2ZZE9ynoMk/DaZANfoFESp9S3 HJ6LeCZbe5c5DNkwy4jhEZyRCaxI2RVPD3T2HzrMoBvtE28wegytMTTZ90Lf06mPgJD9 o+zA== X-Forwarded-Encrypted: i=1; AJvYcCWO/7wRAZkgezmuU9D5BWYRO7PalOE+1gL+MgOB4UCasz4qXEA5lI21hNVpv+dulzn5TFZIDbSHXL+ok9A=@vger.kernel.org X-Gm-Message-State: AOJu0YwTrzqWjxQjZXsDAp1xu00zpgVAM6IehMCc14jAk+etUkFu82E8 iHj5fY+6tjIyWXZNruOUd56tBXR3g+ohTKSsjMDNHP3eDKhh4kNNygzSWV3ENE7lE5k= X-Gm-Gg: AZuq6aKzU7yoORk57y1pmA0PD+8KNcubqAaf6dCSjvy2n1Y7p7mqACo/4fJkhjGIvSt 4XIDvxo5TkKii0STHbTNv7Eqh3E11+/yqhMzCcpL777KLIa/GyYLh1CG6ZbIfZ0wfKASn8mjcrv 4Yaa7jeZ1Alh0exJIkL0kFsS5ei1Lv8b5BvME7pSP6OXTA2YeIHmMOiMvdop3N02x6vHATvAIZn J8KIu9Un8JGHrbOj9p8hjecPHTMK2q09ZOWYuR4ZWaQZ31UlyScwX40nW/izk05L4sS8UzDSe1p R6BoQ9MA3awjWGUXBCcOvjudsOy+a8KXuOiop24/POp6mpAFIkXtTVVcZqOBRN0KEE6MVLeMyjG 8kDU1gWufpbuszN1hS6wMuKIsRXdatoqi7pTsOCUqgcWO+Hwq7IZYkyeqBjdzWV0kpQRcXOP54E yTGiAflGgpTcXfjpzNFqOumvTOAKLI X-Received: by 2002:a05:6000:1aca:b0:436:2fdf:b599 with SMTP id ffacd0b85a97d-437978ce4c6mr24612737f8f.21.1771339874899; Tue, 17 Feb 2026 06:51:14 -0800 (PST) Received: from [192.168.1.3] ([185.48.77.170]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-439567aad3csm768498f8f.36.2026.02.17.06.51.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 17 Feb 2026 06:51:14 -0800 (PST) Message-ID: Date: Tue, 17 Feb 2026 14:51:13 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 8/8] coresight: Unify bus unregistration via coresight_unregister() To: Leo Yan , Suzuki K Poulose Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Mike Leach , Alexander Shishkin , Greg Kroah-Hartman , Mathieu Poirier , Mao Jinlong References: <20260209-arm_coresight_refactor_dev_register-v4-0-62d6042f76f7@arm.com> <20260209-arm_coresight_refactor_dev_register-v4-8-62d6042f76f7@arm.com> Content-Language: en-US From: James Clark In-Reply-To: <20260209-arm_coresight_refactor_dev_register-v4-8-62d6042f76f7@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 09/02/2026 12:44 pm, Leo Yan wrote: > Once a device is successfully registered, set the "registered" flag to > true. After that point, all failures jump to the out_unlock label to > unwind the flow via coresight_unregister(). > > Since failure handling is unified, the comment about resource release > for the etm_perf_add_symlink_sink() failure is no need, remove it. > > Signed-off-by: Leo Yan > --- > drivers/hwtracing/coresight/coresight-core.c | 15 ++++----------- > 1 file changed, 4 insertions(+), 11 deletions(-) > > diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c > index 955af43010446803030973c72f07315492b2fcf3..56320ce49cb23bf7168f69b7f1ad820ca83b8365 100644 > --- a/drivers/hwtracing/coresight/coresight-core.c > +++ b/drivers/hwtracing/coresight/coresight-core.c > @@ -1383,20 +1383,13 @@ struct coresight_device *coresight_register(struct coresight_desc *desc) > goto out_unlock; > } > > - ret = etm_perf_add_symlink_sink(csdev); > - > - /* > - * As with the above, all resources are free'd explicitly via > - * coresight_device_release() triggered from put_device(), which is in > - * turn called from function device_unregister(). > - */ > - if (ret && ret != -EOPNOTSUPP) { > - device_unregister(&csdev->dev); > - goto out_unlock; > - } > /* Device is now registered */ > registered = true; > > + ret = etm_perf_add_symlink_sink(csdev); > + if (ret && ret != -EOPNOTSUPP) > + goto out_unlock; > + > ret = coresight_create_conns_sysfs_group(csdev); > if (ret) > goto out_unlock; > Reviewed-by: James Clark