public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Luca Barbieri <luca@luca-barbieri.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/atomic64_test: do not build on non-atomic64 systems
Date: Thu, 21 Oct 2010 15:55:28 -0700	[thread overview]
Message-ID: <20101021155528.b3d6d027.akpm@linux-foundation.org> (raw)
In-Reply-To: <201010211823.38287.vapier@gentoo.org>

On Thu, 21 Oct 2010 18:23:37 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> On Thursday, October 21, 2010 18:02:50 Andrew Morton wrote:
> > On Sat, 16 Oct 2010 13:27:15 -0400 Mike Frysinger wrote:
> > > If the arch doesn't provide atomic64 functionality (there are quite a
> > > few), then don't bother trying to build this test.
> > 
> > I don't get it.  If the arch doesn't implement atomic64 then this file
> > will get zillions of build errors, won't it?
> 
> ... which is why i added the ifdef protection

So the changelog was poor.  Please write complete changelogs so I need
to have this sort of conversation less often?

Why doesn't this cause lots of you-broke-my-build complaints?  Nobody's
running allmodonfig?

> > > diff --git a/lib/atomic64_test.c b/lib/atomic64_test.c
> > > index 250ed11..0ac1a66 100644
> > > --- a/lib/atomic64_test.c
> > > +++ b/lib/atomic64_test.c
> > > @@ -12,6 +12,8 @@
> > > 
> > >  #include <linux/kernel.h>
> > >  #include <asm/atomic.h>
> > > 
> > > +#ifdef ATOMIC64_INIT
> > 
> > hm, that's a bit lazy.  It should really use a CONFIG_HAVE_ thing.  What
> > a pita.
> 
> ATOMIC64_INIT is required for atomic64 headers to provide, and having a 
> Kconfig knob doesnt gain anything else

I know that.  But the standard way for an architecture to indicate to
the core that it impements a feature is for it to define CONFIG_HAVE_*.
Picking some related #define which architectures happen to implement
is atypical and unexpected.

Will it cause problems?  Probably not, unless the arch goes and defines
ATOMIC64_INIT without actually implementing atomic64.  But it's
atypical and unexpected and, yes, lazy!

  reply	other threads:[~2010-10-21 22:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-16 17:27 [PATCH] lib/atomic64_test: do not build on non-atomic64 systems Mike Frysinger
2010-10-21 22:02 ` Andrew Morton
2010-10-21 22:23   ` Mike Frysinger
2010-10-21 22:55     ` Andrew Morton [this message]
2010-10-21 23:04       ` Mike Frysinger
2010-10-21 23:24         ` Andrew Morton
2010-10-22 20:14           ` Mike Frysinger
2010-10-22 20:31             ` Andrew Morton
2010-10-22 20:47               ` Mike Frysinger
2010-10-22 21:00                 ` Andrew Morton
2010-10-22 21:07                   ` Mike Frysinger
2010-10-24 16:20               ` Roland Dreier
2010-10-25  1:52                 ` Andrew Morton

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=20101021155528.b3d6d027.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca@luca-barbieri.com \
    --cc=vapier@gentoo.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox