qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] hw/arm/smmu-common: Avoid using inlined functions wit


From: Richard Henderson
Subject: Re: [PATCH v2 2/2] hw/arm/smmu-common: Avoid using inlined functions with external linkage
Date: Fri, 16 Dec 2022 15:55:48 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 12/16/22 13:49, Philippe Mathieu-Daudé wrote:
When using Clang ("Apple clang version 14.0.0 (clang-1400.0.29.202)")
and building with -Wall we get:

   hw/arm/smmu-common.c:173:33: warning: static function 
'smmu_hash_remove_by_asid_iova' is used in an inline function with external 
linkage [-Wstatic-in-inline]
   hw/arm/smmu-common.h:170:1: note: use 'static' to give inline function 
'smmu_iotlb_inv_iova' internal linkage
     void smmu_iotlb_inv_iova(SMMUState *s, int asid, dma_addr_t iova,
     ^
     static

None of our code base require / use inlined functions with external
linkage. Some places use internal inlining in the hot path. These
two functions are certainly not in any hot path and don't justify
any inlining, so these are likely oversights rather than intentional.

Reported-by: Stefan Weil<sw@weilnetz.de>
Reviewed-by: Peter Maydell<peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
---
  hw/arm/smmu-common.c | 13 ++++++-------
  1 file changed, 6 insertions(+), 7 deletions(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]