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: <900c7e79-2cc9-407f-92cb-c6544cbc86c1@acm.org>
Date: Thu, 2 Oct 2025 09:18:38 -0700
From: Bart Van Assche <bvanassche@....org>
To: Wonkon Kim <wkon.kim@...sung.com>, James.Bottomley@...senPartnership.com,
 martin.petersen@...cle.com, peter.wang@...iatek.com,
 linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ufs: core: Initialize a variable mode for PA_PWRMODE

On 10/2/25 12:00 AM, Wonkon Kim wrote:
>   static bool ufshcd_is_pwr_mode_restore_needed(struct ufs_hba *hba)
>   {
>   	struct ufs_pa_layer_attr *pwr_info = &hba->pwr_info;
> -	u32 mode;
> +	u32 mode = 0;
>   
>   	ufshcd_dme_get(hba, UIC_ARG_MIB(PA_PWRMODE), &mode);

Wouldn't it be better to check the ufshcd_dme_get() return value rather
than to zero-initialize 'mode'? I think that would make 
ufshcd_is_pwr_mode_restore_needed() easier to read compared to applying
the above patch.

Thanks,

Bart.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ