Merge tag 'for-linus-4.4-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
[cascardo/linux.git] / drivers / mtd / ubi / fastmap.c
index 4aa2fd8..263b439 100644 (file)
@@ -450,7 +450,7 @@ static void unmap_peb(struct ubi_attach_info *ai, int pnum)
  * < 0 indicates an internal error.
  */
 static int scan_pool(struct ubi_device *ubi, struct ubi_attach_info *ai,
-                    int *pebs, int pool_size, unsigned long long *max_sqnum,
+                    __be32 *pebs, int pool_size, unsigned long long *max_sqnum,
                     struct list_head *free)
 {
        struct ubi_vid_hdr *vh;
@@ -775,7 +775,7 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
                for (j = 0; j < be32_to_cpu(fm_eba->reserved_pebs); j++) {
                        int pnum = be32_to_cpu(fm_eba->pnum[j]);
 
-                       if ((int)be32_to_cpu(fm_eba->pnum[j]) < 0)
+                       if (pnum < 0)
                                continue;
 
                        aeb = NULL;