summaryrefslogtreecommitdiff
path: root/src/northbridge/amd/amdht
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2010-03-30 09:56:35 +0000
committerStefan Reinauer <stepan@openbios.org>2010-03-30 09:56:35 +0000
commit8b547b19800ab85c97103c87fedbba7512add7d6 (patch)
treedca2f164b7e8ce106b57e6e0ab6eeaa15c72abbb /src/northbridge/amd/amdht
parent9b70cb624387999787683bd5279f11f922debf7e (diff)
reduce warnings in MCP55 and Fam10 code
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5325 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/northbridge/amd/amdht')
-rw-r--r--src/northbridge/amd/amdht/h3ncmn.c32
1 files changed, 14 insertions, 18 deletions
diff --git a/src/northbridge/amd/amdht/h3ncmn.c b/src/northbridge/amd/amdht/h3ncmn.c
index 5b038a3a58..f4696b6daf 100644
--- a/src/northbridge/amd/amdht/h3ncmn.c
+++ b/src/northbridge/amd/amdht/h3ncmn.c
@@ -1109,16 +1109,14 @@ void ht1SetCFGAddrMap(u8 cfgMapIndex, u8 secBus, u8 subBus, u8 targetNode, u8 ta
*/
u8 convertBitsToWidth(u8 value, cNorthBridge *nb)
{
- if (value == 1) {
- return 16;
- } else if (value == 0) {
- return 8;
- } else if (value == 5) {
- return 4;
- } else if (value == 4) {
- return 2;
+ switch(value) {
+ case 1: return 16;
+ case 0: return 8;
+ case 5: return 4;
+ case 4: return 2;
+ default: STOP_HERE; /* This is an error internal condition */
}
- STOP_HERE; /* This is an error internal condition */
+ return 0; // shut up GCC.
}
/**----------------------------------------------------------------------------------------
@@ -1138,16 +1136,14 @@ u8 convertBitsToWidth(u8 value, cNorthBridge *nb)
*/
u8 convertWidthToBits(u8 value, cNorthBridge *nb)
{
- if (value == 16) {
- return 1;
- } else if (value == 8) {
- return 0;
- } else if (value == 4) {
- return 5;
- } else if (value == 2) {
- return 4;
+ switch (value) {
+ case 16: return 1;
+ case 8: return 0;
+ case 4: return 5;
+ case 2: return 4;
+ default: STOP_HERE; /* This is an internal error condition */
}
- STOP_HERE; /* This is an internal error condition */
+ return 0; // shut up GCC
}
/**----------------------------------------------------------------------------------------