Skip to content

Commit 2558cd8

Browse files
author
Michal Simek
committed
microblaze: Use unsigned type for limit comparison in cache.c
The patch removes warnings: arch/microblaze/kernel/cpu/cache.c:146:14: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Michal Simek <michal.simek@xilinx.com>
1 parent bdb96e3 commit 2558cd8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎arch/microblaze/kernel/cpu/cache.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,10 @@ do { \
140140
/* It is used only first parameter for OP - for wic, wdc */
141141
#define CACHE_RANGE_LOOP_1(start, end, line_length, op) \
142142
do { \
143-
int volatile temp = 0; \
144-
int align = ~(line_length - 1); \
143+
unsigned int volatile temp = 0; \
144+
unsigned int align = ~(line_length - 1); \
145145
end = ((end & align) == end) ? end - line_length : end & align; \
146-
WARN_ON(end - start < 0); \
146+
WARN_ON(end < start); \
147147
\
148148
__asm__ __volatile__ (" 1: " #op " %1, r0;" \
149149
"cmpu %0, %1, %2;" \

0 commit comments

Comments
 (0)