Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
	Mike Leach <mike.leach@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] coresight: trbe: Hide enable_sink sysfs file
Date: Wed, 13 May 2026 09:15:51 +0100	[thread overview]
Message-ID: <20260513081551.GC34802@e132581.arm.com> (raw)
In-Reply-To: <20260507-james-cs-hide-trbe-enable-v1-1-b4e40439f44c@linaro.org>

On Thu, May 07, 2026 at 11:53:45AM +0100, James Clark wrote:

[...]

> +static umode_t coresight_attr_is_visible(struct kobject *kobj,
> +					 struct attribute *attr, int n)
>  {
>  	struct device *dev = kobj_to_dev(kobj);
> +	struct coresight_device *csdev = to_coresight_device(dev);
>  
>  	if (attr == &dev_attr_label.attr) {
>  		if (fwnode_property_present(dev_fwnode(dev), "label"))
>  			return attr->mode;
>  		else
>  			return 0;
> +	} else if (attr == &dev_attr_enable_sink.attr ||
> +		   attr == &dev_attr_enable_source.attr) {
> +		if (csdev->no_sysfs_mode)
> +			return 0;
> +		else
> +			return attr->mode;

I'd prefer no_sysfs_mode to work as a general flag rather than being
limited to sink/source devices only. Otherwise, LGTM.

Thanks,
Leo


  reply	other threads:[~2026-05-13  8:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-07 10:53 [PATCH] coresight: trbe: Hide enable_sink sysfs file James Clark
2026-05-13  8:15 ` Leo Yan [this message]
2026-05-13  9:33   ` James Clark
2026-05-13  9:54     ` Leo Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260513081551.GC34802@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@arm.com \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox