linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Simon Horman <horms@verge.net.au>
To: linux-sh@vger.kernel.org
Subject: Re: [RFC/PATCH] sh: Remove cast of atomic_t in ATOMIC_INIT macro
Date: Fri, 27 Apr 2012 02:11:23 +0000	[thread overview]
Message-ID: <20120427021123.GA17984@verge.net.au> (raw)
In-Reply-To: <1335149312-1564-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>

On Fri, Apr 27, 2012 at 09:35:50AM +0900, Paul Mundt wrote:
> On Wed, Apr 25, 2012 at 12:11:14PM +0900, Nobuhiro Iwamatsu wrote:
> > And this problem occurs by STATIC_KEY_INIT_TRUE and
> > STATIC_KEY_INIT_FALSE of include/linux/jump_label.h.
> > The architecture by which jumplabel   is defined following,
> > 
> > > #define STATIC_KEY_INIT_TRUE ((struct static_key) \
> > >     { .enabled = ATOMIC_INIT(1), .entries = (void *)1 })
> > > #define STATIC_KEY_INIT_FALSE ((struct static_key) \
> > >     { .enabled = ATOMIC_INIT(0), .entries = (void *)0 })
> > 
> > and does not define following.
> > 
> > > #define STATIC_KEY_INIT_TRUE ((struct static_key) \
> > >                { .enabled = ATOMIC_INIT(1) })
> > > #define STATIC_KEY_INIT_FALSE ((struct static_key) \
> > >                { .enabled = ATOMIC_INIT(0) })
> > 
> > Although a problem is solved by considering it following.
> > 
> > > #define STATIC_KEY_INIT_TRUE {ATOMIC_INIT(1)}
> > > #define STATIC_KEY_INIT_FALSE {ATOMIC_INIT(0)}
> > 
> > However, since definitions differ by the same macro name,
> > extendibility is lost.
> > I think that it is better to remove the cast from ATOMIC_INIT.
> > 
> Yes, agreed. I'll queue up the patch, thanks.

Excellent.

      parent reply	other threads:[~2012-04-27  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-23  2:48 [RFC/PATCH] sh: Remove cast of atomic_t in ATOMIC_INIT macro Nobuhiro Iwamatsu
2012-04-23  6:52 ` Paul Mundt
2012-04-25  3:11 ` Nobuhiro Iwamatsu
2012-04-27  0:35 ` Paul Mundt
2012-04-27  2:11 ` Simon Horman [this message]

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=20120427021123.GA17984@verge.net.au \
    --to=horms@verge.net.au \
    --cc=linux-sh@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).