public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: "Robert P. J. Day" <rpjday@mindspring.com>
Cc: Linux kernel mailing list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Paul Mackerras <paulus@samba.org>,
	dhowells@redhat.com, galak@kernel.crashing.org
Subject: Re: [PATCH] Add "is_power_of_2" checking to log2.h.
Date: Thu, 01 Feb 2007 10:43:59 +0000	[thread overview]
Message-ID: <3565.1170326639@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0701300543420.17991@CPE00045a9c397f-CM001225dbafb6>


Robert P. J. Day <rpjday@mindspring.com> wrote:

> +#define is_power_of_4(x)	is_power_of_2(x) && (ffs(x) & 1))

If this is such a commonly implemented op, it should probably be implemented
globally too.

I also wonder if there's some better way of implementing it than this, but I
can't think of one offhand.

David

  parent reply	other threads:[~2007-02-01 10:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30 11:06 [PATCH] Add "is_power_of_2" checking to log2.h Robert P. J. Day
2007-01-30 12:25 ` Nick Piggin
2007-01-30 12:56   ` Robert P. J. Day
2007-01-30 14:12     ` Jan Engelhardt
2007-01-30 14:45       ` Robert P. J. Day
2007-01-30 15:50         ` Jan Engelhardt
2007-01-30 16:00           ` Robert P. J. Day
2007-06-11 23:11         ` H. Peter Anvin
2007-01-31 10:13       ` Vegard Nossum
2007-01-31 10:47         ` Robert P. J. Day
2007-01-31  1:21     ` Nick Piggin
2007-01-31  7:20       ` Robert P. J. Day
2007-02-01 10:41   ` David Howells
2007-02-01 10:43 ` David Howells [this message]
2007-02-01 10:49   ` Robert P. J. Day
2007-02-01 12:39   ` Tim Schmielau
2007-02-01 20:17     ` Valdis.Kletnieks
2007-02-01 21:55       ` Tim Schmielau
2007-02-20 15:29 ` Mariusz Kozlowski
2007-02-20 15:56   ` Kumar Gala
2007-02-20 16:14     ` Mariusz Kozlowski

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=3565.1170326639@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=galak@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=rpjday@mindspring.com \
    /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