Re: [PATCH] staging: mt7621-pci: refactor pci related read and writes functions

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

 



On Sat, Jul 07, 2018 at 09:48:37PM +0200, Sergio Paracuellos wrote:
> This commit simplifies and clean a lot of stuff related with pci
> reads and writes. It deletes a lot of not needed at all functions
> and use kernel arch operations read[b,w,l] and write[b,w,l] instead
> of use custom macros. It also include one function helper called
> 'mt7621_pci_get_cfgaddr' to easily obtain config address. Also to
> get pci base address a global 'mt7621_pci_base' variable has been
> included and initialized as a pointer to RALINK_PCI_BASE in driver
> probe function. With this changes LOC is clearly decreased and
> readability is increased.

A lot of different things are happening here in this patch, making it
hard to review.  Any chance to split this up into smaller, easier to
review, parts?

And you adding mt7621_pci_base is a nice start, but that really should
be a device-specific variable, not a global one.  I can't belive this
driver works with a hard-coded base address, that's crazy...  Shouldn't
that value be read from the PCI device itself instead?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux