From patchwork Thu Oct 19 21:17:36 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: 735607 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1730597wro; Thu, 19 Oct 2023 14:21:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IETU1cdYUuyG7iOqMG7zJ6XhAbyYDxLtDOK71l8R3LJYTk7kqjSY9kIHznRtxPuIfgPNgyK X-Received: by 2002:a05:6870:2c92:b0:1ea:809c:3eb with SMTP id oh18-20020a0568702c9200b001ea809c03ebmr91495oab.44.1697750518073; Thu, 19 Oct 2023 14:21:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697750518; cv=none; d=google.com; s=arc-20160816; b=NfKyral0NU+CDlf4K+ByrLIGjn5CjNcDW3r/CyFK8KXYrOpkVUxKqy4XO+DRSma17i Yy9+gPiMctoCxeuRzqe4dDS5jUbRHSRI3GXM5uv282LpXfZIy7l4szonDEaIwn0UDztV JyZ4ASF34SYq4L4GgQTktbq8PBLOCfS7Q2oOdgu2xnA+xiqu9p3VYnFNZo9MqrgzqmD9 PhJ5kueGC/S1Q58qrO0+BFA8Ha4VtkD/2NkVanL/kbUPNsj5KHRxlZEyutS4h1kttP3O ThJu6TZUmHwdFH3VrhHM4war0vG2Vpl/6oydpRiIcMykius7zdUq1ycWd9vU5pL9QWd8 nADQ== 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=7OwRTezp0vv6wqt1NgDnQGraNHaa8cKXk4aoany7tps=; fh=hp1KOKN2uBs/6/dJD+zRXT+HRLjOX+0sB5Ut8st0n/M=; b=mMTCDhh7lRhz4QKnWuHLFDeF+kkpxZ49Zsvce3tS/3Q9bMmyM0Ny6sQDj11HpvO+CS OVrNCk2N+xTi7KvWsa5oh3hk8GOOpVs6Gku2OFAfQ6plOnmuj0cVRdY4P0s2/VCwsmtX O6wlZUQfvn5b9DEyShVlP6dLDwhDb3ciYILroIyTHWriP7yjdm0adoPAk9FmZh3o9uKO mTE3YJja5fmjIJIlHVHAqZpKUo7xmZQBJ9XwnyqtPg5nOTtyotf/TkMNI2rH7UGrvnTJ vyW/hvj9vQj1hKBacEZQPqGhjzKlcHIAcKSjHaMmRcPUOVh7o8gJhXV2n5SKJfz/UIQG QzDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TJ3LLJro; 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 r17-20020ac85c91000000b0041cd28c1a7bsi253273qta.670.2023.10.19.14.21.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 14:21:58 -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=TJ3LLJro; 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 1qtaQZ-0006PD-OM; Thu, 19 Oct 2023 17:19:35 -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 ) id 1qtaQY-0006MD-Hw for qemu-devel@nongnu.org; Thu, 19 Oct 2023 17:19:34 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtaQV-000542-SV for qemu-devel@nongnu.org; Thu, 19 Oct 2023 17:19:34 -0400 Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4079ed65582so1010375e9.1 for ; Thu, 19 Oct 2023 14:19:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697750370; x=1698355170; 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=7OwRTezp0vv6wqt1NgDnQGraNHaa8cKXk4aoany7tps=; b=TJ3LLJroh0M7SiDtBZonaxhMj6gyalYfZxpyvG2Pc8NPedeSRn5p7oiSQYumhSQm6j JpvA1aociZFihgi0bKkbxRb+KkgWttBJcFkVif7A4uwlvDx/Oaqb698Cqa9xWu2PDhhY l45ON3Av65qKavhXtPOAzzHBI11uh745Smx4QBAUoQwWiiAiGOQqqLtoBNnPPhAPH6vG 5U4yUp7gCkAFgUGnQppNXWO16h7kLGq0aqpUWZOU9Ub/71jtHBYK4rJWwlWI3FVknqp9 GtW/M2PDHmW3G802uYtVmF1uD8zu5z9vaivswGZXqe+Yw1NQls4mVnIahHLctcBYYNXV BwHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697750370; x=1698355170; 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=7OwRTezp0vv6wqt1NgDnQGraNHaa8cKXk4aoany7tps=; b=fLix5lk13OTkqScI4kUySHw//opiU9Q/087VoZadg0W8BwAAaCxv3dg80nyQ45COJV P7sNtJ8AjX230PsJPE4LhEqxwNGDBe46AjA4BysF4oZj9WfwIqjJ4evU9MNPirCLI74K lZNfYBeZ1IO05XaVqYTwehVMihFKM373tIzIJ/y2bC4W5hKUBddorVq1p+lR+cFfYdXy FfW7A8DEBs179H3TKkxaP3ANRumavJUVzFbwapbHuSOEilqldcPK1udYDKxjxu/kkTMh +KxFYYYbqUGwh4RG8b7U/xVRBKlLQM7j0Aqdhd321BPRv3+37rCLq5so2efDI+XaIcT6 L28w== X-Gm-Message-State: AOJu0Yzq/uU0Ned+9zND6bgRsHLSlCtaWrI7/bpPMF7+Z03KinmqhAGy WcOJirDOCaJUKPy7EueOU/OzHWlIVMIgtkU46N+7lQ== X-Received: by 2002:a05:600c:a48:b0:408:3963:5bfd with SMTP id c8-20020a05600c0a4800b0040839635bfdmr43005wmq.34.1697750370425; Thu, 19 Oct 2023 14:19:30 -0700 (PDT) Received: from m1x-phil.lan (176-131-216-177.abo.bbox.fr. [176.131.216.177]) by smtp.gmail.com with ESMTPSA id c8-20020a05600c0a4800b0040775fd5bf9sm564120wmq.0.2023.10.19.14.19.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 14:19:30 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , BALATON Zoltan , Richard Henderson , Aurelien Jarno , Jiaxun Yang Subject: [PULL 11/46] hw/mips/malta: Use sdram_type enum from 'hw/i2c/smbus_eeprom.h' Date: Thu, 19 Oct 2023 23:17:36 +0200 Message-ID: <20231019211814.30576-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019211814.30576-1-philmd@linaro.org> References: <20231019211814.30576-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=philmd@linaro.org; helo=mail-wm1-x330.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=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 Since commit 93198b6cad ("i2c: Split smbus into parts") the SDRAM types are enumerated as sdram_type in "hw/i2c/smbus_eeprom.h". Using the enum removes this global shadow warning: hw/mips/malta.c:209:12: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] enum { SDR = 0x4, DDR2 = 0x8 } type; ^ include/hw/i2c/smbus_eeprom.h:33:19: note: previous declaration is here enum sdram_type { SDR = 0x4, DDR = 0x7, DDR2 = 0x8 }; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Reviewed-by: Richard Henderson Message-Id: <20231009092127.49778-1-philmd@linaro.org> --- hw/mips/malta.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index dac27fad9d..62d04ed113 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -206,7 +206,7 @@ static eeprom24c0x_t spd_eeprom = { static void generate_eeprom_spd(uint8_t *eeprom, ram_addr_t ram_size) { - enum { SDR = 0x4, DDR2 = 0x8 } type; + enum sdram_type type; uint8_t *spd = spd_eeprom.contents; uint8_t nbanks = 0; uint16_t density = 0;