lkml.org 
[lkml]   [2012]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCHv2 1/2] sched: Fixed cpupri_init stub signature; switched from macros to inlines.
    Date
    Fixed the cpupri_init stub in cpupri.h so it takes one argument
    instead of none. At the same time, changed the cpupri stubs from
    macros to inlines.

    Signed-off-by: Trevor Brandt <tjbrandt@gmail.com>
    ---
    kernel/sched/cpupri.h | 7 +++++--
    1 file changed, 5 insertions(+), 2 deletions(-)

    diff --git a/kernel/sched/cpupri.h b/kernel/sched/cpupri.h
    index f6d7561..fd7914c 100644
    --- a/kernel/sched/cpupri.h
    +++ b/kernel/sched/cpupri.h
    @@ -27,8 +27,11 @@ void cpupri_set(struct cpupri *cp, int cpu, int pri);
    int cpupri_init(struct cpupri *cp);
    void cpupri_cleanup(struct cpupri *cp);
    #else
    -#define cpupri_set(cp, cpu, pri) do { } while (0)
    -#define cpupri_init() do { } while (0)
    +static inline void cpupri_set(struct cpupri *cp, int cpu, int pri) { }
    +static inline int cpupri_init(struct cpupri *cp)
    +{
    + return 0;
    +}
    #endif

    #endif /* _LINUX_CPUPRI_H */
    --
    1.7.9.5


    \
     
     \ /
      Last update: 2012-08-20 17:41    [W:0.034 / U:0.108 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site