From nobody Tue Feb 10 02:55:29 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1589130768; cv=none; d=zohomail.com; s=zohoarc; b=KOuxF8BMCDzoz1fR1b1/sS65O++A5jjyr0Zkcw82IcbX8KbKhivOYlraVaJb9jV4W+JLPWczporLrNKugxD7hZacvcmFV6Bj7xIAxH/VRnTKm1UTiSN70T+YT2Jx2ze6BABbhbbjuqy03+c+iUIMtjKaBmZBqFGet56yIzfUwb8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589130768; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=opJWKypD+HXG5axwxyBOWTbtCOfa9yREZFCiYnwvuD0=; b=f0wv8VDon6M9mwSM8wrYIcFsC+Ys0roj/nYdmtG/fx72vOhlVtmn0s8qLnK3UF27QbFmu5mDIMVvDnGe7lp4uWKMqWUHSgnA4AKzOf9QBZQ4jbmvMCie9N5JkyJFbGYQkAyIMgVCbU3JZZ8m+KDyxmJBTb+LO1/QDFNWTB8qScU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 158913076865988.89435245076982; Sun, 10 May 2020 10:12:48 -0700 (PDT) Received: from localhost ([::1]:47834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jXpVP-0007mT-DU for importer@patchew.org; Sun, 10 May 2020 13:12:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36888) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jXpUA-0005q6-7N; Sun, 10 May 2020 13:11:30 -0400 Received: from mail-ed1-x544.google.com ([2a00:1450:4864:20::544]:37071) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jXpU9-0000CE-I8; Sun, 10 May 2020 13:11:29 -0400 Received: by mail-ed1-x544.google.com with SMTP id w2so5875810edx.4; Sun, 10 May 2020 10:11:28 -0700 (PDT) Received: from localhost.localdomain (17.red-88-21-202.staticip.rima-tde.net. [88.21.202.17]) by smtp.gmail.com with ESMTPSA id w7sm960776edr.20.2020.05.10.10.11.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 May 2020 10:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=opJWKypD+HXG5axwxyBOWTbtCOfa9yREZFCiYnwvuD0=; b=CPVHAz98Cmyf66upvDkvwXPvXF2FlyrWNlWEPK9BTzDafFEvCTWTKyJOZS0FY9y2ep FPTd1Ne7PW2YXr1TbXIsAagS5afadsDh/MByCOZzKD1bqwEaTf4Yx5TPXHYvOOiREelY fDtUUajWOgEEslD8HRZuRXW4J1GnqT1vvs8YolXnG9sa7m8ydj9MOMHuc44LQ2NsyUoq kkDyWNXygnn1uIVd9M0f591pKGA7dEngCSRyKsiOMdjd3oGhmaaTLWetKO0H2f6RY6J+ m1QU7uaeuiipcM+GURd76Bse9WyOd3sz9V5aRHvbduCYMjLhYnm1JPH4gICKLlApJumZ 0Ekg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=opJWKypD+HXG5axwxyBOWTbtCOfa9yREZFCiYnwvuD0=; b=fDuYmkcZ8HlguyRutVGMkn2sxVvi+4Tp1y0nQEPOPvLEreBYwL6bDccLVlS8DrDg9Q cFJD3WNI2RFxfzoqzlRIU4JqavzsqWWkqqgTTqbE+faipntuliySHuv3d8f2NgbSaWon hz1UmR5a008AelodGJBAZ4x+dEEnPKD3pjRdxZsCTbOpO73HAwb5TezlR7WVzrWa6sbZ bd0rccPuW25oZ32o1XwYEIasgDNlPM3IYfoigp3nc2RY0lKkev7Ar+j0njWD2VNoGIWm aflWpZsGmclYT7rJBQZqNY9ZFuyat7HYpfCeXR/UfMgC2zzw/DuEYGK5tWZPthTKJyPD 8XwQ== X-Gm-Message-State: AOAM531sYjA8RAuF20gL7oeeyoJo9gMzLJNU/0tp/xmHKXvsy94SdMFn DymVUFI7LQlQhLLY3vhAoQbANTsjMH4= X-Google-Smtp-Source: ABdhPJx6fDzA1yjGn8O/Y7E0YHHrCbPFvmdyGZmtFczPoLoYv7bGshd4zW04ykGRZpFKfm3Pi8fZlg== X-Received: by 2002:aa7:d496:: with SMTP id b22mr918491edr.301.1589130687702; Sun, 10 May 2020 10:11:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/3] qemu/qemu-plugin: Make qemu_plugin_hwaddr_is_io() hwaddr argument const Date: Sun, 10 May 2020 19:11:19 +0200 Message-Id: <20200510171119.20827-4-f4bug@amsat.org> X-Mailer: git-send-email 2.21.3 In-Reply-To: <20200510171119.20827-1-f4bug@amsat.org> References: <20200510171119.20827-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::544; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-ed1-x544.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, "Emilio G . Cota" , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Rename qemu_plugin_hwaddr_is_io() address argument 'haddr' similarly to qemu_plugin_hwaddr_device_offset(), and make it const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- Having the variable named similarly to the 'hwaddr' typedef is slighly confusing. Also if we declare 'hwaddr' typedef poisoned, GCC complains qemu_plugin_hwaddr_is_io() use a poisoned variable... Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/qemu/qemu-plugin.h | 2 +- plugins/api.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 5502e112c8..89ed579f55 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -331,7 +331,7 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qemu_= plugin_meminfo_t info, * to return information about it. For non-IO accesses the device * offset will be into the appropriate block of RAM. */ -bool qemu_plugin_hwaddr_is_io(struct qemu_plugin_hwaddr *hwaddr); +bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr); uint64_t qemu_plugin_hwaddr_device_offset(const struct qemu_plugin_hwaddr = *haddr); =20 typedef void diff --git a/plugins/api.c b/plugins/api.c index 53c8a73582..bbdc5a4eb4 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -275,10 +275,10 @@ struct qemu_plugin_hwaddr *qemu_plugin_get_hwaddr(qem= u_plugin_meminfo_t info, } #endif =20 -bool qemu_plugin_hwaddr_is_io(struct qemu_plugin_hwaddr *hwaddr) +bool qemu_plugin_hwaddr_is_io(const struct qemu_plugin_hwaddr *haddr) { #ifdef CONFIG_SOFTMMU - return hwaddr->is_io; + return haddr->is_io; #else return false; #endif --=20 2.21.3