kernel-wide: replace USHORT_MAX, SHORT_MAX and SHORT_MIN with USHRT_MAX, SHRT_MAX and SHRT_MIN
- C99 knows about USHRT_MAX/SHRT_MAX/SHRT_MIN, not USHORT_MAX/SHORT_MAX/SHORT_MIN. - Make SHRT_MIN of type s16, not int, for consistency. [akpm@linux-foundation.org: fix drivers/dma/timb_dma.c] [akpm@linux-foundation.org: fix security/keys/keyring.c] Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
940370fc86
commit
4be929be34
@@ -188,7 +188,7 @@ static void __td_unmap_descs(struct timb_dma_desc *td_desc, bool single)
|
||||
static int td_fill_desc(struct timb_dma_chan *td_chan, u8 *dma_desc,
|
||||
struct scatterlist *sg, bool last)
|
||||
{
|
||||
if (sg_dma_len(sg) > USHORT_MAX) {
|
||||
if (sg_dma_len(sg) > USHRT_MAX) {
|
||||
dev_err(chan2dev(&td_chan->chan), "Too big sg element\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user