[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <98a2deaf-5403-4f85-a353-00bfe12f5b13@yunsilicon.com>
Date: Tue, 31 Dec 2024 00:13:23 +0800
From: "weihonggang" <weihg@...silicon.com>
To: "Andrew Lunn" <andrew@...n.ch>, "Xin Tian" <tianx@...silicon.com>
Cc: <netdev@...r.kernel.org>, <andrew+netdev@...n.ch>, <kuba@...nel.org>,
<pabeni@...hat.com>, <edumazet@...gle.com>, <davem@...emloft.net>,
<jeff.johnson@....qualcomm.com>, <przemyslaw.kitszel@...el.com>,
<wanry@...silicon.com>
Subject: Re: [PATCH v2 08/14] net-next/yunsilicon: Add ethernet interface
Andrew, In another module(xsc_pci), we check xdev_netdev is NULL or not
to see whether network module(xsc_eth) is loaded. we do not care about
the real type,and we do not want to include the related header files in
other modules. so we use the void type.
在 2024/12/30 下午11:29, Andrew Lunn 写道:
>> +static void *xsc_eth_add(struct xsc_core_device *xdev)
>> +{
>> + adapter->dev = &adapter->pdev->dev;
>> + adapter->xdev = (void *)xdev;
>> + xdev->netdev = (void *)netdev;
> Why have casts to void *? There are clear type here, rather than it
> being a cookie passed via an abstract interface.
>
> Andrew
Powered by blists - more mailing lists