aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/slab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 6f8495e2185b..88082ae15736 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1398,7 +1398,7 @@ static void check_poison_obj(kmem_cache_t *cachep, void *objp)
1398 struct slab *slabp = page_get_slab(virt_to_page(objp)); 1398 struct slab *slabp = page_get_slab(virt_to_page(objp));
1399 int objnr; 1399 int objnr;
1400 1400
1401 objnr = (objp - slabp->s_mem) / cachep->objsize; 1401 objnr = (unsigned)(objp - slabp->s_mem) / cachep->objsize;
1402 if (objnr) { 1402 if (objnr) {
1403 objp = slabp->s_mem + (objnr - 1) * cachep->objsize; 1403 objp = slabp->s_mem + (objnr - 1) * cachep->objsize;
1404 realobj = (char *)objp + obj_dbghead(cachep); 1404 realobj = (char *)objp + obj_dbghead(cachep);
@@ -2341,7 +2341,7 @@ static void *cache_free_debugcheck(kmem_cache_t *cachep, void *objp,
2341 if (cachep->flags & SLAB_STORE_USER) 2341 if (cachep->flags & SLAB_STORE_USER)
2342 *dbg_userword(cachep, objp) = caller; 2342 *dbg_userword(cachep, objp) = caller;
2343 2343
2344 objnr = (objp - slabp->s_mem) / cachep->objsize; 2344 objnr = (unsigned)(objp - slabp->s_mem) / cachep->objsize;
2345 2345
2346 BUG_ON(objnr >= cachep->num); 2346 BUG_ON(objnr >= cachep->num);
2347 BUG_ON(objp != slabp->s_mem + objnr * cachep->objsize); 2347 BUG_ON(objp != slabp->s_mem + objnr * cachep->objsize);
@@ -2699,7 +2699,7 @@ static void free_block(kmem_cache_t *cachep, void **objpp, int nr_objects,
2699 slabp = page_get_slab(virt_to_page(objp)); 2699 slabp = page_get_slab(virt_to_page(objp));
2700 l3 = cachep->nodelists[node]; 2700 l3 = cachep->nodelists[node];
2701 list_del(&slabp->list); 2701 list_del(&slabp->list);
2702 objnr = (objp - slabp->s_mem) / cachep->objsize; 2702 objnr = (unsigned)(objp - slabp->s_mem) / cachep->objsize;
2703 check_spinlock_acquired_node(cachep, node); 2703 check_spinlock_acquired_node(cachep, node);
2704 check_slabp(cachep, slabp); 2704 check_slabp(cachep, slabp);
2705 2705