From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/4]: Move __set/clear_bit from ubifs.h to bitops.h
Date: Fri, 21 Aug 2009 02:29:30 -0400 [thread overview]
Message-ID: <200908210229.31408.vapier@gentoo.org> (raw)
In-Reply-To: <20090821080547.22c8d94d@marrow.netinsight.se>
On Friday 21 August 2009 02:05:47 Simon Kagstrom wrote:
> On Thu, 20 Aug 2009 13:44:35 -0400 Mike Frysinger wrote:
> > On Thursday 20 August 2009 04:52:50 Simon Kagstrom wrote:
> > > --- a/include/asm-sh/bitops.h
> > > +++ b/include/asm-sh/bitops.h
> > > @@ -146,6 +146,11 @@ static inline int ffs (int x)
> > > }
> > > return r;
> > > }
> > > +
> > > +#define __set_bit(nr, addr) generic_set_bit(nr, addr)
> > > +
> > > +#define __clear_bit(nr, addr) generic_clear_bit(nr, addr)
> >
> > this is just silly to put into every arch header. why not do in the
> > common code:
> > #ifndef __set_bit
> > # define __set_bit generice_set_bit
> > #endif
>
> It's a function (static inline) in some architectures.
add the obvious #define i already posted in a later e-mail. it makes a lot
more sense for the non-common behavior of providing a custom implementation to
add one more line per func than to try and update (and keep up-to-date) every
arch using the common code.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090821/4c546506/attachment.pgp
next prev parent reply other threads:[~2009-08-21 6:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-20 8:49 [U-Boot] [PATCH v2 0/4]: bitops cleanup and fixes Simon Kagstrom
2009-08-20 8:52 ` [U-Boot] [PATCH v2 1/4]: Move __set/clear_bit from ubifs.h to bitops.h Simon Kagstrom
2009-08-20 17:44 ` Mike Frysinger
2009-08-20 18:31 ` Wolfgang Denk
2009-08-20 18:55 ` Mike Frysinger
2009-08-21 6:05 ` Simon Kagstrom
2009-08-21 6:29 ` Mike Frysinger [this message]
2009-08-21 7:03 ` Simon Kagstrom
2009-08-20 8:53 ` [U-Boot] [PATCH v2 2/4]: Make arm bitops endianness-independent Simon Kagstrom
2009-08-20 8:53 ` [U-Boot] [PATCH v2 3/4]: Define ffs/fls for all architectures Simon Kagstrom
2009-08-20 8:53 ` [U-Boot] [PATCH v2 4/4]: Define test_and_set_bit and test_and_clear bit for ARM Simon Kagstrom
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=200908210229.31408.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/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