Thread (12 messages) 12 messages, 2 authors, 2021-03-29

Re: [PATCH v7 1/5] misc: Add Synopsys DesignWare xData IP driver

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-03-29 05:04:16
Also in: linux-pci, lkml

On Sun, Mar 28, 2021 at 09:06:47PM +0000, Gustavo Pimentel wrote:
quoted
quoted
+static const struct pci_device_id dw_xdata_pcie_id_table[] = {
+	{ PCI_DEVICE_DATA(SYNOPSYS, EDDA, &snps_edda_data) },
Why do you need a pointer to snps_edda_data here?
The structure snps_edda_data indicates the location of this IP block (BAR 
and offset) for this particular endpoint.
It's very likely in the future to be more variants that for HW design 
reasons might require this IP block to be on a different location.
Then make the change when that happens sometime in the future.  Don't
add unneeded complexity today, that just makes the code harder to review
by us now, and for you to maintain today.

thanks,

greg k-h
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help