lkml.org 
[lkml]   [2018]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 02/12] blk: use for_each_if
    Date
    Makes the macros resilient against if {} else {} blocks right
    afterwards.

    Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Shaohua Li <shli@fb.com>
    Cc: Kate Stewart <kstewart@linuxfoundation.org>
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: Joseph Qi <joseph.qi@linux.alibaba.com>
    Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
    Cc: Arnd Bergmann <arnd@arndb.de>
    ---
    include/linux/blk-cgroup.h | 4 ++--
    1 file changed, 2 insertions(+), 2 deletions(-)

    diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
    index 6c666fd7de3c..f1c3afe42c26 100644
    --- a/include/linux/blk-cgroup.h
    +++ b/include/linux/blk-cgroup.h
    @@ -382,7 +382,7 @@ static inline void blkg_put(struct blkcg_gq *blkg)
    */
    #define blkg_for_each_descendant_pre(d_blkg, pos_css, p_blkg) \
    css_for_each_descendant_pre((pos_css), &(p_blkg)->blkcg->css) \
    - if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \
    + for_each_if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \
    (p_blkg)->q, false)))

    /**
    @@ -397,7 +397,7 @@ static inline void blkg_put(struct blkcg_gq *blkg)
    */
    #define blkg_for_each_descendant_post(d_blkg, pos_css, p_blkg) \
    css_for_each_descendant_post((pos_css), &(p_blkg)->blkcg->css) \
    - if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \
    + for_each_if (((d_blkg) = __blkg_lookup(css_to_blkcg(pos_css), \
    (p_blkg)->q, false)))

    /**
    --
    2.18.0
    \
     
     \ /
      Last update: 2018-07-09 10:44    [W:2.705 / U:0.784 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site