Merge tag 'gpio-fixes-for-v5.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / fs / squashfs / file.c
index 7b11283..89d4929 100644 (file)
@@ -211,11 +211,11 @@ failure:
  * If the skip factor is limited in this way then the file will use multiple
  * slots.
  */
-static inline int calculate_skip(int blocks)
+static inline int calculate_skip(u64 blocks)
 {
-       int skip = blocks / ((SQUASHFS_META_ENTRIES + 1)
+       u64 skip = blocks / ((SQUASHFS_META_ENTRIES + 1)
                 * SQUASHFS_META_INDEXES);
-       return min(SQUASHFS_CACHED_BLKS - 1, skip + 1);
+       return min((u64) SQUASHFS_CACHED_BLKS - 1, skip + 1);
 }