Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757863AbdLRCou (ORCPT ); Sun, 17 Dec 2017 21:44:50 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:42785 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757738AbdLRCos (ORCPT ); Sun, 17 Dec 2017 21:44:48 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20171218024445epoutp02f980fc351df16ca98a23f12894163409~BQ20dRxcC2520325203epoutp02D X-AuditID: b6c32a46-995ff700000010ee-ef-5a372b9dec03 Date: Mon, 18 Dec 2017 11:44:44 +0900 From: Andi Shyti To: Philipp Rossak Cc: mchehab@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com, maxime.ripard@free-electrons.com, wens@csie.org, linux@armlinux.org.uk, sean@mess.org, p.zabel@pengutronix.de, linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH 1/5] media: rc: update sunxi-ir driver to get base clock frequency from devicetree Message-id: <20171218024444.GA9140@gangnam.samsung> MIME-version: 1.0 Content-type: text/plain; charset="us-ascii" Content-disposition: inline In-reply-to: <20171217224547.21481-2-embed3d@gmail.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrLJsWRmVeSWpSXmKPExsWy7bCmhe5cbfMogytt/Bbzj5xjtTg4z9Ri 0+NrrBaXd81hs+jZsJXV4vejY+wWh6buZbRYev0ik8XWTXuZLZZt+sNkcffeCRaL1r1H2C0W Pv3OYvHz0HkmBz6PNfPWMHpcvnaR2WPDo9WsHk82XWT02DnrLrvHnokn2Tw2repk89i8pN5j yRtrj/6/Bh6fN8kFcEel2mSkJqakFimk5iXnp2TmpdsqeQfHO8ebmhkY6hpaWpgrKeQl5qba Krn4BOi6ZeYA/aCkUJaYUwoU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zknqP JW+sPfr/Gnh83iQXwB3FZZOSmpNZllqkb5fAlfHxe23BWtaKWV1mDYwrWLoYOTkkBEwkfr3/ y9jFyMUhJLCTUeJzaxOU84lRYt2GKWwgVSwCqhKnbmxnBbHZBDQlmm7/AIpzcIgIqEl0nWQC qWcWuMQkMafnDTtIjbBAhsSt7XeZQWxeAWOJCXsvMUMM3c4o8ejpVjaIhKDEj8n3wM5gFtCS WL/zOBOELS3x6O8MsEGcAuYSf54+BKsRFVCW2Nt3iH0CI/8sJO2zkLTPQtK+gJF5FaNkakFx bnpusVGBUV5quV5xYm5xaV66XnJ+7iZGYDxtO6zVv4Px8ZL4Q4wCHIxKPLwnLptFCbEmlhVX 5h5ilOBgVhLh1fUFCvGmJFZWpRblxxeV5qQWH2KU5mBREuflzz8WKSSQnliSmp2aWpBaBJNl 4uCUamDkSo4oS/owszDh7FrL10yRB7cdNek+fnr/TJ5H/zdPM/gS+8q/3fXNiY1HXzO0b6zZ OTH/C7O5RMmHf9YSHVO0zhU8ulh0QIhb4vOinEZn93PFHCU7zP+vkbmVIrXUkLHii6Uyu8j8 tRacwTZiVl9synbnZspkvziWsD3qS5ug45ffQlY2ExYosRRnJBpqMRcVJwIArxAtn6MCAAA= X-CMS-MailID: 20171218024444epcas2p11c9afbfe80d12b47a6a4aec4c2020034 X-Msg-Generator: CA CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20171217224555epcas5p3eb77a28e9f3ba4b189c5f275e2d2a679 X-RootMTR: 20171217224555epcas5p3eb77a28e9f3ba4b189c5f275e2d2a679 References: <20171217224547.21481-1-embed3d@gmail.com> <20171217224547.21481-2-embed3d@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 658 Lines: 27 Hi Philipp, just a couple of small nitpicks. > + u32 b_clk_freq; [...] > + /* 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. > + dev_info(dev, "set base clock frequency to %d Hz.\n", b_clk_freq); Please use dev_dbg(). Andi