dm cache: simplify the return expression of load_mapping()
[linux-2.6-microblaze.git] / drivers / md / dm-cache-target.c
index 9644424..541c450 100644 (file)
@@ -712,10 +712,6 @@ static bool block_size_is_power_of_two(struct cache *cache)
        return cache->sectors_per_block_shift >= 0;
 }
 
-/* gcc on ARM generates spurious references to __udivdi3 and __umoddi3 */
-#if defined(CONFIG_ARM) && __GNUC__ == 4 && __GNUC_MINOR__ <= 6
-__always_inline
-#endif
 static dm_block_t block_div(dm_block_t b, uint32_t n)
 {
        do_div(b, n);
@@ -2844,7 +2840,6 @@ static void cache_postsuspend(struct dm_target *ti)
 static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock,
                        bool dirty, uint32_t hint, bool hint_valid)
 {
-       int r;
        struct cache *cache = context;
 
        if (dirty) {
@@ -2853,11 +2848,7 @@ static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock,
        } else
                clear_bit(from_cblock(cblock), cache->dirty_bitset);
 
-       r = policy_load_mapping(cache->policy, oblock, cblock, dirty, hint, hint_valid);
-       if (r)
-               return r;
-
-       return 0;
+       return policy_load_mapping(cache->policy, oblock, cblock, dirty, hint, hint_valid);
 }
 
 /*