• Alex Elder's avatar
    net: ipa: avoid 64-bit modulus · 437c78f9
    Alex Elder authored
    It is possible for a 32 bit x86 build to use a 64 bit DMA address.
    
    There are two remaining spots where the IPA driver does a modulo
    operation to check alignment of a DMA address, and under certain
    conditions this can lead to a build error on i386 (at least).
    
    The alignment checks we're doing are for power-of-2 values, and this
    means the lower 32 bits of the DMA address can be used.  This ensures
    both operands to the modulo operator are 32 bits wide.
    Reported-by: default avatarRandy Dunlap <rdunlap@infradead.org>
    Signed-off-by: default avatarAlex Elder <elder@linaro.org>
    Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    437c78f9
ipa_table.c 21 KB