On Sat, 30 Jul 2005, Rafael J. Wysocki wrote:
> Hi,
>
> On Saturday, 30 of July 2005 15:13, Pavel Machek wrote:
> > Hi!
> >
> > > > px >= n + x
> > > >
> > > > or
> > > >
> > > > (p-1)x >= n
> > > >
> > > > or
> > > >
> > > > x >= n / (p-1).
> > > >
> > > > The obvious solution is
> > > >
> > > > x = ceiling(n / (p-1)),
> > > >
> > > > so calc_nr should return n + ceiling(n / (p-1)), which is exactly what
> > > > Michal's patch computes.
> > >
> > > Nice. :-)
> > >
> > > Could we perhaps add your proof to the Michal's patch as a comment,
> > > for reference?
> >
> > No, thanks. It only proves that it is equivalent to old code, but says
> > nothing about quality of code, and we really do not want to keep old
> > code around.
>
> IMHO it rather says that the formula is OK and would save some time to
> people reading the code for the _first_ time and trying to understand it,
> but you decide. :-)
It's up to you whether or not to include the proof as a comment -- you
have my permission and my sign-off:
Signed-off-by: Alan Stern <[email protected]>
Alan Stern
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|