From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751525AbdAaPPF (ORCPT ); Tue, 31 Jan 2017 10:15:05 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:13082 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751499AbdAaPOm (ORCPT ); Tue, 31 Jan 2017 10:14:42 -0500 Subject: Re: [PATCH v7 11/14] sata: ahci-da850: un-hardcode the MPY bits To: Bartosz Golaszewski , Kevin Hilman , Patrick Titiano , Michael Turquette , Tejun Heo , Rob Herring , Mark Rutland , Russell King , David Lechner References: <1485770531-6772-1-git-send-email-bgolaszewski@baylibre.com> <1485770531-6772-12-git-send-email-bgolaszewski@baylibre.com> CC: , , , From: Sekhar Nori Message-ID: <3bcc927a-f074-7f18-cdeb-e40655c39118@ti.com> Date: Tue, 31 Jan 2017 20:43:11 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1485770531-6772-12-git-send-email-bgolaszewski@baylibre.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday 30 January 2017 03:32 PM, Bartosz Golaszewski wrote: > + /* > + * The second clock used by ahci-da850 is the external REFCLK. If we > + * didn't get it from ahci_platform_get_resources(), let's try to > + * specify the con_id in clk_get(). > + */ > + if (!hpriv->clks[1]) { > + clk = clk_get(dev, "refclk"); > + if (IS_ERR(clk)) { > + dev_err(dev, "unable to obtain the reference clock"); > + return -ENODEV; > + } else { > + hpriv->clks[1] = clk; > + } This results in a checkpatch warning about the unneeded else. I fixed this locally to look like: + */ + if (!hpriv->clks[1]) { + clk = clk_get(dev, "refclk"); + if (IS_ERR(clk)) { + dev_err(dev, "unable to obtain the reference clock"); + return -ENODEV; + } + + hpriv->clks[1] = clk; + } Thanks, Sekhar