From: Mark Brown <broonie@kernel.org>
To: Li-hao Kuo <lhjeff911@gmail.com>
Cc: p.zabel@pengutronix.de, andyshevchenko@gmail.com,
robh+dt@kernel.org, linux-spi@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
wells.lu@sunplus.com, lh.kuo@sunplus.com
Subject: Re: [PATCH v6 1/2] spi: Add spi driver for Sunplus SP7021
Date: Tue, 18 Jan 2022 17:41:57 +0000 [thread overview]
Message-ID: <Yeb75aOOckAfNTTG@sirena.org.uk> (raw)
In-Reply-To: <37998e515d561e762ee30d0ac4fca25a948e0c5c.1642494310.git.lhjeff911@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 948 bytes --]
On Tue, Jan 18, 2022 at 04:42:38PM +0800, Li-hao Kuo wrote:
Looks mostly good - a couple of small nits below but nothing major.
> +static int sp7021_spi_master_transfer_one(struct spi_controller *ctlr, struct spi_device *spi,
> + struct spi_transfer *xfer)
> +{
> + for (i = 0; i <= xfer_cnt; i++) {
> + mutex_lock(&pspim->buf_lock);
This lock is redundant: it is only ever held in this function which is
guaranteed by the core to never be called twice concurrently.
> + ret = devm_request_irq(dev, pspim->m_irq, sp7021_spi_master_irq,
> + IRQF_TRIGGER_RISING, pdev->name, pspim);
> + if (ret)
> + return ret;
> +
> + ret = devm_request_irq(dev, pspim->s_irq, sp7021_spi_slave_irq,
> + IRQF_TRIGGER_RISING, pdev->name, pspim);
> + if (ret)
> + return ret;
Are you sure the driver is ready to handle interrupts without any of the
other resources? Normally interrupts are one of the last things to be
requested.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-01-18 17:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 8:42 [PATCH v6 0/2] Add spi control driver for Sunplus SP7021 SoC Li-hao Kuo
2022-01-18 8:42 ` [PATCH v6 1/2] spi: Add spi driver for Sunplus SP7021 Li-hao Kuo
2022-01-18 17:41 ` Mark Brown [this message]
2022-01-20 9:12 ` Lh Kuo 郭力豪
2022-01-19 22:08 ` Andy Shevchenko
2022-01-20 9:23 ` Lh Kuo 郭力豪
2022-01-20 9:51 ` Andy Shevchenko
2022-01-21 6:55 ` Lh Kuo 郭力豪
2022-01-21 10:09 ` Andy Shevchenko
2022-01-24 3:27 ` Lh Kuo 郭力豪
2022-01-18 8:42 ` [PATCH v6 2/2] dt-bindings:spi: Add Sunplus SP7021 schema Li-hao Kuo
2022-01-27 15:16 ` Rob Herring
2022-01-25 14:35 ` [PATCH v6 0/2] Add spi control driver for Sunplus SP7021 SoC Mark Brown
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=Yeb75aOOckAfNTTG@sirena.org.uk \
--to=broonie@kernel.org \
--cc=andyshevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=lh.kuo@sunplus.com \
--cc=lhjeff911@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=robh+dt@kernel.org \
--cc=wells.lu@sunplus.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.