Changeset bdb2899 in rtems


Ignore:
Timestamp:
Jan 11, 2000, 4:41:57 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
0dd1d44
Parents:
7558283
Message:

Patch from Emmanuel Raguet <raguet@…> to correct macro
expansion. These macros were modified to correct warnings and
obviously needed more parentheses to expand correctly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/libchip/network/dec21140.c

    r7558283 rbdb2899  
    170170
    171171#if defined(__PPC)
    172 #define phys_to_bus(address) ((unsigned int)(address) + PREP_PCI_DRAM_OFFSET)
    173 #define bus_to_phys(address) ((unsigned int)(address) - PREP_PCI_DRAM_OFFSET)
     172#define phys_to_bus(address) ((unsigned int)((address)) + PREP_PCI_DRAM_OFFSET)
     173#define bus_to_phys(address) ((unsigned int)((address)) - PREP_PCI_DRAM_OFFSET)
    174174#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PPC_CACHE_ALIGNMENT
    175175#else
    176 #define phys_to_bus(address) (unsigned int) address
    177 #define bus_to_phys(address) (unsigned int) address
     176#define phys_to_bus(address) ((unsigned int) ((address)))
     177#define bus_to_phys(address) ((unsigned int) ((address)))
    178178#define delay_in_bus_cycles(cycle) Wait_X_ms( cycle/100 )
    179179#define CPU_CACHE_ALIGNMENT_FOR_BUFFER PG_SIZE
Note: See TracChangeset for help on using the changeset viewer.