SLUB: Deal with annoying gcc warning on kfree()

gcc 4.2 spits out an annoying warning if one casts a const void *
pointer to a void * pointer. No warning is generated if the
conversion is done through an assignment.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

authored by Christoph Lameter and committed by Christoph Lameter 5bb983b0 0afc2edf

+2 -1
+2 -1
mm/slub.c
··· 2601 2601 void kfree(const void *x) 2602 2602 { 2603 2603 struct page *page; 2604 + void *object = (void *)x; 2604 2605 2605 2606 if (unlikely(ZERO_OR_NULL_PTR(x))) 2606 2607 return; ··· 2611 2610 put_page(page); 2612 2611 return; 2613 2612 } 2614 - slab_free(page->slab, page, (void *)x, __builtin_return_address(0)); 2613 + slab_free(page->slab, page, object, __builtin_return_address(0)); 2615 2614 } 2616 2615 EXPORT_SYMBOL(kfree); 2617 2616