Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1570818 > unrolled thread

Re: [PATCH v7 11/14] sata: ahci-da850: un-hardcode the MPY bits

Started bySekhar Nori <nsekhar@ti.com>
First post2017-01-31 16:20 +0100
Last post2017-01-31 16:20 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v7 11/14] sata: ahci-da850: un-hardcode the MPY bits Sekhar Nori <nsekhar@ti.com> - 2017-01-31 16:20 +0100

#1570818 — Re: [PATCH v7 11/14] sata: ahci-da850: un-hardcode the MPY bits

FromSekhar Nori <nsekhar@ti.com>
Date2017-01-31 16:20 +0100
SubjectRe: [PATCH v7 11/14] sata: ahci-da850: un-hardcode the MPY bits
Message-ID<t5InT-2gX-11@gated-at.bofh.it>
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

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web