Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: James Clark <james.clark@linaro.org>
To: Leo Yan <leo.yan@arm.com>
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 10:33:40 +0100	[thread overview]
Message-ID: <cfb27efd-4887-4d47-8b38-99fc2d7bcfac@linaro.org> (raw)
In-Reply-To: <20260513081551.GC34802@e132581.arm.com>



On 13/05/2026 9:15 am, Leo Yan wrote:
> 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

Which other files would you hide though? These are the only two that I 
could think of.

I wouldn't hide all sysfs files for 'no_sysfs_mode' as there are read 
only things that aren't strictly related to sysfs mode.



  reply	other threads:[~2026-05-13  9:33 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
2026-05-13  9:33   ` James Clark [this message]
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=cfb27efd-4887-4d47-8b38-99fc2d7bcfac@linaro.org \
    --to=james.clark@linaro.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=leo.yan@arm.com \
    --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