lkml.org 
[lkml]   [2008]   [Nov]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH][RESEND] C99 initializers for DEFINE_RATELIMIT_STATE()
    Date
    A few months ago (July 25, 2008) the printk ratelimiting code has been
    rewritten. This patch added a.o. the new macro DEFINE_RATELIMIT_STATE(). The
    patch below converts the initializers in that macro to C99 style.

    For more information about the printk ratelimiting rewrite, see also commit
    717115e1a5856b57af0f71e1df7149108294fc10
    (http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.27.y.git;a=commit;h=717115e1a5856b57af0f71e1df7149108294fc10).

    Impact: cleanup, no functionality changed.

    Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>

    diff --git a/include/linux/ratelimit.h b/include/linux/ratelimit.h
    index 18a5b9b..61cc908 100644
    --- a/include/linux/ratelimit.h
    +++ b/include/linux/ratelimit.h
    @@ -13,8 +13,9 @@ struct ratelimit_state {
    unsigned long begin;
    };

    -#define DEFINE_RATELIMIT_STATE(name, interval, burst) \
    - struct ratelimit_state name = {interval, burst,}
    +#define DEFINE_RATELIMIT_STATE(name, interval_value, burst_value) \
    + struct ratelimit_state name = \
    + { .interval = (interval_value), .burst = (burst_value) }

    extern int __ratelimit(struct ratelimit_state *rs);

    -------------------------------------------------------

    \
     
     \ /
      Last update: 2008-11-04 21:17    [W:0.022 / U:58.768 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site