dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: Vinod Koul <vkoul@kernel.org>,
	dmaengine <dmaengine@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Dan Williams <dan.j.williams@intel.com>
Subject: Re: [PATCH 0/3] dmaengine: Stear users towards dma_request_slave_chan()
Date: Mon, 3 Feb 2020 14:48:01 +0200	[thread overview]
Message-ID: <CAHp75VcnxUj88Vb=Fn1WKoiM0h2e8cMvG+e16h8RyerfB6WN6w@mail.gmail.com> (raw)
In-Reply-To: <701ab186-c240-3c37-2c0b-8ac195f8073f@ti.com>

On Mon, Feb 3, 2020 at 2:09 PM Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:
> On 03/02/2020 13.16, Andy Shevchenko wrote:
> > On Mon, Feb 3, 2020 at 12:59 PM Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:
> >> On 03/02/2020 12.37, Andy Shevchenko wrote:
> >>> On Mon, Feb 3, 2020 at 12:32 PM Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:
> >
> >>>> Advise users of dma_request_slave_channel() and
> >>>> dma_request_slave_channel_compat() to move to dma_request_slave_chan()
> >>>
> >>> How? There are legacy ARM boards you have to care / remove before.
> >>> DMAengine subsystem makes a p*s off decisions
> >>
> >> The dma_slave_map support is added few years back for the legacy ARM
> >> boards, because we do care.
> >> daVinci, OMAP1, pxa, s3cx4xx and even m68k/coldfire moved over.
> >
> > Then why simple not to convert (start converting) those few drivers to
> > new API and simple remove the old one?
>
> _if_ the dma_request_slave_channel_compat() is really falling back after
> dma_request_chan() - this is what it calls first, then it is not a
> simple convert to a new API.
> 1. The arch needs to define the dma_slave_map for the SoC.
> 2. The dma driver needs few lines to add it to DMAengine core (+pdata
> change).
> After this the _compat() can be replaced with dma_request_chan()
>

> In most cases I do not have access to documentation and boards to test.

So, why everyone with the boards outside of your scope has to suffer?

...

> >> Imho it is confusing to have 4+ APIs to do the same thing, but in a
> >> slightly different way.
> >
> > It was always an excuse by authors "that too many drivers to convert..."
>
> Sure, but before you accuse anyone with neglect, can you check the git
> log for 'dma_request_slave_channel' in the commit messages?

It's good people, and you, are taking care of it, but make user suffer
because somebody wants to call for *developers* is a bad idea. And it
happened not first time in the DMA engine subsystem.

...

> > No, it's a reason when you first take care of existing users and
> > decide to obsolete an API followed by removal few releases later.
>
> I'm fine to drop the pr_info()

Yes, please do.

> and the __deprecated mark for
> dma_request_slave_channel.

This OTOH is for *developers* and its scope won't scary people. So,
it's more or less fine.

> > But
> > I see no reason to keep such APIs at all, so, instead of this
> > *wonderful* messages perhaps somebody should do better work?
>
> To touch the _compat() variant one needs to have access to the
> documentation of the SoC on which the code falls back. It is not a
> matter of sloppy/poor/ignorant/etc work attitude.
> I have kept clear on touching those few drivers using it [1] as I don't
> have documentation.
>
> >> New drivers should not use the old API i new code and developers tend to
> >> pick the API they use after a quick 'git grep dma_request_' and see what
> >> the majority is using.
> >
> > Isn't it a point to do better review rather than scary end users?
>
> Sure, but we rarely CCd on new client drivers for DMAengine API usage.

Linux Next allows people to `git grep -n dma_slave_DO_NOT_CALL` and
tell developers. Isn't it the job good maintainer can do?

> [1] fwiw, there are drivers using dma_request_channel() and by the look
> their use is either _compat() or the dma_request_chan_by_mask() style
> and some even have a twist here and there...

Bottom line, if you need to tell *developers* about something, please
don't bother *end users*.

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2020-02-03 12:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-03 10:18 [PATCH 0/3] dmaengine: Stear users towards dma_request_slave_chan() Peter Ujfalusi
2020-02-03 10:18 ` [PATCH 1/3] dmaengine: Remove unused define for dma_request_slave_channel_reason() Peter Ujfalusi
2020-02-03 13:35   ` Geert Uytterhoeven
2020-02-03 10:18 ` [PATCH 2/3] dmaengine: Mark dma_request_slave_channel() deprecated Peter Ujfalusi
2020-02-03 10:18 ` [PATCH 3/3] dmaengine: Encourage dma_request_slave_channel_compat() users to migrate Peter Ujfalusi
2020-02-03 10:35   ` Andy Shevchenko
2020-02-03 10:37 ` [PATCH 0/3] dmaengine: Stear users towards dma_request_slave_chan() Andy Shevchenko
2020-02-03 10:59   ` Peter Ujfalusi
2020-02-03 11:16     ` Andy Shevchenko
2020-02-03 12:09       ` Peter Ujfalusi
2020-02-03 12:48         ` Andy Shevchenko [this message]
2020-02-03 13:32         ` Geert Uytterhoeven
2020-02-03 20:21           ` John Paul Adrian Glaubitz
2020-02-03 20:34             ` Geert Uytterhoeven
2020-02-03 21:26               ` John Paul Adrian Glaubitz
2020-02-04  8:13                 ` Geert Uytterhoeven
2020-02-04  6:52               ` Peter Ujfalusi
2020-02-04  8:01                 ` Geert Uytterhoeven
2020-02-04  8:15                   ` Peter Ujfalusi
2020-02-04  8:21                     ` Peter Ujfalusi
2020-02-04  9:16                   ` Rob Landley
2020-02-04  9:27                     ` Geert Uytterhoeven
2020-02-04 10:18                       ` Rob Landley
2020-02-04  6:21   ` Vinod Koul
2020-02-04 11:21     ` Andy Shevchenko
2020-02-05  4:43       ` Vinod Koul
2020-02-05  8:10         ` Peter Ujfalusi
2020-02-05 11:31           ` Vinod Koul
2020-02-05 11:56             ` Peter Ujfalusi
2020-02-05 11:59               ` Vinod Koul

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='CAHp75VcnxUj88Vb=Fn1WKoiM0h2e8cMvG+e16h8RyerfB6WN6w@mail.gmail.com' \
    --to=andy.shevchenko@gmail.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peter.ujfalusi@ti.com \
    --cc=vkoul@kernel.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;
as well as URLs for NNTP newsgroup(s).