diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-11 16:41:57 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2000-01-11 16:41:57 +0000 |
commit | bdb289988a88fd61c2bbccb187465b5ba6445f7e (patch) | |
tree | e8dc72924212296e4469e461234f76e51c6c0ec9 /c/src/lib | |
parent | Fixed spacing. (diff) | |
download | rtems-bdb289988a88fd61c2bbccb187465b5ba6445f7e.tar.bz2 |
Patch from Emmanuel Raguet <raguet@crf.canon.fr> to correct macro
expansion. These macros were modified to correct warnings and
obviously needed more parentheses to expand correctly.
Diffstat (limited to '')
-rw-r--r-- | c/src/libchip/network/dec21140.c | 8 |
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 |