[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f65374fd-1bdd-f6e2-4c9e-9ce5d9f7fd9e@linux.intel.com>
Date: Mon, 8 Jul 2024 10:56:43 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Xi Pardee <xi.pardee@...ux.intel.com>
cc: irenic.rajneesh@...il.com, david.e.box@...ux.intel.com,
Hans de Goede <hdegoede@...hat.com>, platform-driver-x86@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/9] platform/x86:intel/pmc: Convert index variables to
be unsigned
On Mon, 24 Jun 2024, Xi Pardee wrote:
> From: Xi Pardee <xi.pardee@...el.com>
>
> Convert the index variables type to unsigned to avoid confusion and
> errors.
>
> Signed-off-by: Xi Pardee <xi.pardee@...el.com>
> ---
> 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.
Powered by blists - more mailing lists