]> www.infradead.org Git - users/jedix/linux-maple.git/commit
PCI: dw-rockchip: Use rockchip_pcie_link_up() to check link up instead of open coding
authorHans Zhang <18255117159@163.com>
Sun, 27 Apr 2025 12:53:16 +0000 (20:53 +0800)
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Sun, 27 Apr 2025 14:12:50 +0000 (19:42 +0530)
commit5e5a3bf48eed8d90bc5c5b710466f24663231f0a
treed29b8556387ca65136bbc20eb7386d503200da7f
parentae8ed2b091ee8bd92da365d3332eebf159de8e0f
PCI: dw-rockchip: Use rockchip_pcie_link_up() to check link up instead of open coding

Some of the callers of rockchip_pcie_link_up() are open coding the
rockchip_pcie_link_up() function, leading to code duplication. So switch
them to use rockchip_pcie_link_up() function.

Also, use the FIELD_GET() macro to simplify the link up check in
rockchip_pcie_link_up().

Signed-off-by: Hans Zhang <18255117159@163.com>
[mani: subject and description rewording]
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://patch.msgid.link/20250427125316.99627-4-18255117159@163.com
drivers/pci/controller/dwc/pcie-dw-rockchip.c