Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S945155AbcJaRmL (ORCPT ); Mon, 31 Oct 2016 13:42:11 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:53555 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S945120AbcJaRmK (ORCPT ); Mon, 31 Oct 2016 13:42:10 -0400 Date: Mon, 31 Oct 2016 11:39:32 -0600 (MDT) From: Thomas Gleixner To: Noam Camus cc: robh+dt@kernel.org, mark.rutland@arm.com, daniel.lezcano@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 2/3] clocksource: update "fn" at CLOCKSOURCE_OF_DECLARE() of nps400 timer In-Reply-To: <1477899468-5494-3-git-send-email-noamca@mellanox.com> Message-ID: References: <1477899468-5494-1-git-send-email-noamca@mellanox.com> <1477899468-5494-3-git-send-email-noamca@mellanox.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 859 Lines: 32 On Mon, 31 Oct 2016, Noam Camus wrote: > > static unsigned long nps_timer_rate; > +static int nps_get_timer_clk(struct device_node *node, Please don't glue variables and functions together w/o a new line. That's horrible to read. > +static int __init nps_setup_clocksource(struct device_node *node) > { > int ret, cluster; > + struct clk *clk; > > for (cluster = 0; cluster < NPS_CLUSTER_NUM; cluster++) > nps_msu_reg_low_addr[cluster] = > nps_host_reg((cluster << NPS_CLUSTER_OFFSET), > NPS_MSU_BLKID, NPS_MSU_TICK_LOW); > > - ret = clk_prepare_enable(clk); > - if (ret) { > - pr_err("Couldn't enable parent clock\n"); > - return ret; > - } > - > - nps_timer_rate = clk_get_rate(clk); > + nps_get_timer_clk(node, &nps_timer_rate, clk); Why are you ignoring the return code? It was handled before your change ... Thanks, tglx