Changeset c342e88 in mainline


Ignore:
Timestamp:
2016-05-13T12:44:22Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
11af58b
Parents:
9260102
Message:

ia64: Make the PA2KA() and KA2PA() macros array friendly

This supressess index out of array bounds warnings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/include/arch/mm/page.h

    r9260102 rc342e88  
    5959#define REGION_REGISTERS  8
    6060
    61 #define KA2PA(x)  ((uintptr_t) ((x) - (VRN_KERNEL << VRN_SHIFT)))
    62 #define PA2KA(x)  ((uintptr_t) ((x) + (VRN_KERNEL << VRN_SHIFT)))
     61#define KA2PA(x)  (((uintptr_t) (x)) - (VRN_KERNEL << VRN_SHIFT))
     62#define PA2KA(x)  (((uintptr_t) (x)) + (VRN_KERNEL << VRN_SHIFT))
    6363
    6464#define VHPT_WIDTH  20  /* 1M */
Note: See TracChangeset for help on using the changeset viewer.