lkml.org 
[lkml]   [2012]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 3/4] zsmalloc use zs_handle instead of void *
    On 05/03/2012 08:32 AM, Nitin Gupta wrote:

    > On 5/3/12 2:40 AM, Minchan Kim wrote:
    >> We should use zs_handle instead of void * to avoid any
    >> confusion. Without this, users may just treat zs_malloc return value as
    >> a pointer and try to deference it.
    >>
    >> Cc: Dan Magenheimer<dan.magenheimer@oracle.com>
    >> Cc: Konrad Rzeszutek Wilk<konrad.wilk@oracle.com>
    >> Signed-off-by: Minchan Kim<minchan@kernel.org>
    >> ---
    >> drivers/staging/zcache/zcache-main.c | 8 ++++----
    >> drivers/staging/zram/zram_drv.c | 8 ++++----
    >> drivers/staging/zram/zram_drv.h | 2 +-
    >> drivers/staging/zsmalloc/zsmalloc-main.c | 28
    >> ++++++++++++++--------------
    >> drivers/staging/zsmalloc/zsmalloc.h | 15 +++++++++++----
    >> 5 files changed, 34 insertions(+), 27 deletions(-)
    >
    > This was a long pending change. Thanks!


    The reason I hadn't done it before is that it introduces a checkpatch
    warning:

    WARNING: do not add new typedefs
    #303: FILE: drivers/staging/zsmalloc/zsmalloc.h:19:
    +typedef void * zs_handle;

    In addition this particular patch has a checkpatch error:

    ERROR: "foo * bar" should be "foo *bar"
    #303: FILE: drivers/staging/zsmalloc/zsmalloc.h:19:
    +typedef void * zs_handle;

    --
    Seth



    \
     
     \ /
      Last update: 2012-05-03 17:41    [W:0.024 / U:155.876 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site