lkml.org 
[lkml]   [2003]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params
On Wed, Jul 02, 2003 at 09:28:38AM +0200, Bernardo Innocenti wrote:
> On Wednesday 02 July 2003 09:19, you wrote:
> > On Wed, Jul 02, 2003 at 08:52:17AM +0200, Bernardo Innocenti wrote:
> > > + * static inline uint32_t do_div(uint64_t &n, uint32_t base)
> >
> > c++ ;)
>
> Oops! Shall I send a new patch? ;-)

I guess no ;).

>
> > > +# error do_div() does not yet support the C64
> >
> > ;)
> >
> > this new version looks good to me since it will fix bugs and it's not
> > only a cleanup avoiding code duplication. thanks.
>
> The previous patch was not just a cleanup: it actually added parenthes
> that were missing around parameters in many do_div() variants. Guess
> what happened when shrink_slab() did this (pages = 0):
>
> do_div(delta, pages + 1); /* Ouch! */

I see.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:46    [from the cache]
©2003-2011 Jasper Spaans