Re: [PATCH] dmaengine: rcar-dmac: Reject zero-length slave DMA requests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > [..]
> > > -     if (rchan->mid_rid < 0 || !sg_len) {
> > > +     if (rchan->mid_rid < 0 || !sg_len || !sg_dma_len(sgl)) {
> > >               dev_warn(chan->device->dev,
> > >                        "%s: bad parameter: len=%d, id=%d\n",
> > >                        __func__, sg_len, rchan->mid_rid);
> >
> > Just wanted to share the WARN output proposed by Wolfram in
> > https://patchwork.kernel.org/patch/11012991/#22721733
> > in case the issue discussed in [1] is reproduced with this patch:
> 
> I'm not such a big fan of WARN()...

Well, if 'id' points indirectly to the driver, then I agree here that
WARN might not be needed. Not as obvious, but probably good enough.

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux