Thread (24 messages) read the whole thread 24 messages, 7 authors, 2011-07-15

Re: [PATCH 6/6] clk: Add initial WM831x clock driver

From: Ryan Mallon <hidden>
Date: 2011-07-15 05:14:40
Also in: linux-arm-kernel, lkml

On 15/07/11 15:05, Mark Brown wrote:
On Thu, Jul 14, 2011 at 08:53:39PM -0600, Grant Likely wrote:
quoted
On Mon, Jul 11, 2011 at 11:53:57AM +0900, Mark Brown wrote:
quoted
+	if (clkdata->xtal_ena)
+		return 0;
+	else
+		return -EPERM;
+}
Nit: return clkdata->xtal_ena ? 0 : -EPERM;
Just makes for more concise code.
I have an extremely strong dislike of the ternery operator, I find it
does nothing for legibility.
I prefer this:

     if (!clkdata->xtal_ena)
         return -EPERM;

     return 0;
}

Which makes the error check clear and makes the success case visible 
right at the bottom of the function.

~Ryan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help