* [PATCH] PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs
@ 2026-08-20 23:23 Hans Zhang
2026-08-20 23:41 ` sashiko-bot
2026-08-21 10:25 ` Aksh Garg
0 siblings, 2 replies; 3+ messages in thread
From: Hans Zhang @ 2026-08-20 23:23 UTC (permalink / raw)
To: bhelgaas, lpieralisi, kwilczynski, mani
Cc: robh, mpillai, a-garg7, s-vadapalli, linux-pci, linux-kernel,
Hans Zhang, kernel test robot
Fix Clang -Wenum-compare-conditional warning by using a single u32
variable to hold the LTSSM status value, replacing two separate enum
variables of different types.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202608201933.w2579mwx-lkp@intel.com/
Fixes: d70e964dc099 ("PCI: cadence: Add LGA IP debugfs for LTSSM status")
Signed-off-by: Hans Zhang <18255117159@163.com>
---
.../pci/controller/cadence/pcie-cadence-debugfs.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/pci/controller/cadence/pcie-cadence-debugfs.c b/drivers/pci/controller/cadence/pcie-cadence-debugfs.c
index 0a308f95e9f6..7b8354052aea 100644
--- a/drivers/pci/controller/cadence/pcie-cadence-debugfs.c
+++ b/drivers/pci/controller/cadence/pcie-cadence-debugfs.c
@@ -210,24 +210,21 @@ static const char *cdns_pcie_hpa_ltssm_status_string(enum cdns_pcie_hpa_ltssm lt
static int ltssm_status_show(struct seq_file *s, void *v)
{
struct cdns_pcie *pci = s->private;
- enum cdns_pcie_lga_ltssm lga_ltssm;
- enum cdns_pcie_hpa_ltssm hpa_ltssm;
const char *str_ltssm;
- u32 val;
+ u32 val, ltssm_val;
if (pci->is_hpa) {
val = cdns_pcie_hpa_readl(pci, REG_BANK_IP_REG,
CDNS_PCIE_HPA_PHY_DBG_STS_REG0);
- hpa_ltssm = FIELD_GET(CDNS_PCIE_HPA_LTSSM_STATUS_MASK, val);
- str_ltssm = cdns_pcie_hpa_ltssm_status_string(hpa_ltssm);
+ ltssm_val = FIELD_GET(CDNS_PCIE_HPA_LTSSM_STATUS_MASK, val);
+ str_ltssm = cdns_pcie_hpa_ltssm_status_string(ltssm_val);
} else {
val = cdns_pcie_readl(pci, CDNS_PCIE_LM_BASE);
- lga_ltssm = FIELD_GET(CDNS_PCIE_LGA_LTSSM_STATUS_MASK, val);
- str_ltssm = cdns_pcie_lga_ltssm_status_string(lga_ltssm);
+ ltssm_val = FIELD_GET(CDNS_PCIE_LGA_LTSSM_STATUS_MASK, val);
+ str_ltssm = cdns_pcie_lga_ltssm_status_string(ltssm_val);
}
- seq_printf(s, "%s (0x%02x)\n", str_ltssm,
- pci->is_hpa ? hpa_ltssm : lga_ltssm);
+ seq_printf(s, "%s (0x%02x)\n", str_ltssm, ltssm_val);
return 0;
}
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs
2026-08-20 23:23 [PATCH] PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs Hans Zhang
@ 2026-08-20 23:41 ` sashiko-bot
2026-08-21 10:25 ` Aksh Garg
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-08-20 23:41 UTC (permalink / raw)
To: Hans Zhang; +Cc: linux-pci
> Fix Clang -Wenum-compare-conditional warning by using a single u32
> variable to hold the LTSSM status value, replacing two separate enum
> variables of different types.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202608201933.w2579mwx-lkp@intel.com/
> Fixes: d70e964dc099 ("PCI: cadence: Add LGA IP debugfs for LTSSM status")
> Signed-off-by: Hans Zhang <18255117159@163.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260820232305.80596-1-18255117159@163.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs
2026-08-20 23:23 [PATCH] PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs Hans Zhang
2026-08-20 23:41 ` sashiko-bot
@ 2026-08-21 10:25 ` Aksh Garg
1 sibling, 0 replies; 3+ messages in thread
From: Aksh Garg @ 2026-08-21 10:25 UTC (permalink / raw)
To: Hans Zhang, bhelgaas, lpieralisi, kwilczynski, mani
Cc: robh, mpillai, s-vadapalli, linux-pci, linux-kernel,
kernel test robot
On 21/08/26 04:53, Hans Zhang wrote:
> Fix Clang -Wenum-compare-conditional warning by using a single u32
> variable to hold the LTSSM status value, replacing two separate enum
> variables of different types.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202608201933.w2579mwx-lkp@intel.com/
> Fixes: d70e964dc099 ("PCI: cadence: Add LGA IP debugfs for LTSSM status")
> Signed-off-by: Hans Zhang <18255117159@163.com>
Reviewed-by: Aksh Garg <a-garg7@ti.com>
Regards,
Aksh Garg
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-21 10:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 23:23 [PATCH] PCI: cadence: Fix enum type mismatch warning in LTSSM debugfs Hans Zhang
2026-08-20 23:41 ` sashiko-bot
2026-08-21 10:25 ` Aksh Garg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox