Re: [PATCH v3 03/23] staging: mt7621-pci: add new variable to be set to PCI base address

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

 



On Mon, Jul 09, 2018 at 10:21:05PM +0200, Sergio Paracuellos wrote:
> Add new 'mt7621_pci_base' variable as a pointer to definition
> RALINK_PCI_BASE to use it along the code.
> 
> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
> ---
>  drivers/staging/mt7621-pci/pci-mt7621.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
> index 4f56840..b745423 100644
> --- a/drivers/staging/mt7621-pci/pci-mt7621.c
> +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
> @@ -177,6 +177,8 @@ static int pcie_link_status = 0;
>  #define PCI_ACCESS_WRITE_2 4
>  #define PCI_ACCESS_WRITE_4 5
>  
> +static void __iomem *mt7621_pci_base;

As much as I want to see this type of cleanup happen, please let's do it
correctly.  This should be a device-specific variable, not a global one.

And is it really even needed?  Isn't this value present in the pci
config space of the device?  That is where this value should be read
from originally, so saving it off seems odd to me no matter what.

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