Skip to content

Commit 052fabd

Browse files
xpardee-createij-intel
authored andcommitted
platform/x86:intel/pmc: Convert index variables to be unsigned
Convert the index variables type to be unsigned to avoid confusion and error. Signed-off-by: Xi Pardee <xi.pardee@linux.intel.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20250409191056.15434-5-xi.pardee@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
1 parent 1b1aaa9 commit 052fabd

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

drivers/platform/x86/intel/pmc/core.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,7 +1457,8 @@ static int pmc_core_get_lpm_req(struct pmc_dev *pmcdev, struct pmc *pmc)
14571457

14581458
static int pmc_core_ssram_get_lpm_reqs(struct pmc_dev *pmcdev)
14591459
{
1460-
int ret, i;
1460+
unsigned int i;
1461+
int ret;
14611462

14621463
if (!pmcdev->ssram_pcidev)
14631464
return -ENODEV;
@@ -1484,7 +1485,7 @@ const struct pmc_reg_map *pmc_core_find_regmap(struct pmc_info *list, u16 devid)
14841485
}
14851486

14861487
int pmc_core_pmc_add(struct pmc_dev *pmcdev, u64 pwrm_base,
1487-
const struct pmc_reg_map *reg_map, int pmc_index)
1488+
const struct pmc_reg_map *reg_map, unsigned int pmc_index)
14881489
{
14891490
struct pmc *pmc = pmcdev->pmcs[pmc_index];
14901491

drivers/platform/x86/intel/pmc/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ int pmc_core_ssram_init(struct pmc_dev *pmcdev, int func);
515515
int generic_core_init(struct pmc_dev *pmcdev, struct pmc_dev_info *pmc_dev_info);
516516
const struct pmc_reg_map *pmc_core_find_regmap(struct pmc_info *list, u16 devid);
517517
int pmc_core_pmc_add(struct pmc_dev *pmcdev, u64 pwrm_base,
518-
const struct pmc_reg_map *reg_map, int pmc_index);
518+
const struct pmc_reg_map *reg_map, unsigned int pmc_index);
519519

520520
extern struct pmc_dev_info spt_pmc_dev;
521521
extern struct pmc_dev_info cnp_pmc_dev;

drivers/platform/x86/intel/pmc/ssram_telemetry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static inline u64 get_base(void __iomem *addr, u32 offset)
7474
}
7575

7676
static int
77-
pmc_core_ssram_get_pmc(struct pmc_dev *pmcdev, int pmc_idx, u32 offset)
77+
pmc_core_ssram_get_pmc(struct pmc_dev *pmcdev, unsigned int pmc_idx, u32 offset)
7878
{
7979
struct pci_dev *ssram_pcidev = pmcdev->ssram_pcidev;
8080
void __iomem __free(pmc_core_iounmap) *tmp_ssram = NULL;

0 commit comments

Comments
 (0)