diff options
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/cpu/jtag-console.c | 2 | ||||
-rw-r--r-- | arch/blackfin/lib/string.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/arch/blackfin/cpu/jtag-console.c b/arch/blackfin/cpu/jtag-console.c index b8be3182a0..b0abeda90a 100644 --- a/arch/blackfin/cpu/jtag-console.c +++ b/arch/blackfin/cpu/jtag-console.c @@ -168,7 +168,7 @@ static int jtag_getc(struct stdio_dev *dev) inbound_len = emudat; } else { /* store the bytes */ - leftovers_len = min(4, inbound_len); + leftovers_len = min((size_t)4, inbound_len); inbound_len -= leftovers_len; leftovers = emudat; } diff --git a/arch/blackfin/lib/string.c b/arch/blackfin/lib/string.c index f0a061b47a..211df7b430 100644 --- a/arch/blackfin/lib/string.c +++ b/arch/blackfin/lib/string.c @@ -121,7 +121,7 @@ static void dma_calc_size(unsigned long ldst, unsigned long lsrc, size_t count, *dshift = WDSIZE_P; #endif - *bpos = min(limit, ffs(ldst | lsrc | count)) - 1; + *bpos = min(limit, (unsigned long)ffs(ldst | lsrc | count)) - 1; } /* This version misbehaves for count values of 0 and 2^16+. @@ -157,7 +157,7 @@ void dma_memcpy_nocache(void *dst, const void *src, size_t count) #ifdef PSIZE /* The max memory DMA peripheral transfer size is 4 bytes. */ - dsize |= min(2, bpos) << PSIZE_P; + dsize |= min(2UL, bpos) << PSIZE_P; #endif /* Copy sram functions from sdram to sram */ |