lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 21 Nov 2019 09:30:34 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Peter Ujfalusi <peter.ujfalusi@...com>
Cc:     Mark Brown <broonie@...nel.org>, Vinod <vkoul@...nel.org>,
        linux-spi <linux-spi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] spi: pic32: Retire dma_request_slave_channel_compat()

Hi Peter,

On Thu, Nov 21, 2019 at 9:11 AM Peter Ujfalusi <peter.ujfalusi@...com> wrote:
> There is no reason to use the dma_request_slave_channel_compat() as no
> filter function and parameter is provided.
>
> Switch the driver to use dma_request_chan() instead.
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@...com>

> --- a/drivers/spi/spi-pic32.c
> +++ b/drivers/spi/spi-pic32.c
> @@ -609,22 +609,18 @@ static void pic32_spi_cleanup(struct spi_device *spi)
>  static void pic32_spi_dma_prep(struct pic32_spi *pic32s, struct device *dev)
>  {
>         struct spi_master *master = pic32s->master;
> -       dma_cap_mask_t mask;
>
> -       dma_cap_zero(mask);
> -       dma_cap_set(DMA_SLAVE, mask);
> -
> -       master->dma_rx = dma_request_slave_channel_compat(mask, NULL, NULL,
> -                                                         dev, "spi-rx");
> -       if (!master->dma_rx) {
> +       master->dma_rx = dma_request_chan(dev, "spi-rx");

Why not dma_request_slave_channel()?
That way you...

> +       if (IS_ERR(master->dma_rx)) {

... don't have to change the NULL check here, and...

>                 dev_warn(dev, "RX channel not found.\n");
> +               master->dma_rx = NULL;

...  don't have to override by NULL here.

(same for TX below).

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ