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: <2025111341-attendee-ferment-262b@gregkh>
Date: Thu, 13 Nov 2025 08:20:07 -0500
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Chang Junzheng <guagua210311@...com>
Cc: outreachy@...ts.linux.dev, Vaibhav Agarwal <vaibhav.sr@...il.com>,
	Mark Greer <mgreer@...malcreek.com>,
	Johan Hovold <johan@...nel.org>, Alex Elder <elder@...nel.org>,
	greybus-dev@...ts.linaro.org, linux-staging@...ts.linux.dev,
	linux-kernel@...r.kernel.org,
	Chang Junzheng <guagua210311@...look.com>
Subject: Re: [PATCH] staging: greybus: audio_manager_module: make envp array
 static const

On Thu, Nov 13, 2025 at 09:01:46PM +0800, Chang Junzheng wrote:
> From: Chang Junzheng <guagua210311@...look.com>
> 
> The envp array in send_add_uevent() function is declared as a non-const
> local array, which triggers the following checkpatch.pl warning:
> 
> WARNING: char * array declaration might be better as static const
> 
> Change the declaration to 'static const char * const' to improve code
> safety by making the array read-only and allow for better compiler
> optimization. This follows the kernel coding style recommendations.
> 
> Signed-off-by: Chang Junzheng <guagua210311@...com>

You sent this twice?

> ---
>  drivers/staging/greybus/audio_manager_module.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/greybus/audio_manager_module.c b/drivers/staging/greybus/audio_manager_module.c
> index 4a4dfb42f50f..ca6a2cd0bc4f 100644
> --- a/drivers/staging/greybus/audio_manager_module.c
> +++ b/drivers/staging/greybus/audio_manager_module.c
> @@ -159,14 +159,14 @@ static void send_add_uevent(struct gb_audio_manager_module *module)
>  	char ip_devices_string[64];
>  	char op_devices_string[64];
>  
> -	char *envp[] = {
> -		name_string,
> -		vid_string,
> -		pid_string,
> -		intf_id_string,
> -		ip_devices_string,
> -		op_devices_string,
> -		NULL
> +	static const char * const envp[] = {
> +						name_string,
> +						vid_string,
> +						pid_string,
> +						intf_id_string,
> +						ip_devices_string,
> +						op_devices_string,
> +						NULL

Why did you indent this?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ