RE: [PATCH 4/8] usb: bdc: Small code cleanup

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

 




From: Al Cooper
> Sent: 28 June 2017 15:56
> On Wed, Jun 28, 2017 at 4:47 AM, David Laight <David.Laight@xxxxxxxxxx> wrote:
> >>
> >>       temp = bdc_readl(bdc->regs, BDC_BDCSC);
> >>       if ((temp & BDC_P64) &&
> >>                       !dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64))) {
> >> -             dev_dbg(bdc->dev, "Using 64-bit address\n");
> >> +             dev_dbg(dev, "Using 64-bit address\n");
> >>       } else {
> >> -             ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
> >> +             ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32));
> >
> > That just wrong...
> > Or was wrong before.
> 
> Why is this wrong?

It isn't obvious that &pdev->dev is bdc->dev and hence dev.

	David

��.n��������+%������w��{.n����z�{��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux