[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] [PATCH] Build fails



Am 26.01.2014 um 23:09 schrieb Miro Kropáček <miro.kropacek@gmail.com>:
> Because I don't like this solution, it makes the driver code even less readable and it's not really fixing the problem. Anyway, I let Alan decide what to do, sooner or later somebody else bumps into this problem, too.

IMHO, if you need to read a hardware register just to set the hardware to a certain state and you don’t require the returned value (this is what I assume is done here), the (void) approach is perfectly reasonable _and_ readable.

Since it expresses exactly that in code. We need to read LAN_DATA, but we don’t need the value. Consequently, the returned value is (void).