From patchwork Tue Jan 10 08:25:07 2023 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: 640841 Delivered-To: patch@linaro.org Received: by 2002:a17:522:f3c4:b0:4b4:3859:abed with SMTP id in4csp2625365pvb; Tue, 10 Jan 2023 02:52:25 -0800 (PST) X-Google-Smtp-Source: AMrXdXtL9/mmkp/DLZ4DH+MRuMj9CMwGNLAiwZYupbGiw7i7N8FI/sQn6DDgJdlFJ+4jlpl85CA3 X-Received: by 2002:ac8:5710:0:b0:3a9:86dd:3c60 with SMTP id 16-20020ac85710000000b003a986dd3c60mr126938222qtw.47.1673347945139; Tue, 10 Jan 2023 02:52:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673347945; cv=none; d=google.com; s=arc-20160816; b=t0RJq5CzfuFxdSgBEG9Eet4C3QE2cuODtB0Tjqk82VW+aOeLz5PQCdUEw2edE2D4mc zh91t+iH/deiXJd5iJAHczJkUV3koTKY3TUA/pIuw5a3uKku76s17bkiJNawN/qhc8mc EXTCbu8DfeIp2msyBn35FULX7iBwtDzeJeydQdjEDs+dkx4cyrrLsm2I7hLdV640lmKF 0hfSr1KNHI7TLQm3eI4tSB7dVuGonB5+Bc0lCfsNwGfl1nEphSAULpOJT8u03DrvvIds Mz0z8dpw/ctw1Op3QbQrtacefdzfHIW4XyzfDn59UVKyZDlL7WHgSOG+imVcQIjaX4jJ CCkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=yDI+NMLY3kwFwk/S7hyFI2p4AMTGBHGEpIPdQhrWZDA=; b=zB/f03QvWDZRHJrGEG+K1eOvpcl8eOp7LYbfz5kPd5qmtZJDx7+WRY7MrhvX70ehGS x2OseIXv/dpieouWtKxYakNXSkjeCXUfbvi0wv4jBnx4kF/wid9/dQkZU7uSad1eSZQf QmhVInXNVeUnVK0kqtN24+IyR/U5EK4WCOrtg+N9A9g9qTUuYtfhuO5YhE7Jy9FnFtyW vlrxCpe+7Nj888T/0Pj0d6ovVUtDMqX3YEXduNnmeb72DaEFpBD2926/klmbN02SfjzW ysJXvWHZMxsW6IwCzwo6EA361wSt4n5TIeG6wGMRyNZXVQe4yuknGUjD5QfEGG0G6grt GWjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fcz5Ry+q; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id o4-20020a05620a2a0400b006fe3de1ccebsi6677779qkp.483.2023.01.10.02.52.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2023 02:52:25 -0800 (PST) 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=fcz5Ry+q; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pF9ws-0005cf-Iq; Tue, 10 Jan 2023 03:25:34 -0500 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 1pF9wq-0005bM-Ij for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:32 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pF9wp-0004eX-2S for qemu-devel@nongnu.org; Tue, 10 Jan 2023 03:25:32 -0500 Received: by mail-wr1-x42f.google.com with SMTP id z5so9821261wrt.6 for ; Tue, 10 Jan 2023 00:25:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; 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=yDI+NMLY3kwFwk/S7hyFI2p4AMTGBHGEpIPdQhrWZDA=; b=fcz5Ry+qWpo+SNgb49kngVWkzWmmab32dwHA4AbVp//EPjzQ/d1OCwBeG02Hp8Qg4i Pbayxa1fvcmbW7FdkntSNOBbMmoOXWfwIHgYDPRaoFIEkdBg94Iz0JRC4uoq2WbHu6MJ 0A1NzMg/DrkdyNC1jx6VMgKejSyObyz1kSBQkuYLMaouxWB6az0fM2tyyOaJbasczxkj Tw6guBfl11wj8fQpGX+E/tXiB1woVGaSzMVbtNClt1JKo4vHv6/dnwMyTAZ9uU5MtK+S 4PzRagd3mWZ7MVleDh/2v0/FPM/rtoohSK9yv+kC/SyXh/CU88K/AlOr6Hp+DmxrbPxu TmoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=yDI+NMLY3kwFwk/S7hyFI2p4AMTGBHGEpIPdQhrWZDA=; b=xfF25rL3syd45MfPO6mnLP//tmeKFtl38tritUA8MxhSRcj4ddI2JPwRBGo5mH3WBY C+uxdP7adTiYeqZn08YZk76/cSqovRVzujVVm7JAb4r98p5u5BjfQID5j4To7LyPYPw8 2lUORddMujGjELG/P5u/BHWroQvHQbVR5GUKJhJfQIrGT9s2VXkWm02gHvTtKUzp5HyE ADb9ei3GJJQqmqdafKjzZ4ELfG5iDFzUmgovIazBtAr+nOcpEDRDiI1PzUdxDvPrJgIn JmQgCl8Z2hGohyxI40cJVsKTo/leJZJ4s9oP9w9OACwTKkvBKYhz/4ZOevIe0Jxl5qZr XpFg== X-Gm-Message-State: AFqh2ko5AOYJgQKyGl+bGXlfbXrb/mPz6EucWCdBGuSwB54dgAkGWAMI cu5/0LrWeZo3jR8DmmUUXP54FKOK2ZisU3nJ X-Received: by 2002:adf:fe0a:0:b0:2bd:6ddc:3a44 with SMTP id n10-20020adffe0a000000b002bd6ddc3a44mr779612wrr.62.1673339129539; Tue, 10 Jan 2023 00:25:29 -0800 (PST) Received: from localhost.localdomain ([81.0.6.76]) by smtp.gmail.com with ESMTPSA id u14-20020adfdd4e000000b002366e3f1497sm10663791wrm.6.2023.01.10.00.25.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 10 Jan 2023 00:25:29 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Peter Maydell , qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PATCH v2 4/5] hw/i2c/versatile_i2c: Use ARM_SBCON_I2C() macro Date: Tue, 10 Jan 2023 09:25:07 +0100 Message-Id: <20230110082508.24038-5-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230110082508.24038-1-philmd@linaro.org> References: <20230110082508.24038-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org ARM_SBCON_I2C() macro and ArmSbconI2CState typedef are already declared via the QOM DECLARE_INSTANCE_CHECKER() macro in "hw/i2c/arm_sbcon_i2c.h". Drop the VERSATILE_I2C declarations from versatile_i2c.c. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- hw/i2c/versatile_i2c.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/i2c/versatile_i2c.c b/hw/i2c/versatile_i2c.c index b95c70608b..d19df62265 100644 --- a/hw/i2c/versatile_i2c.c +++ b/hw/i2c/versatile_i2c.c @@ -29,11 +29,6 @@ #include "qemu/module.h" #include "qom/object.h" -typedef ArmSbconI2CState VersatileI2CState; -DECLARE_INSTANCE_CHECKER(ArmSbconI2CState, VERSATILE_I2C, - TYPE_ARM_SBCON_I2C) - - REG32(CONTROL_GET, 0) REG32(CONTROL_SET, 0) @@ -86,7 +81,7 @@ static const MemoryRegionOps versatile_i2c_ops = { static void versatile_i2c_init(Object *obj) { DeviceState *dev = DEVICE(obj); - ArmSbconI2CState *s = VERSATILE_I2C(obj); + ArmSbconI2CState *s = ARM_SBCON_I2C(obj); SysBusDevice *sbd = SYS_BUS_DEVICE(obj); I2CBus *bus;