LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: torvalds@osdl.org, akpm@osdl.org, linux-kernel@vger.kernel.org,
	linux-arch@vger.kernel.org
Subject: Re: On spreading atomic_t initialization
Date: Tue, 28 Oct 2008 09:54:58 -0600	[thread overview]
Message-ID: <20081028155457.GC12792@parisc-linux.org> (raw)
In-Reply-To: <20081028152943.GA20989@x200.localdomain>

On Tue, Oct 28, 2008 at 06:29:43PM +0300, Alexey Dobriyan wrote:
> I wrote stupid runtime checker to look for atomic_t uninitialized usage
> and the amount of screaming in logs is surprisingly very big.
> 
> So the question: is there really really an arch for which setting atomic_t
> by hand (kzalloc) is not equivalent to atomic_set()?

No.  atomic_t is 32-bit, and requires all 32 bits to be usable by the
callers.  It's kind of like NULL might not theoretically be represented
by a bit-pattern of all zeroes.  In practise, it always is.  I don't
see the value in your checker, sorry.

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  reply	other threads:[~2008-10-28 15:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-28 15:29 Alexey Dobriyan
2008-10-28 15:54 ` Matthew Wilcox [this message]
2008-10-28 16:16 ` Linus Torvalds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081028155457.GC12792@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --subject='Re: On spreading atomic_t initialization' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).