max_used_pages is defined as atomic_long_t so we need to use unsigned long to keep temporary value for it rather than int which is smaller than unsigned long in a 64 bit system.
Unified · Split
| @@ -528,7 +528,7 @@ out_cleanup: · 527 unmodified lines | |||
| 528 | static inline void update_used_max(struct zram *zram, | 528 | static inline void update_used_max(struct zram *zram, |
| 529 | const unsigned long pages) | 529 | const unsigned long pages) |
| 530 | { | 530 | { |
| 531 | int old_max, cur_max; | 531 | unsigned long old_max, cur_max; |
| 532 | 532 | ||
| 533 | old_max = atomic_long_read(&zram->stats.max_used_pages); | 533 | old_max = atomic_long_read(&zram->stats.max_used_pages); |
| 534 | 534 | ||