lkml.org 
[lkml]   [2009]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[PATCH v4]mempool.c : clean up type-casting twice
    From
    Date

    clean up type-casting twice. "size_t" typedef as "unsigned
    long" in 64-bit system, and "unsigned int" in 32-bit system.

    in v3, remove the space to casts.

    in v4, change the line-length limit for git log.

    Signed-off-by: Figo.zhang <figo1802@gmail.com>
    ---

    mm/mempool.c | 4 ++--
    1 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/mm/mempool.c b/mm/mempool.c
    index a46eb1b..32e75d4 100644
    --- a/mm/mempool.c
    +++ b/mm/mempool.c
    @@ -303,14 +303,14 @@ EXPORT_SYMBOL(mempool_free_slab);
    */
    void *mempool_kmalloc(gfp_t gfp_mask, void *pool_data)
    {
    - size_t size = (size_t)(long)pool_data;
    + size_t size = (size_t)pool_data;
    return kmalloc(size, gfp_mask);
    }
    EXPORT_SYMBOL(mempool_kmalloc);

    void *mempool_kzalloc(gfp_t gfp_mask, void *pool_data)
    {
    - size_t size = (size_t) pool_data;
    + size_t size = (size_t)pool_data;
    return kzalloc(size, gfp_mask);
    }
    EXPORT_SYMBOL(mempool_kzalloc);



    \
     
     \ /
      Last update: 2009-07-05 11:23    [W:0.019 / U:33.440 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site