• Rasmus Villemoes's avatar
    soc: fsl: qe: avoid IS_ERR_VALUE in ucc_slow.c · 611780a6
    Rasmus Villemoes authored
    When trying to build this for a 64-bit platform, one gets warnings
    from using IS_ERR_VALUE on something which is not sizeof(long).
    
    Instead, change the various *_offset fields to store a signed integer,
    and simply check for a negative return from qe_muram_alloc(). Since
    qe_muram_free() now accepts and ignores a negative argument, we only
    need to make sure these fields are initialized with -1, and we can
    just unconditionally call qe_muram_free() in ucc_slow_free().
    
    Note that the error case for us_pram_offset failed to set that field
    to 0 (which, as noted earlier, is anyway a bogus sentinel value).
    Reviewed-by: default avatarTimur Tabi <timur@kernel.org>
    Signed-off-by: default avatarRasmus Villemoes <linux@rasmusvillemoes.dk>
    Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
    611780a6
ucc_slow.c 9.55 KB