From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751170AbeABW77 (ORCPT + 1 other); Tue, 2 Jan 2018 17:59:59 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:53496 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbeABW75 (ORCPT ); Tue, 2 Jan 2018 17:59:57 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E95766024C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Tue, 2 Jan 2018 14:59:55 -0800 From: Stephen Boyd To: Paul Cercueil Cc: Michael Turquette , Rob Herring , Mark Rutland , Thomas Gleixner , Jason Cooper , Marc Zyngier , Daniel Lezcano , Lee Jones , linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/6] clk: ingenic: Add JZ47xx TCU clocks driver Message-ID: <20180102225955.GL7997@codeaurora.org> References: <20171229125942.27305-2-paul@crapouillou.net> <20180101143344.2099-1-paul@crapouillou.net> <20180101143344.2099-4-paul@crapouillou.net> <20180102191356.GI7997@codeaurora.org> <1514923719.15685.0@smtp.crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1514923719.15685.0@smtp.crapouillou.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/02, Paul Cercueil wrote: > >> + goto err_free_tcu; > >> + } > >> + > >> + tcu->clocks.clk_num = nb_clks; > >> + tcu->clocks.clks = kcalloc(nb_clks, sizeof(struct clk *), > >>GFP_KERNEL); > >> + if (!tcu->clocks.clks) { > >> + pr_err("%s: cannot allocate memory\n", __func__); > > > >We don't need allocation error messages. Please run checkpatch. > > I did run checkpatch, which warned about this, but that's a false > positive to me. > The callback passed to CLK_OF_DECLARE() has a return type void, so > there's no > way I can return -ENOMEM, and I don't want the error to be unnoticed. The kernel typically spews a bunch of information when an allocation error happens, so your pr_err() will be lost in the spew, which is why it's not really necessary. > > About the other remarks - I agree with you, I'll fix these in the V2. > Ok. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project