From: andy.shevchenko@gmail.com
To: Minjie Du <duminjie@vivo.com>
Cc: Vladimir Oltean <olteanv@gmail.com>,
Mark Brown <broonie@kernel.org>,
Richard Cochran <richardcochran@gmail.com>,
"open list:FREESCALE DSPI DRIVER" <linux-spi@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>,
"open list:PTP HARDWARE CLOCK SUPPORT" <netdev@vger.kernel.org>,
opensource.kernel@vivo.com
Subject: Re: [PATCH v2] spi: fsl-dspi: Use dev_err_probe() in dspi_request_dma()
Date: Fri, 28 Jul 2023 00:07:05 +0300 [thread overview]
Message-ID: <ZMLcefaxpRVgkPyd@surfacebook> (raw)
In-Reply-To: <20230725035038.1702-1-duminjie@vivo.com>
Tue, Jul 25, 2023 at 11:50:37AM +0800, Minjie Du kirjoitti:
> It is possible for dma_request_chan() to return EPROBE_DEFER, which means
> dev is not ready yet.
> At this point dev_err() will have no output.
...
> if (IS_ERR(dma->chan_tx)) {
> - dev_err(dev, "tx dma channel not available\n");
> ret = PTR_ERR(dma->chan_tx);
> + dev_err_probe(dev, ret, "tx dma channel not available\n");
It can be even simpler
ret = dev_err_probe(dev, PTR_ERR(dma->chan_tx), "tx dma channel not available\n");
> goto err_tx_channel;
> }
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2023-07-27 21:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-25 3:50 [PATCH v2] spi: fsl-dspi: Use dev_err_probe() in dspi_request_dma() Minjie Du
2023-07-25 16:49 ` Mark Brown
2023-07-25 17:05 ` Vladimir Oltean
2023-07-27 21:07 ` andy.shevchenko [this message]
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=ZMLcefaxpRVgkPyd@surfacebook \
--to=andy.shevchenko@gmail.com \
--cc=broonie@kernel.org \
--cc=duminjie@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=opensource.kernel@vivo.com \
--cc=richardcochran@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).