mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
parent
e0701bd0e6
commit
ec302b118a
@ -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;
|
||||
|
@ -637,6 +637,7 @@
|
||||
#define PCI_EXP_RTCAP 0x1e /* Root Capabilities */
|
||||
#define PCI_EXP_RTCAP_CRSVIS 0x0001 /* CRS Software Visibility capability */
|
||||
#define PCI_EXP_RTSTA 0x20 /* Root Status */
|
||||
#define PCI_EXP_RTSTA_PME_RQ_ID 0x0000ffff /* PME Requester ID */
|
||||
#define PCI_EXP_RTSTA_PME 0x00010000 /* PME status */
|
||||
#define PCI_EXP_RTSTA_PENDING 0x00020000 /* PME pending */
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user