Thread (13 messages) 13 messages, 5 authors, 2017-12-18

Re: [PATCH 1/5] media: rc: update sunxi-ir driver to get base clock frequency from devicetree

From: Philipp Rossak <hidden>
Date: 2017-12-18 12:44:17
Also in: linux-arm-kernel, linux-media, lkml

Hey Andi,

thanks for the feedback. I will fix that in the next version of this 
patch series!

On 18.12.2017 03:44, Andi Shyti wrote:
Hi Philipp,

just a couple of small nitpicks.
quoted
+	u32 b_clk_freq;
[...]
quoted
+	/* Base clock frequency (optional) */
+	if (of_property_read_u32(dn, "clock-frequency", &b_clk_freq)) {
+		b_clk_freq = SUNXI_IR_BASE_CLK;
+	}
+
how about you intialize 'b_clk_freq' to 'SUNXI_IR_BASE_CLK' and
just call 'of_property_read_u32' without if statement.
'b_clk_freq' value should not be changed if "clock-frequency"
is not present in the DTS.

This might avoid misinterpretation from static analyzers that
might think that 'b_clk_freq' is used uninitialized.
quoted
+	dev_info(dev, "set base clock frequency to %d Hz.\n", b_clk_freq);
Please use dev_dbg().

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