From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-renesas-soc@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-mmc@vger.kernel.org
Subject: Re: [PATCH] mmc: sh_mmcif: correctly report success when obtaining DMA channels
Date: Mon, 30 Sep 2024 16:37:16 +0200 [thread overview]
Message-ID: <Zvq3nCIz0Rv0I4El@shikoro> (raw)
In-Reply-To: <CAMuHMdX6tv-Z2ZisYg3ridB5M28+vnGzEyC9CReeUWRUQJPA1g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
> > - dev_dbg(dev, "%s: got channel TX %p RX %p\n", __func__, host->chan_tx,
> > - host->chan_rx);
>
> This was not a real success indicator, which could indeed confuse
> people, but an obfuscated NULL-pointer still prints as NULL, right?
Well...
>
> > if (!host->chan_tx || !host->chan_rx ||
> > sh_mmcif_dma_slave_config(host, host->chan_tx, DMA_MEM_TO_DEV) ||
> > sh_mmcif_dma_slave_config(host, host->chan_rx, DMA_DEV_TO_MEM))
> > goto error;
> >
> > + dev_dbg(dev, "%s: got channel TX %p RX %p\n", __func__, host->chan_tx,
> > + host->chan_rx);
>
> This means we no longer see a debug message in case only one DMA
> channel could be requested, thus requiring manual addition of more code
> to find out what was really wrong?
... you can simply enable basic DMA debugging to find this out. I don't
see value in adding a separate debug printout in the driver.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-09-30 14:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-28 9:44 [PATCH] mmc: sh_mmcif: correctly report success when obtaining DMA channels Wolfram Sang
2024-09-30 14:17 ` Geert Uytterhoeven
2024-09-30 14:37 ` Wolfram Sang [this message]
2024-10-08 14:35 ` Ulf Hansson
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=Zvq3nCIz0Rv0I4El@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=geert@linux-m68k.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=ulf.hansson@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox