lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1dcfd28c-78d8-4790-8c99-27e15989ca40@arm.com>
Date: Tue, 9 Jan 2024 10:22:15 +0000
From: Suzuki K Poulose <suzuki.poulose@....com>
To: James Clark <james.clark@....com>, coresight@...ts.linaro.org
Cc: Mike Leach <mike.leach@...aro.org>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Maxime Coquelin <mcoquelin.stm32@...il.com>,
 Alexandre Torgue <alexandre.torgue@...s.st.com>,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH 6/8] coresight: Move all sysfs code to sysfs file

On 12/12/2023 15:54, James Clark wrote:
> At the moment the core file contains both sysfs functionality and
> core functionality, while the Perf mode is in a separate file in
> coresight-etm-perf.c
> 
> Many of the functions have ambiguous names like
> coresight_enable_source() which actually only work in relation to the
> sysfs mode. To avoid further confusion, move everything that isn't core
> functionality into the sysfs file and append  _sysfs to the ambiguous
> functions.
> 
> Signed-off-by: James Clark <james.clark@....com>

The changes look good to me. One minor comment below.

..

> +struct device_type coresight_dev_type[] = {
> +	{
> +		.name = "sink",
> +		.groups = coresight_sink_groups,
> +	},
> +	{
> +		.name = "link",
> +	},
> +	{
> +		.name = "linksink",
> +		.groups = coresight_sink_groups,
> +	},
> +	{
> +		.name = "source",
> +		.groups = coresight_source_groups,
> +	},
> +	{
> +		.name = "helper",
> +	}
> +};
> +/* Ensure the enum matches the names and groups */
> +static_assert(ARRAY_SIZE(coresight_dev_type) == CORESIGHT_DEV_TYPE_MAX);

As a general cleanup, while you are at it, could we please replace this 
with explicit member initialisers as a follow up patch ?

i.e.,

struct device_typ coresight_dev_type[CORESIGHT_DEV_TYPE_MAX] = {
	[CORESIGHT_DEV_TYPE_SINK] = {
			.name = "sink",
			.groups = coresight_sink_groups,
	},
	[CORESIGHT_DEV_TYPE_LINK] =
..

}

Thanks
Suzuki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ