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] [day] [month] [year] [list]
Date:   Fri, 28 Oct 2022 16:13:35 +0200
From:   Sebastian Reichel <sebastian.reichel@...labora.com>
To:     Colin Ian King <colin.i.king@...il.com>
Cc:     linux-pm@...r.kernel.org, kernel-janitors@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] power: supply: lp8788: make const array name static

Hi,

On Wed, Oct 05, 2022 at 05:13:48PM +0100, Colin Ian King wrote:
> Don't populate the read-only array name on the stack but instead make
> it static. Since the data and the pointers don't change also add in
> a missing const. Also makes the object code a little smaller.
> 
> Signed-off-by: Colin Ian King <colin.i.king@...il.com>
> ---

Thanks, queued.

-- Sebastian

>  drivers/power/supply/lp8788-charger.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/lp8788-charger.c b/drivers/power/supply/lp8788-charger.c
> index 56c57529c228..802c9491fcdb 100644
> --- a/drivers/power/supply/lp8788-charger.c
> +++ b/drivers/power/supply/lp8788-charger.c
> @@ -520,7 +520,7 @@ static int lp8788_set_irqs(struct platform_device *pdev,
>  static int lp8788_irq_register(struct platform_device *pdev,
>  				struct lp8788_charger *pchg)
>  {
> -	const char *name[] = {
> +	static const char * const name[] = {
>  		LP8788_CHG_IRQ, LP8788_PRSW_IRQ, LP8788_BATT_IRQ
>  	};
>  	int i;
> -- 
> 2.37.3
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ