Re: [PATCH v2 4/7] mlxsw: don't keep pci_device_id
Petr Machata <[email protected]>
| Newsgroups | org.kernel.vger.linux-ide,dev.linux.lists.driver-core,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.linux-scsi,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
Gary Guo <[email protected]> writes: > pci_device_id is not guaranteed to live longer than probe due to presence > of dynamic ID. This stored ID is unused so remove it. > > Signed-off-by: Gary Guo <[email protected]> > --- > drivers/net/ethernet/mellanox/mlxsw/pci.c | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > > diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci.c b/drivers/net/ethernet/mellanox/mlxsw/pci.c > index 0da85d36647d..bfe3268dfdc1 100644 > --- a/drivers/net/ethernet/mellanox/mlxsw/pci.c > +++ b/drivers/net/ethernet/mellanox/mlxsw/pci.c > @@ -1768,7 +1767,6 @@ static void mlxsw_pci_mbox_free(struct mlxsw_pci *mlxsw_pci, > } > > static int mlxsw_pci_sys_ready_wait(struct mlxsw_pci *mlxsw_pci, > - const struct pci_device_id *id, > u32 *p_sys_status) > { > unsigned long end; I see, we used this to detect whether we are on SwitchX-2. Support far that was dropped ages ago in commit b0d80c013b04 ("mlxsw: Remove Mellanox SwitchX-2 ASIC support"). Good cleanup, thanks. Reviewed-by: Petr Machata <[email protected]>