All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Jan Glauber <jglauber@cavium.com>
Cc: linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
	David Daney <david.daney@cavium.com>,
	"Steven J . Hill" <steven.hill@cavium.com>
Subject: Re: [PATCH v2 2/2] spi: octeon: Add thunderx driver
Date: Mon, 1 Aug 2016 18:28:38 +0100	[thread overview]
Message-ID: <20160801172838.GW10376@sirena.org.uk> (raw)
In-Reply-To: <20160728083144.16625-3-jglauber@cavium.com>

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

On Thu, Jul 28, 2016 at 10:31:44AM +0200, Jan Glauber wrote:

> +config SPI_THUNDERX
> +	tristate "Cavium ThunderX SPI controller"
> +	depends on (ARM64 || CONFIG_TEST) && 64BIT && PCI

You mean COMPILE_TEST.

> +	p->clk = devm_clk_get(dev, NULL);
> +	if (IS_ERR(p->clk))
> +		goto out_unmap;

We're now just using the normal clock API which is good but I'm now
unclear what is going to ensure that the clock is there - is there some
other change elsewhere that I'm not aware of?  We're also not passing
the resulting error code back to the caller which will break deferred
probe.

> +out_clock:
> +	clk_disable_unprepare(p->clk);
> +out_clock_devm:
> +	devm_clk_put(dev, p->clk);

There's no point in using managed allocations if you're going to manually
free things...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Jan Glauber <jglauber-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	David Daney <david.daney-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>,
	"Steven J . Hill"
	<steven.hill-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v2 2/2] spi: octeon: Add thunderx driver
Date: Mon, 1 Aug 2016 18:28:38 +0100	[thread overview]
Message-ID: <20160801172838.GW10376@sirena.org.uk> (raw)
In-Reply-To: <20160728083144.16625-3-jglauber-YGCgFSpz5w/QT0dZR+AlfA@public.gmane.org>

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

On Thu, Jul 28, 2016 at 10:31:44AM +0200, Jan Glauber wrote:

> +config SPI_THUNDERX
> +	tristate "Cavium ThunderX SPI controller"
> +	depends on (ARM64 || CONFIG_TEST) && 64BIT && PCI

You mean COMPILE_TEST.

> +	p->clk = devm_clk_get(dev, NULL);
> +	if (IS_ERR(p->clk))
> +		goto out_unmap;

We're now just using the normal clock API which is good but I'm now
unclear what is going to ensure that the clock is there - is there some
other change elsewhere that I'm not aware of?  We're also not passing
the resulting error code back to the caller which will break deferred
probe.

> +out_clock:
> +	clk_disable_unprepare(p->clk);
> +out_clock_devm:
> +	devm_clk_put(dev, p->clk);

There's no point in using managed allocations if you're going to manually
free things...

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-08-01 18:26 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-28  8:31 [PATCH v2 0/2] SPI ThunderX driver Jan Glauber
2016-07-28  8:31 ` Jan Glauber
2016-07-28  8:31 ` [PATCH v2 1/2] spi: octeon: Split driver into Octeon specific and common parts Jan Glauber
2016-08-01 17:36   ` Mark Brown
2016-08-01 17:36     ` Mark Brown
2016-07-28  8:31 ` [PATCH v2 2/2] spi: octeon: Add thunderx driver Jan Glauber
2016-07-28  8:31   ` Jan Glauber
2016-08-01 17:28   ` Mark Brown [this message]
2016-08-01 17:28     ` Mark Brown
2016-08-01 18:31     ` David Daney
2016-08-01 18:49       ` Mark Brown
2016-08-01 18:49         ` Mark Brown
2016-08-01 19:02         ` David Daney
2016-08-01 19:02           ` David Daney
2016-08-02 21:30           ` Mark Brown
2016-08-02 21:30             ` Mark Brown
2016-08-02 21:49             ` David Daney

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=20160801172838.GW10376@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=david.daney@cavium.com \
    --cc=jglauber@cavium.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=steven.hill@cavium.com \
    /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.