[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <xh34h5zd3f4hjjpafsg2i6uzeigxjb7g6zwbybgvkgmydw6ouy@ueeozv6lottf>
Date: Fri, 3 May 2024 16:43:57 +0300
From: Serge Semin <fancer.lancer@...il.com>
To: Yanteng Si <siyanteng@...ngson.cn>
Cc: andrew@...n.ch, hkallweit1@...il.com, peppe.cavallaro@...com,
alexandre.torgue@...s.st.com, joabreu@...opsys.com, Jose.Abreu@...opsys.com,
chenhuacai@...nel.org, linux@...linux.org.uk, guyinggang@...ngson.cn,
netdev@...r.kernel.org, chris.chenfeiyang@...il.com, siyanteng01@...il.com
Subject: Re: [PATCH net-next v12 05/15] net: stmmac: dwmac-loongson: Use
PCI_DEVICE_DATA() macro for device identification
On Thu, Apr 25, 2024 at 09:04:36PM +0800, Yanteng Si wrote:
> Just use PCI_DEVICE_DATA() macro for device identification,
> No changes to function functionality.
Some more verbose commit log:
"For the readability sake convert the hard-coded Loongson GMAC PCI ID to
the respective macro and use the PCI_DEVICE_DATA() macro-function to
create the pci_device_id array entry. The later change will be
specifically useful in order to assign the device-specific data for the
currently supported device and for about to be added Loongson GNET
controller."
Other than that the change looks good:
Reviewed-by: Serge Semin <fancer.lancer@...il.com>
-Serge(y)
>
> Signed-off-by: Feiyang Chen <chenfeiyang@...ngson.cn>
> Signed-off-by: Yinggang Gu <guyinggang@...ngson.cn>
> Signed-off-by: Yanteng Si <siyanteng@...ngson.cn>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> index 19906ea67636..4e0838db4259 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-loongson.c
> @@ -9,6 +9,8 @@
> #include <linux/of_irq.h>
> #include "stmmac.h"
>
> +#define PCI_DEVICE_ID_LOONGSON_GMAC 0x7a03
> +
> static int loongson_default_data(struct plat_stmmacenet_data *plat)
> {
> plat->clk_csr = 2; /* clk_csr_i = 20-35MHz & MDC = clk_csr_i/16 */
> @@ -210,7 +212,7 @@ static SIMPLE_DEV_PM_OPS(loongson_dwmac_pm_ops, loongson_dwmac_suspend,
> loongson_dwmac_resume);
>
> static const struct pci_device_id loongson_dwmac_id_table[] = {
> - { PCI_VDEVICE(LOONGSON, 0x7a03) },
> + { PCI_DEVICE_DATA(LOONGSON, GMAC, NULL) },
> {}
> };
> MODULE_DEVICE_TABLE(pci, loongson_dwmac_id_table);
> --
> 2.31.4
>
Powered by blists - more mailing lists