OSDN Git Service

hw/mips/malta: Use sdram_type enum from 'hw/i2c/smbus_eeprom.h'
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Mon, 9 Oct 2023 08:21:22 +0000 (10:21 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 19 Oct 2023 21:13:27 +0000 (23:13 +0200)
commit9ce8c6ddd302d23df503e89e03544c5e832b4dc3
treef1cb759b72f782072d21d147150445a58bf90b0f
parent946df4d500888c8ddad580b28fa72b138f106823
hw/mips/malta: Use sdram_type enum from 'hw/i2c/smbus_eeprom.h'

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é <philmd@linaro.org>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20231009092127.49778-1-philmd@linaro.org>
hw/mips/malta.c