From patchwork Thu Feb 15 17:57:48 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: 772982 Delivered-To: patch@linaro.org Received: by 2002:adf:9dc2:0:b0:33b:4db1:f5b3 with SMTP id q2csp967451wre; Thu, 15 Feb 2024 10:05:52 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUpoSGpgklkhOR197pqOyOTl40kuhdYhQWgZJf3MMbrFUkJiMUHNWVlxUaPm/x+sjLAnkxT60MLVIADSF8WQGAn X-Google-Smtp-Source: AGHT+IHl9Pp1L8NlAwGriQJGN/Ccwospzq7x838ZEZDzM8uiSbQqGL/Lp4gXHWUjsv29bJhSdwE7 X-Received: by 2002:a9d:774d:0:b0:6e2:e6ca:9b59 with SMTP id t13-20020a9d774d000000b006e2e6ca9b59mr2473150otl.18.1708020352277; Thu, 15 Feb 2024 10:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1708020352; cv=none; d=google.com; s=arc-20160816; b=r98YOLefRLctfP5TeYtoShNRhdlzzxIs9Dj++2MMaH9WQ9Uj9+uD7/5w0ieRjYbb7/ 8+7/T3mZbOXFWDyCHhWI2/rhtoO+yavMtNdHygd2oHsvkUVlO7+auRnnhLmJmKyt6bIh SmK9mOvnaGmGsXXxlzN84wPM/mC1AuXnkmUAqgBqMwrsSuEHZDGASOay3px0ejBeIHs1 i59SmGVrm4mTshfiCkvrZQKvbgLGnUMOCZO8Fbi0R7/lcjAFeE3cqJbtsmqKc56n9AVC 8KQ8d8Ugaz4PpniLqvHo0MlX7zgqdFfBo23pYUp9avvtQ5XRA6hja6bRP1KScM1JA1CP bjqQ== 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=4Trz8Izvuz2UeQ/LEyIdx4V0+3quGaJPJGfbh/3eXoI=; fh=RnY3BkcA5+JvuWZkU8e2LOihW+vbjuMZ8X6rJsvoWdI=; b=fdFuypl2PrlDnTGdPSCdptf5wDS3+IvBX40rb0A1QOk2D0eFcfdwupeLpdmGpjVfEz kYSJZVfTctSyKWmsriHzV5KXJ/lNscBW56/NPzm/FxoEgh/nsia1NRJfkgh9yfytkV28 OYgn5Qg3ud7kRlD877txMaInpfBbKczVLPoU6ku1+TjHPBAKzE/584PEota6G32ZnwuQ C7ikMEVEObnBL00Rj5vnKTbkPIn3BVxrUh7DkxePgvRpsH3g79CHjB5mpxg9dSl+CsMA R0mpGF2rSCrACyd1iqKlFUqFWxSfMEnNfPvf2RLJ5k31tsDp53vCx/6ZEFXc6+/TcLus DTEA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S7LzbEBV; 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 dh10-20020a056102578a00b0046d26adccc7si441835vsb.308.2024.02.15.10.05.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 Feb 2024 10:05:52 -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=S7LzbEBV; 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 1rag68-0004Dq-AZ; Thu, 15 Feb 2024 13:04:39 -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 1rag5Y-0002tL-NB for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:02 -0500 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rag5U-0003FA-Tr for qemu-devel@nongnu.org; Thu, 15 Feb 2024 13:04:00 -0500 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-a2f79e79f0cso172947066b.2 for ; Thu, 15 Feb 2024 10:03:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708020235; x=1708625035; 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=4Trz8Izvuz2UeQ/LEyIdx4V0+3quGaJPJGfbh/3eXoI=; b=S7LzbEBVn+eZK1SRonVtsvutPGUzc6Bjzh8TmKaMXRmqm8FCuCd0NQxwRm7uR9I3XZ tNib4W+TgJCmDu50eOUKnOvLgGClTek5OMEiWt5qLmYJ+FrIrI6pgdv2h/rcqHhoEMTk f6P6oTQPcQdn8vdVLFXE72/gioopTbBZg6t5olPhIzgpABpoL6H2m4w9Kf0juMNoOZyn O/hnrvNgmp0Z141x2tuMsINp0u4ePGI2iZGlJvPj1BeB241yLLzNSaoyvDsOeG60Bx5h ZnIRQDBJktlaqUQ8cb9wag3A1br9b3Grbduh90OSKvkHsRRagAPl8wRMz5mbJXQDgpG2 pbFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708020235; x=1708625035; 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=4Trz8Izvuz2UeQ/LEyIdx4V0+3quGaJPJGfbh/3eXoI=; b=SVPD1Ol5pLoYsSfnJCRuNvZnnDWowwTlZQbkYqFBPpDoS7uukB9cSmHOvKWGSJB42r yIe8VQTcNuLwChA9CRp7eJtFWSLOyooj8THto0dd1MZoKR70xiohjm6yYfAL2FJpozdX F0l3/tRtkb0Nm2Ppm256fYIw+7+PxVzADckLVMFK2LGUrQ0BsBRyZuLk2J9qFEApw8vs hAz6UjSS+mjVQVwUXv9GPGi0hSSOOYH2eR+7IJ6u1i7dnogKZzxUBiwVWvwTNaSz2O+D nIOvdBRLM+N233lIUZzvHbk8SOyGLiIdblDPxUJqnwdhdn9bbl4/u3dJrkTD4rmKzi+O 5r5w== X-Gm-Message-State: AOJu0YwdiLdHClurZ0hHhw/adPqIq2GzwsiPOvFBFUaID30eKcvwq59M ShQFdIIHKqbb3loVi8ApTdAkFUkeLi7Ut58/Kjk44danFcC5tMxERHtJCqWPmUYeC5vBT1YvzgL aGNc= X-Received: by 2002:a17:906:338b:b0:a3d:125b:d221 with SMTP id v11-20020a170906338b00b00a3d125bd221mr1667572eja.26.1708020235273; Thu, 15 Feb 2024 10:03:55 -0800 (PST) Received: from m1x-phil.lan ([176.187.193.50]) by smtp.gmail.com with ESMTPSA id sn24-20020a170906629800b00a38a705121csm779300ejc.47.2024.02.15.10.03.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 15 Feb 2024 10:03:54 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-arm@nongnu.org, qemu-block@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" , Richard Henderson , John Snow Subject: [PULL 54/56] hw/ide/ahci: Remove SysbusAHCIState::num_ports field Date: Thu, 15 Feb 2024 18:57:48 +0100 Message-ID: <20240215175752.82828-55-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240215175752.82828-1-philmd@linaro.org> References: <20240215175752.82828-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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: Michael S. Tsirkin Reviewed-by: Richard Henderson Message-Id: <20240213081201.78951-9-philmd@linaro.org> --- 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(), };