Date: Tue, 9 Aug 2011 22:37:59 +0200 From: Pawel Worach <pawel.worach@gmail.com> To: current@freebsd.org Subject: [patch] fix duplicate case value in ichsmb_pci.c Message-ID: <2090B3FF-F932-4943-99FB-B763400CA57B@gmail.com>
next in thread | raw e-mail | index | archive | help
Hi,
clang trunk has yet another nice error (in this case harmless):
dev/ichsmb/ichsmb_pci.c:183:7: error: duplicate case value '590381190'
case ID_DH89XXCC:
^
dev/ichsmb/ichsmb_pci.c:85:23: note: expanded from:
#define ID_DH89XXCC 0x23308086
^
dev/ichsmb/ichsmb_pci.c:173:7: note: previous case defined here
case ID_PCH_DH89XXCC:
^
dev/ichsmb/ichsmb_pci.c:70:27: note: expanded from:
#define ID_PCH_DH89XXCC 0x23308086
^
1 error generated.
Fix (there is a more specific device_set_desc() for the 0x23308086 controller which is also called ID_DH89XXCC in another case):
Index: sys/dev/ichsmb/ichsmb_pci.c
===================================================================
--- sys/dev/ichsmb/ichsmb_pci.c (revision 224736)
+++ sys/dev/ichsmb/ichsmb_pci.c (working copy)
@@ -67,7 +67,6 @@
#include <dev/ichsmb/ichsmb_reg.h>
/* PCI unique identifiers */
-#define ID_PCH_DH89XXCC 0x23308086
#define ID_82801AA 0x24138086
#define ID_82801AB 0x24238086
#define ID_82801BA 0x24438086
@@ -170,7 +169,6 @@
case ID_82801JI:
device_set_desc(dev, "Intel 82801JI (ICH10) SMBus controller");
break;
- case ID_PCH_DH89XXCC:
case ID_PCH:
device_set_desc(dev, "Intel PCH SMBus controller");
break;
--
Pawel
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2090B3FF-F932-4943-99FB-B763400CA57B>
