lkml.org 
[lkml]   [2012]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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]
\
 
 \ /
  Last update: 2012-02-16 15:27    [W:0.046 / U:22.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site