Re: [PATCH 3/9] platform/x86:intel/pmc: Convert index variables to be unsigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 24 Jun 2024, Xi Pardee wrote:

> From: Xi Pardee <xi.pardee@xxxxxxxxx>
> 
> Convert the index variables type to unsigned to avoid confusion and
> errors.
> 
> Signed-off-by: Xi Pardee <xi.pardee@xxxxxxxxx>
> ---
>  drivers/platform/x86/intel/pmc/core.c | 51 ++++++++++++++++-----------
>  1 file changed, 30 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/platform/x86/intel/pmc/core.c b/drivers/platform/x86/intel/pmc/core.c
> index b524b74293ca..cbdcbf288f67 100644
> --- a/drivers/platform/x86/intel/pmc/core.c
> +++ b/drivers/platform/x86/intel/pmc/core.c
> @@ -247,7 +247,7 @@ static void pmc_core_slps0_display(struct pmc *pmc, struct device *dev,
>  
>  static int pmc_core_lpm_get_arr_size(const struct pmc_bit_map **maps)
>  {
> -	int idx;
> +	unsigned int idx;
>  
>  	for (idx = 0; maps[idx]; idx++)
>  		;/* Nothing */
> @@ -260,8 +260,8 @@ static void pmc_core_lpm_display(struct pmc *pmc, struct device *dev,
>  				 const char *str,
>  				 const struct pmc_bit_map **maps)
>  {
> -	int index, idx, len = 32, bit_mask, arr_size;
> -	u32 *lpm_regs;
> +	unsigned int index, idx, len = 32, arr_size;
> +	u32 bit_mask, *lpm_regs;
>  
>  	arr_size = pmc_core_lpm_get_arr_size(maps);

Hi,

Thanks for these patches. I've applied them into review-ilpo branch.

While applying, I altered the return type of pmc_core_lpm_get_arr_size() 
to unsigned int as it seemed the right thing to do after everything 
around it is already unsigned.

-- 
 i.





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux