public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Rolf Eike Beer <eike-kernel@sf-tec.de>
Cc: linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	stable@kernel.org
Subject: Re: [PATCH] Fix roundup_pow_of_two(1)
Date: Mon, 4 Jun 2007 15:17:24 +0200	[thread overview]
Message-ID: <20070604131723.GV5500@stusta.de> (raw)
In-Reply-To: <200706041413.20477.eike-kernel@sf-tec.de>

On Mon, Jun 04, 2007 at 02:13:11PM +0200, Rolf Eike Beer wrote:
> Adrian Bunk wrote:
> > On Thu, May 17, 2007 at 11:56:56PM +0200, Rolf Eike Beer wrote:
> > > Fix roundup_pow_of_two(1)
> > >
> > > 1 is a power of two, therefore roundup_pow_of_two(1) should return 1. It
> > > does in case the argument is a variable but in case it's a constant it
> > > behaves wrong and returns 0. Probably nobody ever did it so this was
> > > never noticed.
> >
> > I'm not getting the problem.
> > 2^0 = 1
> 
> Yes. But it returned 0 (not 1 << 0).

Sorry, I had a thinko and you are right.

> Eike

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed


  reply	other threads:[~2007-06-04 13:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 21:56 [PATCH] Fix roundup_pow_of_two(1) Rolf Eike Beer
2007-06-04 11:49 ` Adrian Bunk
2007-06-04 12:13   ` Rolf Eike Beer
2007-06-04 13:17     ` Adrian Bunk [this message]
2007-06-04 12:33   ` Jiri Kosina

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=20070604131723.GV5500@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@linux-foundation.org \
    --cc=eike-kernel@sf-tec.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.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