Skip to content

Commit

Permalink
[ARM] integrator: parenthesize __virt_to_bus/__bus_to_virt argument
Browse files Browse the repository at this point in the history
Macro arguments should be parenthesized to avoid unexpected side
effects.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Nov 30, 2008
1 parent 74343ee commit cd32a48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-integrator/include/mach/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define PHYS_OFFSET UL(0x00000000)

#define BUS_OFFSET UL(0x80000000)
#define __virt_to_bus(x) (x - PAGE_OFFSET + BUS_OFFSET)
#define __bus_to_virt(x) (x - BUS_OFFSET + PAGE_OFFSET)
#define __virt_to_bus(x) ((x) - PAGE_OFFSET + BUS_OFFSET)
#define __bus_to_virt(x) ((x) - BUS_OFFSET + PAGE_OFFSET)

#endif

0 comments on commit cd32a48

Please sign in to comment.