From: Paul Mundt <lethal@linux-sh.org>
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 00:35:50 +0000 [thread overview]
Message-ID: <20120427003549.GA7988@linux-sh.org> (raw)
In-Reply-To: <1335149312-1564-1-git-send-email-nobuhiro.iwamatsu.yj@renesas.com>
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.
next prev parent reply other threads:[~2012-04-27 0:35 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 [this message]
2012-04-27 2:11 ` Simon Horman
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=20120427003549.GA7988@linux-sh.org \
--to=lethal@linux-sh.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.