pci: rockchip: Mark inline functions as static inline
Subsystems (2)
PATCH 1/1 pci: rockchip: Mark inline functions as static inline
Unless we mark the function as 'static inline' it may end up being non-inlined by the compiled and result in duplicate functions.
Cc Jagan Teki <[email protected]>
Cc Kever Yang <[email protected]>
Signed-off-by Tom Rini <[email protected]>
--- drivers/pci/pcie_rockchip.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/pci/pcie_rockchip.h +2 -3
@@ -130,13 +130,12 @@ struct rockchip_pcie {int rockchip_pcie_phy_get (struct udevice *dev); -inline struct rockchip_pcie_phy *pcie_get_phy (struct rockchip_pcie *pcie) +static inline struct rockchip_pcie_phy *pcie_get_phy (struct rockchip_pcie *pcie) {return pcie->phy; } -inline -struct rockchip_pcie_phy_ops *phy_get_ops (struct rockchip_pcie_phy *phy) +static inline struct rockchip_pcie_phy_ops *phy_get_ops (struct rockchip_pcie_phy *phy) {return (struct rockchip_pcie_phy_ops *)phy->ops; }
Signature · 1 line
2.17.1
PATCH 1/1 pci: rockchip: Mark inline functions as static inline
Quoted 9 lines · Tom Rini
Unless we mark the function as 'static inline' it may end up being non-inlined by the compiled and result in duplicate functions.
Cc Jagan Teki <[email protected]>Cc Kever Yang <[email protected]>Signed-off-by Tom Rini <[email protected]>
Reviewed-by Philipp Tomsich <[email protected]>
Re: [PATCH] pci: rockchip: Mark inline functions as static inline【请注意,邮件由[email protected]代发】
In reply to Tom RiniQuoted 6 lines · Tom Rini
Unless we mark the function as 'static inline' it may end up being non-inlined by the compiled and result in duplicate functions.
Cc Jagan Teki <[email protected]>Cc Kever Yang <[email protected]>Signed-off-by Tom Rini <[email protected]>
Reviewed-by Kever Yang<[email protected]>
Thanks,
- Kever
Quoted 24 lines
--- drivers/pci/pcie_rockchip.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/pci/pcie_rockchip.h +2
-3@@ -130,13 +130,12 @@ struct rockchip_pcie {int rockchip_pcie_phy_get (struct udevice *dev); -inline struct rockchip_pcie_phy *pcie_get_phy (struct rockchip_pcie *pcie) +static inline struct rockchip_pcie_phy *pcie_get_phy (struct rockchip_pcie *pcie) {return pcie->phy; } -inline -struct rockchip_pcie_phy_ops *phy_get_ops (struct rockchip_pcie_phy *phy) +static inline struct rockchip_pcie_phy_ops *phy_get_ops (struct rockchip_pcie_phy *phy) {return (struct rockchip_pcie_phy_ops *)phy->ops; }