From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Cc: Hans de Goede <hdegoede@redhat.com>,
Sanket.Goswami@amd.com, platform-driver-x86@vger.kernel.org,
Mario Limonciello <mario.limonciello@amd.com>
Subject: Re: [PATCH v4 07/11] platform/x86/amd/pmc: Use ARRAY_SIZE() to fill num_ips information
Date: Thu, 7 Nov 2024 12:44:39 +0200 (EET) [thread overview]
Message-ID: <ffcdf9a5-fa69-c8b7-67cd-44b37235518c@linux.intel.com> (raw)
In-Reply-To: <20241107072714.943423-8-Shyam-sundar.S-k@amd.com>
[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]
On Thu, 7 Nov 2024, Shyam Sundar S K wrote:
> Instead of manually specifying num_ips, use ARRAY_SIZE() to set this value
> based on the actual number of elements in the array.
>
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> Co-developed-by: Sanket Goswami <Sanket.Goswami@amd.com>
> Signed-off-by: Sanket Goswami <Sanket.Goswami@amd.com>
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
> ---
> drivers/platform/x86/amd/pmc/pmc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c
> index e03b576105a5..7c3204110bf8 100644
> --- a/drivers/platform/x86/amd/pmc/pmc.c
> +++ b/drivers/platform/x86/amd/pmc/pmc.c
> @@ -12,6 +12,7 @@
>
> #include <asm/amd_nb.h>
> #include <linux/acpi.h>
> +#include <linux/array_size.h>
> #include <linux/bitfield.h>
> #include <linux/bits.h>
> #include <linux/debugfs.h>
> @@ -117,7 +118,6 @@ static const struct amd_pmc_bit_map soc15_ip_blk[] = {
> {"IPU", BIT(19)},
> {"UMSCH", BIT(20)},
> {"VPE", BIT(21)},
> - {}
> };
>
> static bool disable_workarounds;
> @@ -169,7 +169,7 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev)
> break;
> case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT:
> case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
> - dev->num_ips = 22;
> + dev->num_ips = ARRAY_SIZE(soc15_ip_blk);
> dev->smu_msg = 0x938;
> break;
> }
>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
--
i.
next prev parent reply other threads:[~2024-11-07 10:44 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-07 7:27 [PATCH v4 00/11] platform/x86/amd/pmc: Updates to AMD PMC driver Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 01/11] platform/x86/amd/pmc: Move STB block into amd_pmc_s2d_init() Shyam Sundar S K
2024-11-07 10:40 ` Ilpo Järvinen
2024-11-07 15:32 ` Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 02/11] platform/x86/amd/pmc: Invoke amd_pmc_s2d_init() Post Debugfs Registration Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 03/11] platform/x86/amd/pmc: Move STB functionality to a new file for better code organization Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 04/11] platform/x86/amd/pmc: Update function names to align with new STB file Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 05/11] platform/x86/amd/pmc: Define enum for S2D/PMC msg_port and add helper function Shyam Sundar S K
2024-11-07 10:43 ` Ilpo Järvinen
2024-11-07 7:27 ` [PATCH v4 06/11] platform/x86/amd/pmc: Isolate STB code changes to a new file Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 07/11] platform/x86/amd/pmc: Use ARRAY_SIZE() to fill num_ips information Shyam Sundar S K
2024-11-07 10:44 ` Ilpo Järvinen [this message]
2024-11-07 7:27 ` [PATCH v4 08/11] platform/x86/amd/pmc: Update IP information structure for newer SoCs Shyam Sundar S K
2024-11-07 11:02 ` Ilpo Järvinen
2024-11-07 15:34 ` Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 09/11] platform/x86/amd/pmc: Update S2D message id for 1Ah Family 70h model Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 10/11] platform/x86/amd/pmc: Add STB support for AMD Desktop variants Shyam Sundar S K
2024-11-07 7:27 ` [PATCH v4 11/11] MAINTAINERS: Change AMD PMC driver status to "Supported" Shyam Sundar S K
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=ffcdf9a5-fa69-c8b7-67cd-44b37235518c@linux.intel.com \
--to=ilpo.jarvinen@linux.intel.com \
--cc=Sanket.Goswami@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=hdegoede@redhat.com \
--cc=mario.limonciello@amd.com \
--cc=platform-driver-x86@vger.kernel.org \
/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