summaryrefslogtreecommitdiffstats
path: root/sys/dev/sym
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2005-12-04 02:12:43 +0000
committerru <ru@FreeBSD.org>2005-12-04 02:12:43 +0000
commit522e9c2b7b1ceeb0bc6a2edb3ee62885d8106ac3 (patch)
treef3ce65232b57836f87c8dc38dfcc8fbb95679c5d /sys/dev/sym
parent7b7fd248389b497235a0e9dcef2aff317880a15b (diff)
downloadFreeBSD-src-522e9c2b7b1ceeb0bc6a2edb3ee62885d8106ac3.zip
FreeBSD-src-522e9c2b7b1ceeb0bc6a2edb3ee62885d8106ac3.tar.gz
Fix -Wundef.
Diffstat (limited to 'sys/dev/sym')
-rw-r--r--sys/dev/sym/sym_hipd.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/dev/sym/sym_hipd.c b/sys/dev/sym/sym_hipd.c
index e8f10f0..d8b1d73 100644
--- a/sys/dev/sym/sym_hipd.c
+++ b/sys/dev/sym/sym_hipd.c
@@ -111,6 +111,10 @@ typedef u_int8_t u8;
typedef u_int16_t u16;
typedef u_int32_t u32;
+#ifndef BITS_PER_LONG
+#define BITS_PER_LONG (sizeof(long) * 8)
+#endif
+
/*
* From 'cam.error_recovery_diffs.20010313.context' patch.
*/
@@ -2641,12 +2645,12 @@ static int sym_prepare_setting(hcb_p np, struct sym_nvram *nvram)
/*
* 64 bit addressing (895A/896/1010) ?
*/
- if (np->features & FE_DAC)
-#if BITS_PER_LONG > 32
- np->rv_ccntl1 |= (XTIMOD | EXTIBMV);
-#else
- np->rv_ccntl1 |= (DDAC);
-#endif
+ if (np->features & FE_DAC) {
+ if (BITS_PER_LONG > 32)
+ np->rv_ccntl1 |= (XTIMOD | EXTIBMV);
+ else
+ np->rv_ccntl1 |= (DDAC);
+ }
/*
* Phase mismatch handled by SCRIPTS (895A/896/1010) ?
@@ -8902,9 +8906,8 @@ sym_pci_attach(device_t dev)
if (np->features & FE_RAM8K) {
np->ram_ws = 8192;
np->scriptb_ba = np->scripta_ba + 4096;
-#if BITS_PER_LONG > 32
+ if (BITS_PER_LONG > 32)
np->scr_ram_seg = cpu_to_scr(np->scripta_ba >> 32);
-#endif
}
else
np->ram_ws = 4096;
OpenPOWER on IntegriCloud