diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2023-10-10 23:44:33 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2023-10-25 00:55:45 +0300 |
commit | ec302b118a59785511d6f90592a8be097d67341c (patch) | |
tree | 103326d2d55f1a8a2d48f252b73930d78a02f184 /drivers/pci | |
parent | e0701bd0e6669e4c4b0d11254f5948ebf8d0b732 (diff) | |
download | linux-ec302b118a59785511d6f90592a8be097d67341c.tar.xz |
PCI/PME: Use FIELD_GET()
Use FIELD_GET() to remove dependences on the field position, i.e., the
shift value. No functional change intended.
Link: https://lore.kernel.org/r/20231010204436.1000644-8-helgaas@kernel.org
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pcie/pme.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/pci/pcie/pme.c b/drivers/pci/pcie/pme.c index ef8ce436ead9..a2daebd9806c 100644 --- a/drivers/pci/pcie/pme.c +++ b/drivers/pci/pcie/pme.c @@ -9,6 +9,7 @@ #define dev_fmt(fmt) "PME: " fmt +#include <linux/bitfield.h> #include <linux/pci.h> #include <linux/kernel.h> #include <linux/errno.h> @@ -235,7 +236,8 @@ static void pcie_pme_work_fn(struct work_struct *work) pcie_clear_root_pme_status(port); spin_unlock_irq(&data->lock); - pcie_pme_handle_request(port, rtsta & 0xffff); + pcie_pme_handle_request(port, + FIELD_GET(PCI_EXP_RTSTA_PME_RQ_ID, rtsta)); spin_lock_irq(&data->lock); continue; |