lkml.org 
[lkml]   [2003]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[TRIVIAL] [2.6 PATCH] hlist constification
    Date
    From:  Mitchell Blank Jr <mitch@sfgoth.com>

    I posted a patch to consify 3 inline functions in <linux/list.h> to lkml
    on 9/1 but it looks like it slipped through the cracks. Looking at your
    trivial tree it seems that Inaky Perez-Gonzalez already submitted a patch
    to constify list_empty(). Here is a patch to do the other two. Should
    be non-controversial.

    Patch is versus your current 2.6.0-test5-bk2 trivial tree.

    -Mitch


    --- trivial-2.6.0-test6-bk6/include/linux/list.h.orig 2003-10-05 16:50:48.000000000 +1000
    +++ trivial-2.6.0-test6-bk6/include/linux/list.h 2003-10-05 16:50:48.000000000 +1000
    @@ -421,12 +421,12 @@
    #define INIT_HLIST_HEAD(ptr) ((ptr)->first = NULL)
    #define INIT_HLIST_NODE(ptr) ((ptr)->next = NULL, (ptr)->pprev = NULL)

    -static __inline__ int hlist_unhashed(struct hlist_node *h)
    +static __inline__ int hlist_unhashed(const struct hlist_node *h)
    {
    return !h->pprev;
    }

    -static __inline__ int hlist_empty(struct hlist_head *h)
    +static __inline__ int hlist_empty(const struct hlist_head *h)
    {
    return !h->first;
    }
    --
    What is this? http://www.kernel.org/pub/linux/kernel/people/rusty/trivial/
    Don't blame me: the Monkey is driving
    File: Mitchell Blank Jr <mitch@sfgoth.com>: [2.6 PATCH] hlist constification
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 13:49    [W:3.763 / U:0.180 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site