Re: [PATCH 3/3] mmiotrace: count events lost due to not recording
From: Andrew Morton
Date: Thu Jan 08 2009 - 20:11:39 EST
On Thu, 08 Jan 2009 19:27:50 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/