diff options
author | Rasmus Villemoes <linux@rasmusvillemoes.dk> | 2019-11-28 15:55:49 +0100 |
---|---|---|
committer | Li Yang <leoyang.li@nxp.com> | 2019-12-09 20:57:45 +0100 |
commit | be2e9415f8b366abbe786b703436bfedf2012c21 (patch) | |
tree | dffd14b627e76666d5e14d619131b1a819e2bcbc /drivers/net/wan/fsl_ucc_hdlc.h | |
parent | soc: fsl: qe: avoid IS_ERR_VALUE in ucc_fast.c (diff) | |
download | linux-be2e9415f8b366abbe786b703436bfedf2012c21.tar.xz linux-be2e9415f8b366abbe786b703436bfedf2012c21.zip |
net/wan/fsl_ucc_hdlc: avoid use of IS_ERR_VALUE()
When building this on a 64-bit platform gcc rightly warns that the
error checking is broken (-ENOMEM stored in an u32 does not compare
greater than (unsigned long)-MAX_ERRNO). Instead, now that
qe_muram_alloc() returns s32, use that type to store the return value
and use standard kernel style "ret < 0".
Reviewed-by: Timur Tabi <timur@kernel.org>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/net/wan/fsl_ucc_hdlc.h')
-rw-r--r-- | drivers/net/wan/fsl_ucc_hdlc.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wan/fsl_ucc_hdlc.h b/drivers/net/wan/fsl_ucc_hdlc.h index 8b3507ae1781..71d5ad0a7b98 100644 --- a/drivers/net/wan/fsl_ucc_hdlc.h +++ b/drivers/net/wan/fsl_ucc_hdlc.h @@ -98,7 +98,7 @@ struct ucc_hdlc_private { unsigned short tx_ring_size; unsigned short rx_ring_size; - u32 ucc_pram_offset; + s32 ucc_pram_offset; unsigned short encoding; unsigned short parity; |