summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--c/src/libchip/network/dec21140.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/c/src/libchip/network/dec21140.c b/c/src/libchip/network/dec21140.c
index 296c0744a1..487ffdff43 100644
--- a/c/src/libchip/network/dec21140.c
+++ b/c/src/libchip/network/dec21140.c
@@ -169,12 +169,12 @@ struct MD {
#define START_TRANSMIT_EVENT RTEMS_EVENT_2
#if defined(__PPC)
-#define phys_to_bus(address) ((unsigned int)(address) + PREP_PCI_DRAM_OFFSET)
-#define bus_to_phys(address) ((unsigned int)(address) - PREP_PCI_DRAM_OFFSET)
+#define phys_to_bus(address) ((unsigned int)((address)) + PREP_PCI_DRAM_OFFSET)
+#define bus_to_phys(address) ((unsigned int)((address)) - PREP_PCI_DRAM_OFFSET)
#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PPC_CACHE_ALIGNMENT
#else
-#define phys_to_bus(address) (unsigned int) address
-#define bus_to_phys(address) (unsigned int) address
+#define phys_to_bus(address) ((unsigned int) ((address)))
+#define bus_to_phys(address) ((unsigned int) ((address)))
#define delay_in_bus_cycles(cycle) Wait_X_ms( cycle/100 )
#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE