Re: [PATCH V2] PCI/DPC: Add eDPC support

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

 



On Wed, Aug 16, 2017 at 03:22:58PM +0800, Dongdong Liu wrote:
> 在 2017/8/15 4:16, Bjorn Helgaas 写道:

> >The existing code (before this patch) sometimes uses &pdev->dev and
> >sometimes &dpc->dev->device.  I'm not sure why the difference and I
> >wish they were all consistent.
> 
> I investigate current port service drivers.
> AER and PME driver xxx_probe() use &dev->port->dev (&pdev->dev)
> But DPC and HP xxx_probe() use &dev->device (&dpc->dev->device)
> So should we need to modify them to keep consistent?
> It is better to write a seperate patch if need.

My first complaint is that even within DPC we aren't consistent.  We
should fix that first.  And yes, this should be a separate patch.  

It'd be nice if AER/PME/DPC/HP were also all consistent, but we can
defer that.

> >Is there value in defining the struct dpc_rp_pio_regs, reading all the
> >info into it with one function, then having a second function to print
> >the info?
> Yes, that is the function do.
> 
> >It seems like you could have a single function that prints the info as
> >it reads it, without having to define a new struct.
> 
> It seems to have too many lines if having a single function,
> and struct dpc_rp_pio_regs rp_pio_regs is a stack local variable.
> So I think current code is ok.

OK.

Bjorn



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux