From patchwork Mon Oct 9 09:21:27 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: 730963 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1107251wrw; Mon, 9 Oct 2023 02:21:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEI7G7F3V8gKvwWsL9SBN9R2sovGceubakVWHMsECSXAk+ALkRCZBrlXjTqFNjf1AgZfwcb X-Received: by 2002:a05:620a:2683:b0:76a:eeb6:dd7b with SMTP id c3-20020a05620a268300b0076aeeb6dd7bmr17458014qkp.75.1696843310231; Mon, 09 Oct 2023 02:21:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696843310; cv=none; d=google.com; s=arc-20160816; b=GBrtqx7GkiwzxH//Z0VQs0vsz+eBqv/+3iuuEgeoMEcZTQIxNyUbFHooaFUbBGGPPU +TtJFNnswbyeE0x22nwsFZxxuD3rAKNdZN5TDNZfRWCFILxkHLDU5M4mRuMDtIz8+3Xp /u839JUm9ZmMlAO807cNQw5KXfwR6rBAzC4paPrXuQzUHAglsrgV2Z32hNPhcE7hAR9M lqrcLijvFnSnCO02zSYmhNlddJqT+qF/uXNCEV8oSbNxmckqWqeuzUHyo+ZUwMiShGgV /JVqJ340tFfk/PcVhyrqTl8SzDgfE/aB0aP28febaPdAysmAlV3JeT27nxh+oPbcX6Eb K4wA== 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:message-id:date:subject:cc:to:from:dkim-signature; bh=DkY2Js0F8feI+eDewmK7f1DkRmkJTMBbTxH6PGU0fdY=; fh=ppI2hBCiQMuPcM2c/JHuH4039xaQXO8Q+Lp4IpmeJzU=; b=cjImIG7nZKMvHPw6j1f40ZBKtcBIDl8jSpb5ZsO375YlTR2HoM6IVbgn6PM7jOSBXF WSLLej+4iEkLdy/8TdD/aCKsX1z5+o78l3QymYRsr9YUtMV1oY8Adxeb7MorwjWq/Y/o I++B9pyL/o3ghhxpgNWuSMMBwKp80J49AOny46nIYhSTgfmgzM8sxknCrXiY6f+wk6Hy s6AgPvcplNIRNpYnA4JKPdiI6HQ6hBiUnfGzF0ug69OKgqcswRKMexNNEAtQAyg1MLRJ jm1yHmez5NJYF1L4zB76/+VyPQT8uymHdMjs7vpnQqNQApUR3Uf1K7X++yip/ILzR1ot NRww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="L/N9Aiv3"; 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 az20-20020a05620a171400b0077590e5ec7esi6087835qkb.361.2023.10.09.02.21.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 02:21:50 -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="L/N9Aiv3"; 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 1qpmSI-0007sh-4t; Mon, 09 Oct 2023 05:21:38 -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 1qpmSE-0007rl-9Y for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:21:35 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qpmSC-00018s-Lm for qemu-devel@nongnu.org; Mon, 09 Oct 2023 05:21:34 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5334f9a56f6so7360990a12.3 for ; Mon, 09 Oct 2023 02:21:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696843290; x=1697448090; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=DkY2Js0F8feI+eDewmK7f1DkRmkJTMBbTxH6PGU0fdY=; b=L/N9Aiv3JaGMHuzrKQZs7uMmh4T3z+QjmlrmJW/WDI36DjDb6bzj52q6eR+KZ/iGBw 2xaWu3qPV4E2hLpDbheHmBaqHYuaWNgyvzQWk8RbUyd5ybnz7ZbbERrkm7x/LpMeUSjc TmDEOk7Xpn7AkAX41cxlLFu6yYGijkl6b89kfzkWXIqiVQNMuY/T+H2o7pZC4Ec83n5C 8vhiHGpUhSguuHTARmRWSfkI9mjSp1/er3GKkv2WxL/lbHGJEpvMLzqex9xuwh6eyxYq g5Y3zj6/y0g2AuC2SPwmiIMirV8oKijiH9iVBBXw8eOYF1UMFdnTYEAuCtNojA+hUDMc nFqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696843290; x=1697448090; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DkY2Js0F8feI+eDewmK7f1DkRmkJTMBbTxH6PGU0fdY=; b=ReIT5euKJemBJ91FLBVLomlvW5XFVTna80VFFOHvXA1hfRRFojURmTTJZ0z8/mSpaz h0L5qRswSGAXxLig5NEGNhPkLL1QQXFZP/P2qaTTM58sXekf1AsQU4EDjPrj9+B1JyFT 143E+1R9b47G5Rcbpz38TUp3KPw10ANximZArXfFeSQUjkeZQf5KV18LIwU8PeiJifes TBBPa9q2fGIrMqGSNeS8FpjymFilyLs0Aj8yLWHInJt4Qs7Ngqr3VapM2D4gHvmv7A5c sso3vo3IJ1ptN12AvhCR9r7HvJ5Qww/kUTNO9AqbaZWzRnKe1LDfoLsyFur0YOw0RJXc NVOA== X-Gm-Message-State: AOJu0YwkjTaVSh530BVBZGqNO+NlNOj+AbBy+/t1t/BWpwnZUoryEU5v Vy2mNHdHjalVwDLtGxqzVWj1TiCZIv82Lg4fpIU= X-Received: by 2002:aa7:d9d9:0:b0:538:8949:9e02 with SMTP id v25-20020aa7d9d9000000b0053889499e02mr13807053eds.30.1696843290015; Mon, 09 Oct 2023 02:21:30 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id z21-20020aa7d415000000b005361a6da384sm5895820edq.19.2023.10.09.02.21.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 02:21:29 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Corey Minyard , Jiaxun Yang , BALATON Zoltan Subject: [PATCH] hw/mips/malta: Use sdram_type enum from 'hw/i2c/smbus_eeprom.h' Date: Mon, 9 Oct 2023 11:21:27 +0200 Message-ID: <20231009092127.49778-1-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=philmd@linaro.org; helo=mail-ed1-x52e.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 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 --- 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;