From: Qiuxu Zhuo Date: Mon, 10 Mar 2025 01:14:04 +0000 (+0800) Subject: EDAC/ie31200: Fix the 3rd parameter name of *populate_dimm_info() X-Git-Tag: v6.15-rc1~198^2^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=44eae52089ebcb6b22c63a2506bc610bb70fa927;p=thirdparty%2Fkernel%2Flinux.git EDAC/ie31200: Fix the 3rd parameter name of *populate_dimm_info() 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 Signed-off-by: Tony Luck Tested-by: Gary Wang Link: https://lore.kernel.org/r/20250310011411.31685-5-qiuxu.zhuo@intel.com --- diff --git a/drivers/edac/ie31200_edac.c b/drivers/edac/ie31200_edac.c index a8dd55ec52cea..35f4e8e46ca20 100644 --- a/drivers/edac/ie31200_edac.c +++ b/drivers/edac/ie31200_edac.c @@ -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); }