Message ID | 20250320154722.27349-6-philmd@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a5d:5f4c:0:b0:38f:210b:807b with SMTP id cm12csp398540wrb; Thu, 20 Mar 2025 08:48:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUzXZVg7KXozvNLTopCUh9fUxIwhvKjC6QfGl/Jw75jN7grJlLezlOY1EbfBO7bRK1ZhgIMIw==@linaro.org X-Google-Smtp-Source: AGHT+IHN8+sRxpvhbrjUcZFMwFyfhZ5T+uExlFyF8Gz85HVnXo1EWY5X/6oR6f+06xEarPck+Uzx X-Received: by 2002:a05:620a:470e:b0:7c5:48bc:8c77 with SMTP id af79cd13be357-7c5b0c72cf0mr437315185a.12.1742485698708; Thu, 20 Mar 2025 08:48:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1742485698; cv=none; d=google.com; s=arc-20240605; b=i5NyBilIP1V5sE/R/aVIrIoJtdB6Y4X3u7tDB556CQrqphXnxhOvm+DxYzSYrjIr9x 2rGjc7zrNYtNkoaC/t+rAPpoPRxuWkcW/2zVBV+3O8KciQvaaqGuSZtWL4Mc6hv5TNSE m2kSp3+azqb+2dNCjHFAciR8nSdWN565P6tS/43ags8uUX6i+KsqgQByOUIa2kT41G5A FNt1WBXaGDxWB65/bSTDRYTxYUPrv8G0c04BsdFaWsef6nWoQjn6a4qFNL/KKf7N/sbB JDp1xcjELJWpxeykhusHFanT6XZan0NJ/4qoYE8GjDUNVeFeQW7ONODJ2IL6hgz4hDiy f5lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YQMafUmqG4jCB4tpUPdNT81l0E9rYtmlbZl+WPtco9M=; fh=qbC6fvdFrljuilVi+/v5x47AoPH9/ehlwoBVXcbRqbk=; b=erJKo8B8gIYHqoM05003dZ0beczBEYpw5AO+94ofkVCiDRqT9tPj2YAMgOljQpdW9W VZ5WORE+Oarlr+ueOe1id2XLOHnmRy9Q8BSCTTDimIbhrS5ae3i7za4s5/LMXWpjUIY0 UBOiYmyeYP069S9SJ2DhriwUHM4YTw4zAz97caUrONQBriX64WOCYg/AIZ0LfcLqY3pM pihQvZ1qplaSrTKavXUdclW1PXkw9rCTGYcf5S/ZrU+zkh66CWRlZuakAEFf3k/jq4v/ M63tmJ0hENVxb9iEHTHMnUw/0MDi/nEGiIzrQ78dGzjER5YWu582qgdWHVn4hfcpH/aE HKpA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CyfBv4Q4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7c5b92aff65si10868285a.75.2025.03.20.08.48.18 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Mar 2025 08:48:18 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CyfBv4Q4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <qemu-devel-bounces@nongnu.org>) id 1tvI7s-0003wN-Tq; Thu, 20 Mar 2025 11:48:09 -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 <philmd@linaro.org>) id 1tvI7c-0003ad-Dm for qemu-devel@nongnu.org; Thu, 20 Mar 2025 11:48:00 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philmd@linaro.org>) id 1tvI7Z-0007qM-B5 for qemu-devel@nongnu.org; Thu, 20 Mar 2025 11:47:51 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-43cfdc2c8c9so6033655e9.2 for <qemu-devel@nongnu.org>; Thu, 20 Mar 2025 08:47:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1742485667; x=1743090467; 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=YQMafUmqG4jCB4tpUPdNT81l0E9rYtmlbZl+WPtco9M=; b=CyfBv4Q43ttytkp0Sf7OOkGge1f65BaOASrsihzsjB9dEQazIf7fSW38gDXksKcAXP 06Kp8TMt26gVRiBujM4pm6iIXs/5DG1sZhl0XXc0RlBaC45Yl2lZivpoayroCDKHECHV IFo5u4vqkJ+VYps+W+gxdyPveRpS7iT/+GEIlhcsDHMvaAGQeTh/dNZNshxr2S+JlCR/ X2xZdp2pX68FCBEpmKtN4NVynG/NvFY4aVOjm8d9QZR7FJ2htOyxZnoDRxqNJ7SRfnr8 HwwLABLdjzz4Vn8qFA1fYZCAS3V442l+7joOq96RiY+U5gcxttJ1i6/TxKf+lBqIMT/e tDOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1742485667; x=1743090467; 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=YQMafUmqG4jCB4tpUPdNT81l0E9rYtmlbZl+WPtco9M=; b=PkMn6eV4DkwijWtp9NrMXf+c6fpY5hxXKg7VrsXr5B7wRFfBu4MK9psCtjYs+v/W0O vsCAcIFy4GMD9WN7ydDdWDbt2RwZnkX7VQIG6NlqyxVcCN+gCm2iToRFMbgvcsSprSr0 b/TJUtI4qkwCqqYfgqe9A61r9oCa0aLjpseyNklE5AO8E09/uaN2JL4lQnfI/ZQFmBFL +x/KUK1E0VFkDoFRHf7bEU4p4XluZH6ssy65Ua+y8rRn4mh7EVU0atbXtbed1khP0tv0 OpjCHTTA2MdvnOFyX1nuErJfkzbTkLNyIq1RRKrHQqoot6hG8NMhOt6AC1KuMoaKOtmA fFhg== X-Gm-Message-State: AOJu0YyQdCAIOQQTnA/b3Zl6FCWXZzMs9WoJpai7x4bPDg4QmzxHllT9 507cLUTpe27WOMtT9C8E2uwqEblgBBtibPMcqWSAny9WrNUYHjVrKxeoEWiq8Th+veJ8GBcIHZy j X-Gm-Gg: ASbGncvudIYJRHI4YwGdySk2IPg7JMostmKETOt0LPaUcOgUWNCU/Puq6Ge8B1CMP22 HohPeog4LDaadVPdTKH6GiRz5k+bqZDnTCUmE1C/cvzAWn8BpcHB+Sbk5WEnFxciqAxhLfjVv9K MeyKJuihP7oHBOP/rpHp5uF+F8WoLnQ7wjgKM3iipWb0BX3/T32oattlmyAlPj/cq+BzEleeaUS JYUOQ2S9qNLuMDcbZIFBRg+8FuopmzbxVhpO+C56jZsD/ubR2ecDBtVt2aBc+Z8aaWntbuEv2Hz unzQVsdpZvZVH4AFlt0PvX/VktROOd2vLJmUWxI8Em3gE7KEfZRtYgbCAH3g1gzle2+r5fk/aT0 VXfrAAHiXTqX8bGadFKBs/gMy X-Received: by 2002:a05:600c:4503:b0:43c:fab3:4fad with SMTP id 5b1f17b1804b1-43d437c3354mr79362395e9.16.1742485667346; Thu, 20 Mar 2025 08:47:47 -0700 (PDT) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-43d43f43ecbsm52028545e9.10.2025.03.20.08.47.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 20 Mar 2025 08:47:46 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org> To: qemu-devel@nongnu.org Cc: Markus Armbruster <armbru@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Paolo Bonzini <pbonzini@redhat.com>, =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= <berrange@redhat.com>, Pierrick Bouvier <pierrick.bouvier@linaro.org>, =?utf-8?q?Philippe_Mathieu-?= =?utf-8?q?Daud=C3=A9?= <philmd@linaro.org> Subject: [PATCH-for-10.1 5/6] qom: Use object_class_implements_type() in object_class_foreach() Date: Thu, 20 Mar 2025 16:47:21 +0100 Message-ID: <20250320154722.27349-6-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250320154722.27349-1-philmd@linaro.org> References: <20250320154722.27349-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philmd@linaro.org; helo=mail-wm1-x333.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: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org |
Series |
qom: Add object_class_implements_type()
|
expand
|
diff --git a/qom/object.c b/qom/object.c index 536308c0553..6733adcd6b2 100644 --- a/qom/object.c +++ b/qom/object.c @@ -1136,7 +1136,7 @@ static void object_class_foreach_tramp(gpointer key, gpointer value, } if (data->implements_type && - !object_class_dynamic_cast(k, data->implements_type)) { + !object_class_implements_type(k, data->implements_type)) { return; }
Previously classes indirectly implementing an interface more than once were triggering the ambiguous cast assertion. Since we are not interested in the returned class, but only whether it implements or not, use object_class_implements_type(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- qom/object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)