lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Nov 2008 09:16:02 -0800
From:	Randy Dunlap <randy.dunlap@...cle.com>
To:	"Bart Van Assche" <bart.vanassche@...il.com>
Cc:	"Linus Torvalds" <torvalds@...ux-foundation.org>,
	"Andrew Morton" <akpm@...ux-foundation.org>,
	"Dave Young" <hidave.darkstar@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH][RESEND] C99 initializers for DEFINE_RATELIMIT_STATE()

On Mon, 10 Nov 2008 13:43:24 +0100 Bart Van Assche wrote:

> Could someone please be so kind to ACK the patch below, NAK it or tell
> me whether I should send the patch below to someone else ?
> 
> Thanks,
> 
> Bart.
> 
> On Tue, Nov 4, 2008 at 9:14 PM, Bart Van Assche
> <bart.vanassche@...il.com> wrote:
> > 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@...il.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);

I thought that Andrew would pick it up.

Nit:  I would put the .interval = ... and .burst = ... on separate lines.

Anyway,
Acked-by: Randy Dunlap <randy.dunlap@...cle.com>

Thanks,
---
~Randy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ