X86 platform drivers
 help / color / mirror / Atom feed
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Xi Pardee <xi.pardee@linux.intel.com>
Cc: irenic.rajneesh@gmail.com, david.e.box@linux.intel.com,
	 Hans de Goede <hdegoede@redhat.com>,
	platform-driver-x86@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/9] platform/x86:intel/pmc: Convert index variables to be unsigned
Date: Mon, 8 Jul 2024 10:56:43 +0300 (EEST)	[thread overview]
Message-ID: <f65374fd-1bdd-f6e2-4c9e-9ce5d9f7fd9e@linux.intel.com> (raw)
In-Reply-To: <20240624203218.2428475-4-xi.pardee@linux.intel.com>

On Mon, 24 Jun 2024, Xi Pardee wrote:

> From: Xi Pardee <xi.pardee@intel.com>
> 
> Convert the index variables type to unsigned to avoid confusion and
> errors.
> 
> Signed-off-by: Xi Pardee <xi.pardee@intel.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.


  reply	other threads:[~2024-07-08  7:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 20:32 [PATCH 0/9] LTR ignore feature improvement Xi Pardee
2024-06-24 20:32 ` [PATCH 1/9] platform/x86:intel/pmc: Use the return value of pmc_core_send_msg Xi Pardee
2024-06-24 20:32 ` [PATCH 2/9] platform/x86:intel/pmc: Simplify mutex usage with cleanup helpers Xi Pardee
2024-06-24 20:32 ` [PATCH 3/9] platform/x86:intel/pmc: Convert index variables to be unsigned Xi Pardee
2024-07-08  7:56   ` Ilpo Järvinen [this message]
2024-06-24 20:32 ` [PATCH 4/9] platform/x86:intel/pmc: Move pmc assignment closer to first usage Xi Pardee
2024-06-24 20:32 ` [PATCH 5/9] platform/x86:intel/pmc: Add support to show ltr_ignore value Xi Pardee
2024-06-24 20:32 ` [PATCH 6/9] platform/x86:intel/pmc: Remove unneeded min_t check Xi Pardee
2024-06-24 20:32 ` [PATCH 7/9] platform/x86:intel/pmc: Use DEFINE_SHOW_STORE_ATTRIBUTE macro Xi Pardee
2024-06-24 20:32 ` [PATCH 8/9] platform/x86:intel/pmc: Use the Elvis operator Xi Pardee
2024-06-24 20:32 ` [PATCH 9/9] platform/x86:intel/pmc: Add support to undo ltr_ignore Xi Pardee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f65374fd-1bdd-f6e2-4c9e-9ce5d9f7fd9e@linux.intel.com \
    --to=ilpo.jarvinen@linux.intel.com \
    --cc=david.e.box@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=irenic.rajneesh@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=xi.pardee@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox