[haiku-commits] Re: r33781 - in haiku/trunk/src/add-ons/kernel/bus_managers/acpi: . include/platform

  • From: Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 27 Oct 2009 14:32:36 +0100

2009/10/27, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> Fredrik Holmqvist <fredrik.holmqvist@xxxxxxxxx> wrote:
>  > 2009/10/27, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
>  > > philippe.houdoin@xxxxxxxxx wrote:
>  > >  > +     return info.protection & B_KERNEL_READ_AREA &&
>  > >  > +             (pointer + length) <= (info.address + info.ram_
>  > > > size);
>  > > While the parenthesis around "pointer + length" are superfluous,
>  > > there
>  > >  are some parenthesis missing around info.protection & ...
>  > >  To reduce those errors, please always write (a & b) != 0.
>  > >  Just another thing I will put into the coding style.
>
> > My bad.
>  > Also the check for both read and write is not right as well. (It
>  > actually checks if it's either readable, writable or both atm. Instead
>  > of it being readable and writable).
>
>
> So how should it look instead?
>  Do you mind preparing another patch?
>
>  Bye,
>
>    Axel.

That is what I'm working on. Actually I'll go over all the os-specific
code in oshaiku.c

(And also a patch for the namespace driver kdl bug. It's a driver
problem, so no ACPI issues)

/Fredrik Holmqvist, TQH

Other related posts: