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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260119111827.00001704@huawei.com>
Date: Mon, 19 Jan 2026 11:18:27 +0000
From: Jonathan Cameron <jonathan.cameron@...wei.com>
To: Cristian Marussi <cristian.marussi@....com>
CC: <linux-kernel@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<arm-scmi@...r.kernel.org>, <linux-fsdevel@...r.kernel.org>,
	<sudeep.holla@....com>, <james.quinlan@...adcom.com>, <f.fainelli@...il.com>,
	<vincent.guittot@...aro.org>, <etienne.carriere@...com>,
	<peng.fan@....nxp.com>, <michal.simek@....com>, <dan.carpenter@...aro.org>,
	<d-gole@...com>, <elif.topuz@....com>, <lukasz.luba@....com>,
	<philip.radford@....com>, <souvik.chakravarty@....com>
Subject: Re: [PATCH v2 01/17] firmware: arm_scmi: Define a common
 SCMI_MAX_PROTOCOLS value

On Wed, 14 Jan 2026 11:46:05 +0000
Cristian Marussi <cristian.marussi@....com> wrote:

> Add a common definition of SCMI_MAX_PROTOCOLS and use it all over the
> SCMI stack.
> 
> Signed-off-by: Cristian Marussi <cristian.marussi@....com>
Hi Cristian,

Mention the introduction of SCMI_PROTOCOL_LAST in the patch description
and probably say why it takes that value (which is much less than
the SCMI_MAX_PROTOCOLS value).

Jonathan

> ---
>  drivers/firmware/arm_scmi/notify.c | 4 +---
>  include/linux/scmi_protocol.h      | 3 +++
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c
> index dee9f238f6fd..78e9e27dc9ec 100644
> --- a/drivers/firmware/arm_scmi/notify.c
> +++ b/drivers/firmware/arm_scmi/notify.c
> @@ -94,8 +94,6 @@
>  #include "common.h"
>  #include "notify.h"
>  
> -#define SCMI_MAX_PROTO		256
> -
>  #define PROTO_ID_MASK		GENMASK(31, 24)
>  #define EVT_ID_MASK		GENMASK(23, 16)
>  #define SRC_ID_MASK		GENMASK(15, 0)
> @@ -1673,7 +1671,7 @@ int scmi_notification_init(struct scmi_handle *handle)
>  	ni->gid = gid;
>  	ni->handle = handle;
>  
> -	ni->registered_protocols = devm_kcalloc(handle->dev, SCMI_MAX_PROTO,
> +	ni->registered_protocols = devm_kcalloc(handle->dev, SCMI_MAX_PROTOCOLS,
>  						sizeof(char *), GFP_KERNEL);
>  	if (!ni->registered_protocols)
>  		goto err;
> diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
> index aafaac1496b0..c6efe4f371ac 100644
> --- a/include/linux/scmi_protocol.h
> +++ b/include/linux/scmi_protocol.h
> @@ -926,8 +926,11 @@ enum scmi_std_protocol {
>  	SCMI_PROTOCOL_VOLTAGE = 0x17,
>  	SCMI_PROTOCOL_POWERCAP = 0x18,
>  	SCMI_PROTOCOL_PINCTRL = 0x19,
> +	SCMI_PROTOCOL_LAST = 0x7f,
>  };
>  
> +#define SCMI_MAX_PROTOCOLS	256
> +
>  enum scmi_system_events {
>  	SCMI_SYSTEM_SHUTDOWN,
>  	SCMI_SYSTEM_COLDRESET,


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ