]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
EDAC/ie31200: Fix the 3rd parameter name of *populate_dimm_info()
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Mon, 10 Mar 2025 01:14:04 +0000 (09:14 +0800)
committerTony Luck <tony.luck@intel.com>
Mon, 10 Mar 2025 17:44:12 +0000 (10:44 -0700)
The 3rd parameter of *populate_dimm_info() pertains to the DIMM index
within a channel, not the channel index. Fix the parameter name to dimm
to reflect its actual purpose.

No functional changes intended.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Tested-by: Gary Wang <gary.c.wang@intel.com>
Link: https://lore.kernel.org/r/20250310011411.31685-5-qiuxu.zhuo@intel.com
drivers/edac/ie31200_edac.c

index a8dd55ec52cea19478a73cd2fa11a4b5d63d1d6d..35f4e8e46ca208a21267f98668f4eea8924f0f6d 100644 (file)
@@ -377,29 +377,29 @@ static void __iomem *ie31200_map_mchbar(struct pci_dev *pdev)
 }
 
 static void __skl_populate_dimm_info(struct dimm_data *dd, u32 addr_decode,
-                                    int chan)
+                                    int dimm)
 {
-       dd->size = (addr_decode >> (chan << 4)) & IE31200_MAD_DIMM_SIZE_SKL;
-       dd->dual_rank = (addr_decode & (IE31200_MAD_DIMM_A_RANK_SKL << (chan << 4))) ? 1 : 0;
-       dd->x16_width = ((addr_decode & (IE31200_MAD_DIMM_A_WIDTH_SKL << (chan << 4))) >>
-                               (IE31200_MAD_DIMM_A_WIDTH_SKL_SHIFT + (chan << 4)));
+       dd->size = (addr_decode >> (dimm << 4)) & IE31200_MAD_DIMM_SIZE_SKL;
+       dd->dual_rank = (addr_decode & (IE31200_MAD_DIMM_A_RANK_SKL << (dimm << 4))) ? 1 : 0;
+       dd->x16_width = ((addr_decode & (IE31200_MAD_DIMM_A_WIDTH_SKL << (dimm << 4))) >>
+                               (IE31200_MAD_DIMM_A_WIDTH_SKL_SHIFT + (dimm << 4)));
 }
 
 static void __populate_dimm_info(struct dimm_data *dd, u32 addr_decode,
-                                int chan)
+                                int dimm)
 {
-       dd->size = (addr_decode >> (chan << 3)) & IE31200_MAD_DIMM_SIZE;
-       dd->dual_rank = (addr_decode & (IE31200_MAD_DIMM_A_RANK << chan)) ? 1 : 0;
-       dd->x16_width = (addr_decode & (IE31200_MAD_DIMM_A_WIDTH << chan)) ? 1 : 0;
+       dd->size = (addr_decode >> (dimm << 3)) & IE31200_MAD_DIMM_SIZE;
+       dd->dual_rank = (addr_decode & (IE31200_MAD_DIMM_A_RANK << dimm)) ? 1 : 0;
+       dd->x16_width = (addr_decode & (IE31200_MAD_DIMM_A_WIDTH << dimm)) ? 1 : 0;
 }
 
-static void populate_dimm_info(struct dimm_data *dd, u32 addr_decode, int chan,
+static void populate_dimm_info(struct dimm_data *dd, u32 addr_decode, int dimm,
                               bool skl)
 {
        if (skl)
-               __skl_populate_dimm_info(dd, addr_decode, chan);
+               __skl_populate_dimm_info(dd, addr_decode, dimm);
        else
-               __populate_dimm_info(dd, addr_decode, chan);
+               __populate_dimm_info(dd, addr_decode, dimm);
 }