Re: [PATCH] 2.4.19-rc2-ac2 pdc202xx.c update

Michal Jaegermann (michal@harddata.com)
Tue, 23 Jul 2002 11:08:16 -0600


On Tue, Jul 23, 2002 at 09:19:15AM +0200, Francois Romieu wrote:
> support <support@promise.com.tw> :
> > We think there is no problems,
>
> After the change, the code is:
>
> if (speed == XFER_UDMA_2)
> OUT_BYTE((thold + adj), indexreg); <- not executed
> OUT_BYTE((IN_BYTE(datareg) & 0x7f), datareg); <- executed, damn it !

I have one more question. Is it really immaterial on the line above in
which order 'datareg' occurences are used? Regardless of what
'OUT_BYTE' is now or may become in the future and how these macro are
used? It looks to me that we are trying to read some byte from
'datareg', clear a bit in it and write it back but looks can be
deceptive. It may turn out that this does or does not work on a
particular compiler whim.

Maybe it is ok now but beeing explicit in a macro definition does
not really cost anything and may save some future grief.

Michal
-
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/