All of lore.kernel.org
 help / color / mirror / Atom feed
From: maxime.ripard@free-electrons.com (Maxime Ripard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 6/7] DMA: sun6i: Add driver for the Allwinner A31 DMA controller
Date: Mon, 10 Mar 2014 13:05:58 +0100	[thread overview]
Message-ID: <20140310120558.GF2815@lukather> (raw)
In-Reply-To: <1394028474.28803.172.camel@smile.fi.intel.com>

Hi Andriy,

On Wed, Mar 05, 2014 at 02:07:55PM +0000, Shevchenko, Andriy wrote:
> > +		return PTR_ERR(pll6);
> > +	}
> > +
> > +	ret = clk_set_parent(mux, pll6);
> > +	if (ret) {
> > +		dev_err(&pdev->dev, "Couldn't reparent AHB1 on PLL6\n");
> > +		return ret;
> > +	}
> > +
> > +	devm_clk_put(&pdev->dev, mux);
> > +	devm_clk_put(&pdev->dev, pll6);
> 
> Since you put those here, would it be better to use plain
> clk_get/clk_put ?

Actually, this allows to have no exit path for the case where one of
the calls between the first clk_get, and here. devm_clk_* makes error
handling much easier here, that's just all

I'll fix the other comments you had, and send a new version.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140310/580c7192/attachment-0001.sig>

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
To: "Shevchenko,
	Andriy"
	<andriy.shevchenko-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: Emilio Lopez <emilio-0Z03zUJReD5OxF6Tv1QG9Q@public.gmane.org>,
	"Williams,
	Dan J" <dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	"Koul,
	Vinod" <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Mike Turquette
	<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	"dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org"
	<linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	"kevin.z.m.zh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org"
	<kevin.z.m.zh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"sunny-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org"
	<sunny-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org>,
	"shuge-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org"
	<shuge-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org>,
	"zhuzhenhua-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org"
	<zhuzhenhua-0TFLnhJekD6UEPyfVivIlAC/G2K4zDHf@public.gmane.org>
Subject: Re: [PATCH v3 6/7] DMA: sun6i: Add driver for the Allwinner A31 DMA controller
Date: Mon, 10 Mar 2014 13:05:58 +0100	[thread overview]
Message-ID: <20140310120558.GF2815@lukather> (raw)
In-Reply-To: <1394028474.28803.172.camel-XvqNBM/wLWRrdx17CPfAsdBPR1lH4CV8@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

Hi Andriy,

On Wed, Mar 05, 2014 at 02:07:55PM +0000, Shevchenko, Andriy wrote:
> > +		return PTR_ERR(pll6);
> > +	}
> > +
> > +	ret = clk_set_parent(mux, pll6);
> > +	if (ret) {
> > +		dev_err(&pdev->dev, "Couldn't reparent AHB1 on PLL6\n");
> > +		return ret;
> > +	}
> > +
> > +	devm_clk_put(&pdev->dev, mux);
> > +	devm_clk_put(&pdev->dev, pll6);
> 
> Since you put those here, would it be better to use plain
> clk_get/clk_put ?

Actually, this allows to have no exit path for the case where one of
the calls between the first clk_get, and here. devm_clk_* makes error
handling much easier here, that's just all

I'll fix the other comments you had, and send a new version.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
Cc: Emilio Lopez <emilio@elopez.com.ar>,
	"Williams, Dan J" <dan.j.williams@intel.com>,
	"Koul, Vinod" <vinod.koul@intel.com>,
	Mike Turquette <mturquette@linaro.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-sunxi@googlegroups.com" <linux-sunxi@googlegroups.com>,
	"kevin.z.m.zh@gmail.com" <kevin.z.m.zh@gmail.com>,
	"sunny@allwinnertech.com" <sunny@allwinnertech.com>,
	"shuge@allwinnertech.com" <shuge@allwinnertech.com>,
	"zhuzhenhua@allwinnertech.com" <zhuzhenhua@allwinnertech.com>
Subject: Re: [PATCH v3 6/7] DMA: sun6i: Add driver for the Allwinner A31 DMA controller
Date: Mon, 10 Mar 2014 13:05:58 +0100	[thread overview]
Message-ID: <20140310120558.GF2815@lukather> (raw)
In-Reply-To: <1394028474.28803.172.camel@smile.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

Hi Andriy,

On Wed, Mar 05, 2014 at 02:07:55PM +0000, Shevchenko, Andriy wrote:
> > +		return PTR_ERR(pll6);
> > +	}
> > +
> > +	ret = clk_set_parent(mux, pll6);
> > +	if (ret) {
> > +		dev_err(&pdev->dev, "Couldn't reparent AHB1 on PLL6\n");
> > +		return ret;
> > +	}
> > +
> > +	devm_clk_put(&pdev->dev, mux);
> > +	devm_clk_put(&pdev->dev, pll6);
> 
> Since you put those here, would it be better to use plain
> clk_get/clk_put ?

Actually, this allows to have no exit path for the case where one of
the calls between the first clk_get, and here. devm_clk_* makes error
handling much easier here, that's just all

I'll fix the other comments you had, and send a new version.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-03-10 12:05 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 16:17 [PATCH v3 0/7] Add support for the Allwinner A31 DMA Controller Maxime Ripard
2014-03-04 16:17 ` Maxime Ripard
2014-03-04 16:17 ` Maxime Ripard
2014-03-04 16:17 ` [PATCH v3 1/7] clk: sunxi: Remove calls to clk_put Maxime Ripard
2014-03-04 16:17   ` Maxime Ripard
2014-03-04 16:17   ` Maxime Ripard
2014-03-04 16:17 ` [PATCH v3 2/7] ARM: sunxi: Split out the various machines into separate files Maxime Ripard
2014-03-04 16:17   ` Maxime Ripard
2014-03-04 16:17   ` Maxime Ripard
2014-03-04 16:18 ` [PATCH v3 3/7] ARM: sunxi: Move the clock protection to machine hooks Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18 ` [PATCH v3 4/7] ARM: sun6i: Protect CPU clock Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18 ` [PATCH v3 5/7] ARM: sun6i: Protect SDRAM gating bit Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18 ` [PATCH v3 6/7] DMA: sun6i: Add driver for the Allwinner A31 DMA controller Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-05 14:07   ` Shevchenko, Andriy
2014-03-05 14:07     ` Shevchenko, Andriy
2014-03-05 14:07     ` Shevchenko, Andriy
2014-03-10 12:05     ` Maxime Ripard [this message]
2014-03-10 12:05       ` Maxime Ripard
2014-03-10 12:05       ` Maxime Ripard
2014-03-04 16:18 ` [PATCH v3 7/7] ARM: sun6i: dt: Add A31 DMA controller to DTSI Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard
2014-03-04 16:18   ` Maxime Ripard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140310120558.GF2815@lukather \
    --to=maxime.ripard@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.