Messages in this thread | | | Date | Thu, 16 Feb 2012 15:23:56 +0100 | From | Wolfram Sang <> | Subject | Re: [PATCH] watchdog: make imx2_wdt report boot status correctly |
| |
> Seen from the perspective of code compactness ("save some lines"), > one could try to be consequent here, and save the "val" variable > altogether, ending up with some "new_value = __raw_readw ... & ... ? ... : 0;" > But eventually there might be code readability issues, so it's > a good idea to keep the balance.
Yes.
> An argument for the original, longer version might be it is easier > to extend, when more flags need to be handled, like > "else if (val & ...) new_value = ...", while nested conditional > expressions would most likely become quite complex soon.
Once we have support to handle non-stoppable watchdogs in the the new watchdog framework, the code will be greatly refactored anyhow :)
Thanks,
Wolfram
-- Pengutronix e.K. | Wolfram Sang | Industrial Linux Solutions | http://www.pengutronix.de/ | [unhandled content-type:application/pgp-signature]
| |