lkml.org 
[lkml]   [2015]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH -v2 6/8] jump_label: Add a new static_key interface
    On Tue, 4 Aug 2015 05:37:33 +0200
    Borislav Petkov <bp@alien8.de> wrote:

    > On Mon, Aug 03, 2015 at 05:57:57PM -0400, Steven Rostedt wrote:
    > > That's implementation details, not a general concept that users will
    > > need to know about.
    >
    > Why?
    >
    > It is a branch, regardless of which insn is used on which arch - it is
    > either active and you *branch* to that code or *inactive* and you don't.
    > So now it is actually what it should've been from the beginning...

    I just don't like the inconsistency of the initialization and the
    setting.

    Either have:

    DEFINE_STATIC_KEY_TRUE()
    DEFINE_STATIC_KEY_FALSE()

    and

    static_branch_set_true()
    static_branch_set_false()


    or have:

    DEFINE_STATIC_KEY_ENABLED()
    DEFINE_STATIC_KEY_DISABLED()

    and

    static_branch_enable()
    static_branch_disable()


    But having the DEFINE_STATIC_KEY_TRUE() and static_branch_enable() is
    confusing, as enable does not mean "make true"!

    This may seem as bike shedding, but terminology *is* important, and
    being inconsistent just makes it more probable to have bugs.

    -- Steve

    >
    > I realize simplifying the terminology around those jump labels/static
    > branches things comes kinda unnatural now.
    >



    \
     
     \ /
      Last update: 2015-08-04 14:21    [W:3.116 / U:0.240 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site