[5/5] irqchip: gicv3: add a iort_pmsi_get_dev_id() prototype

Message ID 20230516200516.554663-5-arnd@kernel.org
State New
Headers
Series [1/5] irqchip: ftintc010: mark all function static |

Commit Message

Arnd Bergmann May 16, 2023, 8:05 p.m. UTC
  From: Arnd Bergmann <arnd@arndb.de>

iort_pmsi_get_dev_id() has a __weak definition in the driver, and
an override in arm64 specific code, but the declaration is conditional
and not always seen when the copy in the driver gets built:

drivers/irqchip/irq-gic-v3-its-platform-msi.c:41:12: error: no previous prototype for 'iort_pmsi_get_dev_id' [-Werror=missing-prototypes]

Move the existing declaration out of the #ifdef block to ensure
it can be seen in all configurations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 include/linux/acpi_iort.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
  

Comments

Hanjun Guo May 18, 2023, 1:19 p.m. UTC | #1
On 2023/5/17 4:05, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> iort_pmsi_get_dev_id() has a __weak definition in the driver, and
> an override in arm64 specific code, but the declaration is conditional
> and not always seen when the copy in the driver gets built:
> 
> drivers/irqchip/irq-gic-v3-its-platform-msi.c:41:12: error: no previous prototype for 'iort_pmsi_get_dev_id' [-Werror=missing-prototypes]
> 
> Move the existing declaration out of the #ifdef block to ensure
> it can be seen in all configurations.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   include/linux/acpi_iort.h | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h
> index b43be0987b19..6b70d02bc5f9 100644
> --- a/include/linux/acpi_iort.h
> +++ b/include/linux/acpi_iort.h
> @@ -26,13 +26,14 @@ int iort_register_domain_token(int trans_id, phys_addr_t base,
>   			       struct fwnode_handle *fw_node);
>   void iort_deregister_domain_token(int trans_id);
>   struct fwnode_handle *iort_find_domain_token(int trans_id);
> +int iort_pmsi_get_dev_id(struct device *dev, u32 *dev_id);
> +
>   #ifdef CONFIG_ACPI_IORT
>   void acpi_iort_init(void);
>   u32 iort_msi_map_id(struct device *dev, u32 id);
>   struct irq_domain *iort_get_device_domain(struct device *dev, u32 id,
>   					  enum irq_domain_bus_token bus_token);
>   void acpi_configure_pmsi_domain(struct device *dev);
> -int iort_pmsi_get_dev_id(struct device *dev, u32 *dev_id);
>   void iort_get_rmr_sids(struct fwnode_handle *iommu_fwnode,
>   		       struct list_head *head);
>   void iort_put_rmr_sids(struct fwnode_handle *iommu_fwnode,

Reviewed-by: Hanjun Guo <guohanjun@huawei.com>

Thanks
Hanjun
  

Patch

diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h
index b43be0987b19..6b70d02bc5f9 100644
--- a/include/linux/acpi_iort.h
+++ b/include/linux/acpi_iort.h
@@ -26,13 +26,14 @@  int iort_register_domain_token(int trans_id, phys_addr_t base,
 			       struct fwnode_handle *fw_node);
 void iort_deregister_domain_token(int trans_id);
 struct fwnode_handle *iort_find_domain_token(int trans_id);
+int iort_pmsi_get_dev_id(struct device *dev, u32 *dev_id);
+
 #ifdef CONFIG_ACPI_IORT
 void acpi_iort_init(void);
 u32 iort_msi_map_id(struct device *dev, u32 id);
 struct irq_domain *iort_get_device_domain(struct device *dev, u32 id,
 					  enum irq_domain_bus_token bus_token);
 void acpi_configure_pmsi_domain(struct device *dev);
-int iort_pmsi_get_dev_id(struct device *dev, u32 *dev_id);
 void iort_get_rmr_sids(struct fwnode_handle *iommu_fwnode,
 		       struct list_head *head);
 void iort_put_rmr_sids(struct fwnode_handle *iommu_fwnode,