Messages in this thread | | | Date | Thu, 8 Jan 2009 17:10:48 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH 3/3] mmiotrace: count events lost due to not recording |
| |
On Thu, 08 Jan 2009 19:27:50 -0500 Steven Rostedt <rostedt@goodmis.org> wrote:
> +static atomic_t dropped_count;
Formally, this should be
static atomic_t dropped_count = ATOMIC_INIT(0);
but no atomic_t implementations need that, and I'm sure that if one turns up wchih _does_ need it (say, it has a spinlock inside its atomic_t) then the kernel would break all over the place.
So perhaps we should formally state that the all-zeroes pattern is an acceptable way of initialising an atomic_t.
In which case these:
y:/usr/src/linux-2.6.28> grep -r "atomic_t.*=.*ATOMIC_INIT" . | wc -l 110
become cleanup fodder.
| |