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.
This commit is contained in:
Joel Sherrill
2000-01-11 16:41:57 +00:00
parent 75582835c7
commit bdb289988a

View File

@@ -169,12 +169,12 @@ struct MD {
#define START_TRANSMIT_EVENT RTEMS_EVENT_2 #define START_TRANSMIT_EVENT RTEMS_EVENT_2
#if defined(__PPC) #if defined(__PPC)
#define phys_to_bus(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 bus_to_phys(address) ((unsigned int)((address)) - PREP_PCI_DRAM_OFFSET)
#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PPC_CACHE_ALIGNMENT #define CPU_CACHE_ALIGNMENT_FOR_BUFFER PPC_CACHE_ALIGNMENT
#else #else
#define phys_to_bus(address) (unsigned int) address #define phys_to_bus(address) ((unsigned int) ((address)))
#define bus_to_phys(address) (unsigned int) address #define bus_to_phys(address) ((unsigned int) ((address)))
#define delay_in_bus_cycles(cycle) Wait_X_ms( cycle/100 ) #define delay_in_bus_cycles(cycle) Wait_X_ms( cycle/100 )
#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE #define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE