All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney@caviumnetworks.com>
To: Mark Brown <broonie@kernel.org>
Cc: Jan Glauber <jglauber@cavium.com>, <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 11:31:43 -0700	[thread overview]
Message-ID: <579F958F.9020508@caviumnetworks.com> (raw)
In-Reply-To: <20160801172838.GW10376@sirena.org.uk>

On 08/01/2016 10:28 AM, Mark Brown wrote:
> 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.

Yes, we will fix that typo.


>
>> +	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?

The clock is an integral part of the SoC and is always running, so it 
will always be there.  All we want to know is the frequency, which is 
supplied by the device tree clock-bindings framework


> We're also not passing
> the resulting error code back to the caller which will break deferred
> probe.
>

Yes, we should do that.

>> +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...

Yes, we should let the automatic cleanup do its work here.

Probably we should consider using pcim_iomap(...) as well


>

  reply	other threads:[~2016-08-01 18:47 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
2016-08-01 17:28     ` Mark Brown
2016-08-01 18:31     ` David Daney [this message]
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=579F958F.9020508@caviumnetworks.com \
    --to=ddaney@caviumnetworks.com \
    --cc=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.