From patchwork Tue Mar 26 17:10:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1916293 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=r8yu3ykL; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V3xC25qjjz1yWr for ; Wed, 27 Mar 2024 04:10:38 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpAJj-0006UU-6e; Tue, 26 Mar 2024 13:10:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpAJa-0006Se-93 for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:25 -0400 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpAJX-0006bW-U4 for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:21 -0400 Received: by mail-wr1-x433.google.com with SMTP id ffacd0b85a97d-33e285a33bdso3440352f8f.2 for ; Tue, 26 Mar 2024 10:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711473018; x=1712077818; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3Dxp+qC3MBDCoPwn4MSHcBmknQiyHJfiE1PD2um5P9g=; b=r8yu3ykLKsUeLgfq/85DfKFIl1u2iENkHwENpeHonz3EBlRXoIBNzRzIAq4olDzjkt RSg7cZj8JeBbgbsTr/EFocih03+ycsbo56cxmz+slF8boylnLHrEXOwFukcFHUfwXF6k NtKBo+gFv8TXlHxKPERo8Ewd86xX6a5+S/tDgfsOZu+oshpIBaoL982Rru1HAdAfb4Ek EqVTAxgYVfJ2qDLmcYr8xQ2dRSRrHTH7FyiVyhErOh1SmQ2iMUQGZC3fTrv+tKFx9EKI 9kJuN9g1LdXKGDio2iurySSqfzeWqty+5kcWtNR5rdrIuJ9E18Yi0unXx5A+BGtGVUwP YlKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711473018; x=1712077818; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3Dxp+qC3MBDCoPwn4MSHcBmknQiyHJfiE1PD2um5P9g=; b=gjRhq3xWnltoj6Oa6q5SMLicrMuMqG2TXA+M1tceememniqxrQ9NRgqqeiym1REhKT DCrJs/VA6khDWoNurL7N6hEfA41icKAFAdg0LX5UEML8q81I+r9gDlQ7yeGX7RV8+6L7 E6QvZrfEeonUY+KS4t0djkm7zHILzcl6Hnpd0UXY9Wn2iJNtUy+ccCLE3WJykfr6cWU2 3g0iISMioOdSFfNMUYF5PIx6iqKDYj0thtR8/ZPvwm4bilyKNkrC3kd15LtIsYoJnkms 3yONSfs7X1z4OcVT7/3r37+hf9ygC60LBnvlNKdNXWgrGKl86e3nc4IebnwMvSGvPIGs WPWg== X-Gm-Message-State: AOJu0YwSxiSA6LrxySp1Fz+12AUBxXjm6JMP8swI7n96Max5MDYnCU2A Uu7+gQLAwu3ecyZlmzj/qwmGJqgeY3VU+qy/cGfrC3muY3J20cFWJfjq58izhlhiUZ1b3UBbUuj + X-Google-Smtp-Source: AGHT+IFf/w3junysBDCoHdj2OjDwBCX72iNg/46FAVI95FKGBQE4eTxVBisciOtaN4WSEXMnGPhXOg== X-Received: by 2002:a5d:5707:0:b0:33e:be35:d449 with SMTP id a7-20020a5d5707000000b0033ebe35d449mr1414220wrv.44.1711473017883; Tue, 26 Mar 2024 10:10:17 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.229]) by smtp.gmail.com with ESMTPSA id x17-20020adfffd1000000b00341babb8af0sm11331005wrs.7.2024.03.26.10.10.16 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 26 Mar 2024 10:10:17 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Eric Auger , qemu-arm@nongnu.org Subject: [PATCH-for-9.0? v2 1/4] hw/arm/smmu: Avoid using inlined functions with external linkage again Date: Tue, 26 Mar 2024 18:10:06 +0100 Message-ID: <20240326171009.26696-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240326171009.26696-1-philmd@linaro.org> References: <20240326171009.26696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=philmd@linaro.org; helo=mail-wr1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Similarly to commit 9de9fa5cf2 ("hw/arm/smmu-common: Avoid using inlined functions with external linkage"): 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. Fix: C compiler for the host machine: clang (clang 15.0.0 "Apple clang version 15.0.0 (clang-1500.3.9.4)") ... hw/arm/smmu-common.c:203:43: error: static function 'smmu_hash_remove_by_vmid' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline] g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid); ^ include/hw/arm/smmu-common.h:197:1: note: use 'static' to give inline function 'smmu_iotlb_inv_vmid' internal linkage void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid); ^ static hw/arm/smmu-common.c:139:17: note: 'smmu_hash_remove_by_vmid' declared here static gboolean smmu_hash_remove_by_vmid(gpointer key, gpointer value, ^ Fixes: ccc3ee3871 ("hw/arm/smmuv3: Add CMDs related to stage-2") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240313184954.42513-2-philmd@linaro.org> Reviewed-by: Eric Auger --- hw/arm/smmu-common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 4caedb4998..c4b540656c 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c @@ -197,7 +197,7 @@ void smmu_iotlb_inv_asid(SMMUState *s, uint16_t asid) g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_asid, &asid); } -inline void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid) +void smmu_iotlb_inv_vmid(SMMUState *s, uint16_t vmid) { trace_smmu_iotlb_inv_vmid(vmid); g_hash_table_foreach_remove(s->iotlb, smmu_hash_remove_by_vmid, &vmid); From patchwork Tue Mar 26 17:10:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1916294 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=cZ3suTNG; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V3xCH6TFHz1yWr for ; Wed, 27 Mar 2024 04:10:51 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpAJo-0006cv-UF; Tue, 26 Mar 2024 13:10:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpAJi-0006U1-26 for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:31 -0400 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpAJe-0006iZ-Lj for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:29 -0400 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-41490d249e9so3046745e9.3 for ; Tue, 26 Mar 2024 10:10:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711473024; x=1712077824; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vawk+LSw2Z6p/aOFRJRkJdEE2smC/bsXUmQB9oTHxK0=; b=cZ3suTNG9e/h4HoVLg7oXoqbqoVtdifjmQheYnfWk8KeEH/tTMDeZONo+mqAeoZR3q EHFhV6+6X1ZiftsjVhT8MIR2qmqnMFKGWlLY9jI4iEBO2t48TSXen+qMgJ0NdV6KLSoj xlRT8gbTx0Af09aIJr7Fb74RYhuRtB3UNwtFMqZxJVkuqSzQKGxruJ+EJXIA5Tnz7BdP 32WhBqlH3ORD0b1SbrscdZbkb8SV7kSD3zmynM/tCRth8NO2e3aI/jaGcA0n1c6xakdX tnEKKaXqaqPA9vHjmAbldbqHFf+9f5HLCADPIVHftptRRJMaSNL3O64toYSYNZ/jSing gY5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711473024; x=1712077824; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vawk+LSw2Z6p/aOFRJRkJdEE2smC/bsXUmQB9oTHxK0=; b=vr/5IbD9I6GggUv7kXs7uq5ak4ieJyulPkKqnWlwiUc7+EkwMaLfe1w+B/56PyRAkq vpWufFB3I+VJ63SFGT7gNOBCWJxnZXvwlZKXwE6q8eAVIXiPNTgmvtirN4CtmOkF9/5M 9cKQAIQsJzV0kFPLZmEX8w5tHnmaSCjPBe6U28wxzpmM8zOJ460fF54cYP58TIC3JsOA VWSIDZcarGxvuUMFSETfnwmIqTeA/uc7hkSPNu+M9Gqlzy1oNPBqKQ48yMduDuRrjqYW YNxmRi5GgPbyjbmWcbePuJsHiRhIIVzIm1uILUqIq831Cm4M6hiPNxqMez5u5ICjmBq/ dliw== X-Gm-Message-State: AOJu0YxDHJ4KyNPF9oQH1dEV9Sf+WiPkNmBm8Lp4z1iHK4O8PYoAhmnN 7Pgizo+GzWXikipnvxDJntkSlwZsFv4Hwbjvco62lhmX9iE0f43Qb3vjyMo2hoiiiSvbiVi4pdE f X-Google-Smtp-Source: AGHT+IGM/rMpQ8tvjUcLuc7wpxw0PrWjMo0YvGkvTuhTiRhPD7BhQAD153EBkA0Kksvi8xG2p4vRog== X-Received: by 2002:a05:600c:3ca7:b0:414:d95:cc47 with SMTP id bg39-20020a05600c3ca700b004140d95cc47mr8419635wmb.30.1711473024252; Tue, 26 Mar 2024 10:10:24 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.229]) by smtp.gmail.com with ESMTPSA id j6-20020a05600c190600b0041480a98bb3sm11430536wmq.15.2024.03.26.10.10.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 26 Mar 2024 10:10:23 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Alexander Graf , Cameron Esfahani , Roman Bolshakov , qemu-arm@nongnu.org Subject: [PATCH-for-9.0? v2 2/4] accel/hvf: Un-inline hvf_arch_supports_guest_debug() Date: Tue, 26 Mar 2024 18:10:07 +0100 Message-ID: <20240326171009.26696-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240326171009.26696-1-philmd@linaro.org> References: <20240326171009.26696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philmd@linaro.org; helo=mail-wm1-x32c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org See previous commit and commit 9de9fa5cf2 ("Avoid using inlined functions with external linkage") for rationale. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Message-Id: <20240313184954.42513-3-philmd@linaro.org> --- target/arm/hvf/hvf.c | 2 +- target/i386/hvf/hvf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c index e5f0f60093..65a5601804 100644 --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -2246,7 +2246,7 @@ void hvf_arch_update_guest_debug(CPUState *cpu) hvf_arch_set_traps(); } -inline bool hvf_arch_supports_guest_debug(void) +bool hvf_arch_supports_guest_debug(void) { return true; } diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c index 11ffdd4c69..1ed8ed5154 100644 --- a/target/i386/hvf/hvf.c +++ b/target/i386/hvf/hvf.c @@ -708,7 +708,7 @@ void hvf_arch_update_guest_debug(CPUState *cpu) { } -inline bool hvf_arch_supports_guest_debug(void) +bool hvf_arch_supports_guest_debug(void) { return false; } From patchwork Tue Mar 26 17:10:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1916296 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=aKwL39Vu; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V3xDH2VjQz1yWr for ; Wed, 27 Mar 2024 04:11:43 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpAJq-0006ht-4D; Tue, 26 Mar 2024 13:10:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpAJl-0006Yh-Ce for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:33 -0400 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpAJj-0006qF-MF for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:33 -0400 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-414881d8956so15784815e9.3 for ; Tue, 26 Mar 2024 10:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711473030; x=1712077830; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=V2oLQ/SaKcXAucHYLsLudqRjXTfLkOPUS+8DcR0nQ8I=; b=aKwL39VuK/lKWdtHDanNeiZSwUU+k28ApDaSTX/VxrodcYo4GGFGnCdWt1vJ18wHAo nKGuseQV3LrSrqwCEn7imnktPWkWO2lBbM35tokyaoBkSENmgVWBiE5UI4nvf0wIlmnD EMuQiGgG4PhFE3MbIjiNxjt+r5TAsGHJYTZ0nKvf7naU+c7UC2Tv/VjeATba7CbKfANb dp0g282Q+OB1/TdD1f5Lb0gN7EIe11NCIcTbAEgN2a4wJNVo2fn30XBvAsh/jmHcl2RC wmzbeizkEEX7Tp5++WtaRp8E69v8y3DEJyy0zwn2bPJF2v78xUHz5L1b5QeVhfwphJ3L tuHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711473030; x=1712077830; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V2oLQ/SaKcXAucHYLsLudqRjXTfLkOPUS+8DcR0nQ8I=; b=iCubTwbFNfgI6C4yPOJe3fEXTJsMjpKM+1FJLaRVxs5IOS8kYm9b4M6bxdU3ayv80S 6L1LRak80B/jVOM5KUBAZQoR/45RAl8MJteOPoY8A/pkBFexKX9e4t62wpyD1aCVc83b PFp0jW/+x8owPivTadqJC0mbEML1bmndxgLtfCnR6uhfgOPQzDZCasq5lXXWjoYCJaxO a1pT1WcsfPW5CJxWF4dc4VB4BlaG2CEp0OTxO5uoJErfwtBsSs6lJcFP94X6owa9Nfp6 fwSZyOOM9zOFTECnXpVPHf92di2/Ur9m8aeM0Vl9KJXtvzrnofILTDkw4r71iA5E7y+e FJOw== X-Gm-Message-State: AOJu0YxKOqr7ymQbsL+thTMGbXgGdk+BjLZ+NGFH+v0TXEMHMnLB2MvM NjDxLtSrRAD6V7QeF3cbm3Fp9c+LZr2NtE/IoYFsgpU48rL+KDVek2UHKYkYbH+Vh5dYZmlavKp m X-Google-Smtp-Source: AGHT+IF3ADdpZuy3CFIHV3+8mxAlRKHCdWD1MAh7X5t/yDtozxNS1yNtNEwfVatjfiXHAnSZrSOhYg== X-Received: by 2002:a05:600c:4f4d:b0:414:dae:218f with SMTP id m13-20020a05600c4f4d00b004140dae218fmr1187214wmq.35.1711473029965; Tue, 26 Mar 2024 10:10:29 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.229]) by smtp.gmail.com with ESMTPSA id l9-20020a05600c4f0900b00414895d014fsm7341794wmq.41.2024.03.26.10.10.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 26 Mar 2024 10:10:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , John Snow , Laurent Vivier , Paolo Bonzini , qemu-block@nongnu.org Subject: [PATCH-for-9.0? v2 3/4] qtest/libqos: Reduce size_to_prdtl() declaration scope Date: Tue, 26 Mar 2024 18:10:08 +0100 Message-ID: <20240326171009.26696-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240326171009.26696-1-philmd@linaro.org> References: <20240326171009.26696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Since size_to_prdtl() is only used within ahci.c, declare it statically. This removes the last use of "inlined function with external linkage". See previous commit and commit 9de9fa5cf2 for rationale. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Reviewed-by: Thomas Huth --- tests/qtest/libqos/ahci.h | 1 - tests/qtest/libqos/ahci.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/qtest/libqos/ahci.h b/tests/qtest/libqos/ahci.h index 48017864bf..a0487a1557 100644 --- a/tests/qtest/libqos/ahci.h +++ b/tests/qtest/libqos/ahci.h @@ -599,7 +599,6 @@ void ahci_port_check_cmd_sanity(AHCIQState *ahci, AHCICommand *cmd); /* Misc */ bool is_atapi(AHCIQState *ahci, uint8_t port); -unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd); /* Command: Macro level execution */ void ahci_guest_io(AHCIQState *ahci, uint8_t port, uint8_t ide_cmd, diff --git a/tests/qtest/libqos/ahci.c b/tests/qtest/libqos/ahci.c index a2c94c6e06..6d59c7551a 100644 --- a/tests/qtest/libqos/ahci.c +++ b/tests/qtest/libqos/ahci.c @@ -662,7 +662,7 @@ unsigned ahci_pick_cmd(AHCIQState *ahci, uint8_t port) g_assert_not_reached(); } -inline unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd) +static unsigned size_to_prdtl(unsigned bytes, unsigned bytes_per_prd) { /* Each PRD can describe up to 4MiB */ g_assert_cmphex(bytes_per_prd, <=, 4096 * 1024); From patchwork Tue Mar 26 17:10:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1916295 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=PmhqRV9i; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4V3xCg0Ppsz1yWr for ; Wed, 27 Mar 2024 04:11:11 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rpAJt-0006lS-Ud; Tue, 26 Mar 2024 13:10:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rpAJq-0006je-WB for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:39 -0400 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rpAJp-0006ux-DY for qemu-devel@nongnu.org; Tue, 26 Mar 2024 13:10:38 -0400 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-41491106419so2584705e9.2 for ; Tue, 26 Mar 2024 10:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711473035; x=1712077835; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+JsRv6ixpj5OYV0Cs5MSuqaN+IRou4fELCwe6Dlois4=; b=PmhqRV9iTChQlK3CQg7W4/7rf0YeJ1uNaRVswR9WmxZrxZ9IBKAe7rsgxuql0QApFk hrDw05B2d6rlYahxibPpzYYFmsNsE+hSgm/qguLtnB6WC5XTlDCfq5B8xV8xHrf9nhmU ymop0N/gjBr1YwBqs5oi/bqHG8zaZsBtANztpgWBKd0raiiLZ9B8ZVgt1NlCHRCVPbum 0UNpxPgmrIEbTSiwdtyyAS98z0toHJo9pJgyXav28n7usQXAGxzy2jzpFyseQAaHTUf9 sVvt0s4TOAdy2b9J73bVS/KhiW9ICwO002OaddUYQwlOn9vcAQ90gYLrFx7grn0wGUsE 7vmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711473035; x=1712077835; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+JsRv6ixpj5OYV0Cs5MSuqaN+IRou4fELCwe6Dlois4=; b=YLaDnhrfL7Py4hP/HpKHa8mzO3GXueyG0fLJtM0QhVUdQx3J10SaVgtKNBuyn8cf29 W+BuAf2zHEGfYlOiZU1SLF6vqqlcXw8QKF7F8GdU/FptcQD4k1otKG76hUjw0F3geTO/ jTxy+xrwQWc/vn7LcTeC8a3VyTjpAgzbIvJdF+TetlWxFQ8SWugZsthLDZf5G8Y+XVA8 H92yuBOAv1blFvEv5zCGljaJCdQg4OG/QsN3jFER2tJxuUKy8s7MuFXxdvCS1baOg3/2 12n7JxZiwFWostTRBpJ6THKsbXbgXczhUUTM1Aw5/+1NtZImyYNaJdD3aDH8w7olVP2z 4v5Q== X-Gm-Message-State: AOJu0Yxle9JqUcHuMNhtKlxyx7f2cAMoVT+B3wvXrSh6GaAg5vxsSaXk gOGH4RrIyoZHR2b6Gx2sw/BgWSu75wfEHFn1AlGL6+rDWWvhOTOnBY1zf/hZFhwJzqNswO4G6At v X-Google-Smtp-Source: AGHT+IFIbNTnLzNHM7oXL6ldw0NmymiL4lQ5opdUbPEQdjdfOaA0f7YrTHfOALu0meK/VrBCthU1cw== X-Received: by 2002:a05:600c:3508:b0:414:8c26:4213 with SMTP id h8-20020a05600c350800b004148c264213mr3598054wmq.13.1711473035469; Tue, 26 Mar 2024 10:10:35 -0700 (PDT) Received: from m1x-phil.lan ([176.176.155.229]) by smtp.gmail.com with ESMTPSA id q20-20020a05600c46d400b004132ae838absm12139352wmo.43.2024.03.26.10.10.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 26 Mar 2024 10:10:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Paolo Bonzini , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= Subject: [PATCH-for-9.0? v2 4/4] meson: Enable -Wstatic-in-inline Date: Tue, 26 Mar 2024 18:10:09 +0100 Message-ID: <20240326171009.26696-5-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240326171009.26696-1-philmd@linaro.org> References: <20240326171009.26696-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philmd@linaro.org; helo=mail-wm1-x331.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Compilers are clever enough to inline code when necessary. The only case we accept an inline function is static in header (we use C, not C++). Add the -Wstatic-in-inline CPPFLAG to prevent public and inline function to be added in the code base. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20240313184954.42513-5-philmd@linaro.org> Reviewed-by: Thomas Huth --- meson.build | 1 + 1 file changed, 1 insertion(+) diff --git a/meson.build b/meson.build index c9c3217ba4..f400f7d36c 100644 --- a/meson.build +++ b/meson.build @@ -591,6 +591,7 @@ warn_flags = [ '-Wold-style-definition', '-Wredundant-decls', '-Wshadow=local', + '-Wstatic-in-inline', '-Wstrict-prototypes', '-Wtype-limits', '-Wundef',