From patchwork Tue Feb 13 08:11:59 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: 772274 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp143051wre; Tue, 13 Feb 2024 00:14:30 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVJbOw/0Fu64HIqPzsiy4ohuU0Nm8N7v4ymD/rVVRqS7k8WFaY0aVcDry6/L/DIiyO2vxuDxKFzsutU5Jd3UbGJ X-Google-Smtp-Source: AGHT+IHuA8oFkgM03oqP07JJc4LQgccwsZfYTxpzyoZlEGwbfS4Nx7ofmRh2AZfMkun9qLk7LLTy X-Received: by 2002:a67:f88f:0:b0:46d:606e:6323 with SMTP id h15-20020a67f88f000000b0046d606e6323mr5990589vso.2.1707812070686; Tue, 13 Feb 2024 00:14:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1707812070; cv=none; d=google.com; s=arc-20160816; b=WDGf6M/z5Pdm/R7bGpTuAOHq4Djz2sdUjuH6WglYwhSnbl5hT/cU/rE+0BgSdwQZxK UVfbe/k885Qy4qpdOmjxE5Mqab1Wtin8UunqaGhhGZBcVsVNVtTluxyShNcSyqO5L1Gr 3+Wxu/89nxyNTHj4D1raFR2oUI9dVnVv/gB/93aA8P4UwZICvaziqTt226rbWn66/++L qv7m8LJzFesy5XmeATfoXDKhvkRSrSKHckduHImRr3kKlYbEiBRr3Nfs9xN7kCaRTMxH 0HUWIAuSOXlTZUnzMjj+SvBh480eLEgnLgz6aF6TKLk4BTKqPJ5EbVmId4mG9UIrvzgT 65bA== 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=o9Mll3b0jD3+V1gEhLcEmdspqDBWW+gx7Ndf0tUMfZI=; fh=o+IQOD4BIveFNppSFbiP6uXk+gP12zo4fFe6KHu+tHg=; b=sriS28c719eF1TorYEtBqSaxuSnaumLZ4LNH1osc9S0ebH+zGG6UgrySE9+LywVQtk NYc3gLKSi/1hXpvIR33S4kDjkYnDAKiNW39Q7vy/QoIhD42stzcvRuWGJllwFTfR87kS 5nm8MXuU/40t2YW2KtD52tIYTQ3XFLtDnwdlsEM/smVxAU2b6cQJ71cZBmjcTF0CBZIr xwRv8e9+GDTo0I56bKeuFLyaNtHaxfQwE3vZOVrYM3jqtF/Sfs2bxPtoDvCV9zHN89hA q19OeBk87DQP4TaoXRqC9DPWSjAt8rn04czvak/EOA/IUGIJS1N00N1bAZuT5h6oYY7K Eyyg==; darn=linaro.org ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ODlbnsDD; 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 X-Forwarded-Encrypted: i=1; AJvYcCUwyxHLn0Dmdw/LcCg7m6C16xlibFwnm9ggRnzvYdaqZWonupN7Nmu9GK036Z1e2ofzdAxyJzsZ/ANgG8YT8AFZ Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id 12-20020a0562140d6c00b0068cd84add5bsi2332121qvs.12.2024.02.13.00.14.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Feb 2024 00:14:30 -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=ODlbnsDD; 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 1rZnuc-0000w2-7q; Tue, 13 Feb 2024 03:13:06 -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 1rZnuZ-0000uY-TL for qemu-devel@nongnu.org; Tue, 13 Feb 2024 03:13:03 -0500 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rZnuT-0000v2-TH for qemu-devel@nongnu.org; Tue, 13 Feb 2024 03:13:03 -0500 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-4114e0a2936so10243985e9.3 for ; Tue, 13 Feb 2024 00:12:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707811976; x=1708416776; 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=o9Mll3b0jD3+V1gEhLcEmdspqDBWW+gx7Ndf0tUMfZI=; b=ODlbnsDDlVkFrkvHkY1s/g+SmSP+mcpGx4jycFSii2JeolMY9XEOHpRUAH+o7x064s 3lmHjeL6snn149zESBGifQEsXvI/+FnpQNY2q6H0ulqeXm7MvYZRVcNvQ3/tlnmEyMz9 PCSQb1wEBQH9nnT47RntBV6/x0vmSfkqK/fSg4BzuQskw3iSoQ25dFyFbNvuc69ETd5S ybe/OcKaaylqiGp1S0pFLRqjtTyblcp+CFoK5JlaQ5OMWysB0WmL61eZ/W6qrburGkB2 uYvmA6ACb/7xUQX+VtlALRuVd7Kno5BUBl0BDPBND87lcBHwcAYv40yECQNhiLFT2Szq P9pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707811976; x=1708416776; 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=o9Mll3b0jD3+V1gEhLcEmdspqDBWW+gx7Ndf0tUMfZI=; b=TmcxRSsGD/vEbJydXO3I2izYodCFOahmn6xAItWpvIIaNgvYPJap8cBTNlQuZksJfT dzX30UybaIRlrHl3CitQZoCmCxPQPq8hWiVOKhFA8lJNag9JZCt/S3C7SMOcgXs7vsiV tEaMGyWNNkPmDpS9IIlM1qiuKSMqanPv3iLsYlUjirdC8NwHtbnclZS0KNb13RTXrDTJ HGa9pW37qIMyTWSV2E4Q94hnAFUzYy6nOcm5f1EDWSX1b1T3YKnoUiHJD8wNDbnRC67T djWP3zmyAvpnq/11JPYJbb8smn/qtQJtzI8lRwCyy92Da2B72dznY5oy0ecfxT9PCuDq bCeQ== X-Gm-Message-State: AOJu0Yw0nt9Ryyq0VNL7/ikJwCRP/sBpeMd3Ox2leyrGlInxUu+d1hM1 73axlXgGIuvjsJm4HJK18N4HBByrzapmDyiD24M5fVpReH7aTacztuAH8VVeZRG2RoBMVfQcQGd n X-Received: by 2002:a05:600c:5487:b0:410:cc53:a358 with SMTP id iv7-20020a05600c548700b00410cc53a358mr5102258wmb.16.1707811976001; Tue, 13 Feb 2024 00:12:56 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXaF3ktzSm9VNZed+L5sZ6c4prONn+fJw8l4SkEvOb17m90mnfPe+5XmmsYDYWotcewD9rRFWM9+Pmu6eLkzU0kthbmP9mpXvR0+6s8pQHcjfBzs7G4mcNatOq6EH8rTS720Ej7dwRhn3/St9xHVHpvn7McPF9FhDuilFvSWsP7r+5HqXyZ+MUJMHAriJuJHyA97L5oyyBCXlPdm2WiR1/HVGiXPY8vseL4TPb+JWCeEmGH+OyHwRn3bIbDIeRnrk4njCOC59dDzukORHPyHC3G9w3BiRM= Received: from m1x-phil.lan ([176.176.128.243]) by smtp.gmail.com with ESMTPSA id e1-20020a5d65c1000000b0033afb963d0dsm8828239wrw.101.2024.02.13.00.12.54 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 13 Feb 2024 00:12:55 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , Marcel Apfelbaum , John Snow , qemu-arm@nongnu.org, "Michael S. Tsirkin" , Paolo Bonzini , qemu-block@nongnu.org, Eduardo Habkost , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Subject: [PATCH 8/9] hw/ide/ahci: Remove SysbusAHCIState::num_ports field Date: Tue, 13 Feb 2024 09:11:59 +0100 Message-ID: <20240213081201.78951-9-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240213081201.78951-1-philmd@linaro.org> References: <20240213081201.78951-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.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, T_SCC_BODY_TEXT_LINE=-0.01 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org No need to duplicate AHCIState::ports, directly access it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- include/hw/ide/ahci.h | 1 - hw/ide/ahci.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/hw/ide/ahci.h b/include/hw/ide/ahci.h index 604d3a0994..c0b10c2bb4 100644 --- a/include/hw/ide/ahci.h +++ b/include/hw/ide/ahci.h @@ -63,7 +63,6 @@ struct SysbusAHCIState { /*< public >*/ AHCIState ahci; - uint32_t num_ports; }; #define TYPE_ALLWINNER_AHCI "allwinner-ahci" diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 33f7e83687..041cc87c11 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1862,12 +1862,11 @@ static void sysbus_ahci_realize(DeviceState *dev, Error **errp) { SysbusAHCIState *s = SYSBUS_AHCI(dev); - s->ahci.ports = s->num_ports; ahci_realize(&s->ahci, dev, &address_space_memory); } static Property sysbus_ahci_properties[] = { - DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, num_ports, 1), + DEFINE_PROP_UINT32("num-ports", SysbusAHCIState, ahci.ports, 1), DEFINE_PROP_END_OF_LIST(), };