[PATCH v2 2/2] ocxl: use pci_find_next_dvsec_capability() to simplify the code

2023-08-07 Thread Xiongfeng Wang
PCI core add pci_find_next_dvsec_capability() to query the next DVSEC. We can use that core API to simplify the code. Also remove the unused macros. Signed-off-by: Xiongfeng Wang Reviewed-by: Andrew Donnellan --- arch/powerpc/platforms/powernv/ocxl.c | 20 ++-- drivers/misc

[PATCH v2 1/2] PCI: Add pci_find_next_dvsec_capability to find next Designated VSEC

2023-08-07 Thread Xiongfeng Wang
Some devices may have several DVSEC (Designated Vendor-Specific Extended Capability) entries with the same DVSEC ID. Add pci_find_next_dvsec_capability() to find them all. Signed-off-by: Xiongfeng Wang Reviewed-by: Andrew Donnellan Acked-by: Bjorn Helgaas --- drivers/pci/pci.c | 39

[PATCH v2 0/2] Introduce pci_find_next_dvsec_capability() to simplify the code

2023-08-07 Thread Xiongfeng Wang
the first patch Xiongfeng Wang (2): PCI: Add pci_find_next_dvsec_capability to find next Designated VSEC ocxl: use pci_find_next_dvsec_capability() to simplify the code arch/powerpc/platforms/powernv/ocxl.c | 20 ++ drivers/misc/ocxl/config.c| 21 +-- driv

[PATCH 0/2] introduce pci_find_next_dvsec_capability() to simplify the code

2023-08-06 Thread Xiongfeng Wang
Some devices may have several DVSEC(Designated Vendor-Specific Extended Capability) entries with the same DVSEC ID. Introduce pci_find_next_dvsec_capability() to simplify the code. Xiongfeng Wang (2): PCI: Add pci_find_next_dvsec_capability to find next designated VSEC ocxl: use

[PATCH 1/2] PCI: Add pci_find_next_dvsec_capability to find next designated VSEC

2023-08-06 Thread Xiongfeng Wang
Some devices may have several DVSEC(Designated Vendor-Specific Extended Capability) entries with the same DVSEC ID. Add pci_find_next_dvsec_capability() to find them all. Signed-off-by: Xiongfeng Wang --- drivers/pci/pci.c | 37 + include/linux/pci.h | 2

[PATCH 2/2] ocxl: use pci_find_next_dvsec_capability() to simplify the code

2023-08-06 Thread Xiongfeng Wang
PCI core add pci_find_next_dvsec_capability() to query the next DVSEC. We can use that core API to simplify the code. Also remove the unused macros. Signed-off-by: Xiongfeng Wang --- arch/powerpc/platforms/powernv/ocxl.c | 20 ++-- drivers/misc/ocxl/config.c| 21

[RFC PATCH] cxl: Use pci_find_vsec_capability() to simplify the code

2023-08-04 Thread Xiongfeng Wang
-defined ID number that indicates the nature and format of the VSEC structure Software must qualify the Vendor ID before interpreting this field. Signed-off-by: Xiongfeng Wang --- drivers/misc/cxl/pci.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers

[PATCH] powerpc/powernv/pci: use pci_dev_id() to simplify the code

2023-08-04 Thread Xiongfeng Wang
PCI core API pci_dev_id() can be used to get the BDF number for a pci device. We don't need to compose it mannually. Use pci_dev_id() to simplify the code a little bit. Signed-off-by: Xiongfeng Wang --- arch/powerpc/platforms/powernv/pci-ioda.c | 6 +++--- 1 file changed, 3 insertions(

[PATCH] arch/powerpc/setup: Fix reference count issue in pas_setup_mce_regs()

2022-11-16 Thread Xiongfeng Wang
nt of 'dev'. Since pci_dev_put() can handle the NULL input parameter, we can just add pci_dev_put() after the loop. Also add pci_dev_put() for another two pci_get_device(). Fixes: cd7834167ffb ("[POWERPC] pasemi: Print more information at machine check") Signed-off-by: Xio

[PATCH] powerpc/ps3: Move static keyword to the front of declaration

2020-04-29 Thread Xiongfeng Wang
} static vuart_bus_priv; ^ Reported-by: Hulk Robot Signed-off-by: Xiongfeng Wang --- drivers/ps3/ps3-vuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c index ddaa5ea..8e80e09 100644 --- a/drivers/ps3/ps3-vuart.c +++