]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
EDAC/ie31200: Fix the size of EDAC_MC_LAYER_CHIP_SELECT layer
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Mon, 10 Mar 2025 01:14:01 +0000 (09:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Apr 2025 12:30:55 +0000 (14:30 +0200)
[ Upstream commit d59d844e319d97682c8de29b88d2d60922a683b3 ]

The EDAC_MC_LAYER_CHIP_SELECT layer pertains to the rank, not the DIMM.
Fix its size to reflect the number of ranks instead of the number of DIMMs.
Also delete the unused macros IE31200_{DIMMS,RANKS}.

Fixes: 7ee40b897d18 ("ie31200_edac: Introduce the driver")
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-2-qiuxu.zhuo@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/edac/ie31200_edac.c

index c47963240b6596bf4b189a4a8a7b9b7126788f91..662a79dda74eb9d80a98bfa8c778726823dfa2b0 100644 (file)
@@ -83,8 +83,6 @@
         (((did) & PCI_DEVICE_ID_INTEL_IE31200_HB_CFL_MASK) ==                 \
          PCI_DEVICE_ID_INTEL_IE31200_HB_CFL_MASK))
 
-#define IE31200_DIMMS                  4
-#define IE31200_RANKS                  8
 #define IE31200_RANKS_PER_CHANNEL      4
 #define IE31200_DIMMS_PER_CHANNEL      2
 #define IE31200_CHANNELS               2
@@ -419,7 +417,7 @@ static int ie31200_probe1(struct pci_dev *pdev, int dev_idx)
 
        nr_channels = how_many_channels(pdev);
        layers[0].type = EDAC_MC_LAYER_CHIP_SELECT;
-       layers[0].size = IE31200_DIMMS;
+       layers[0].size = IE31200_RANKS_PER_CHANNEL;
        layers[0].is_virt_csrow = true;
        layers[1].type = EDAC_MC_LAYER_CHANNEL;
        layers[1].size = nr_channels;