]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
EDAC/ie31200: Convert to common field_get() helper
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 6 Nov 2025 13:34:04 +0000 (14:34 +0100)
committerYury Norov (NVIDIA) <yury.norov@gmail.com>
Mon, 24 Nov 2025 19:15:47 +0000 (14:15 -0500)
Drop the driver-specific field_get() macro, in favor of the globally
available variant from <linux/bitfield.h>.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/edac/ie31200_edac.c

index 72290f430126c631b45c65d95d25ed66fdc45af8..dfc9a9cecd74207dff2da823d2f42e6a475522bc 100644 (file)
@@ -44,6 +44,7 @@
  * but lo_hi_readq() ensures that we are safe across all e3-1200 processors.
  */
 
+#include <linux/bitfield.h>
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/pci.h>
 #define IE31200_CAPID0_DDPCD           BIT(6)
 #define IE31200_CAPID0_ECC             BIT(1)
 
-/* Non-constant mask variant of FIELD_GET() */
-#undef field_get
-#define field_get(_mask, _reg)  (((_reg) & (_mask)) >> (ffs(_mask) - 1))
-
 static int nr_channels;
 static struct pci_dev *mci_pdev;
 static int ie31200_registered = 1;