[patch] fix duplicate case value in ichsmb_pci.c

From: Pawel Worach <pawel.worach_at_gmail.com>
Date: Tue, 9 Aug 2011 22:37:59 +0200
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)
_at__at_ -67,7 +67,6 _at__at_
 #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
_at__at_ -170,7 +169,6 _at__at_
 	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
Received on Tue Aug 09 2011 - 18:38:05 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:16 UTC