[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <616c557a-16d3-7be3-b0c8-5fa07cbf293e@amd.com>
Date: Thu, 27 Apr 2023 16:24:23 -0700
From: Shannon Nelson <shannon.nelson@....com>
To: Emil Tantilov <emil.s.tantilov@...el.com>,
intel-wired-lan@...ts.osuosl.org
Cc: netdev@...r.kernel.org, joshua.a.hay@...el.com,
sridhar.samudrala@...el.com, jesse.brandeburg@...el.com,
anthony.l.nguyen@...el.com, willemb@...gle.com, decot@...gle.com,
pabeni@...hat.com, kuba@...nel.org, edumazet@...gle.com,
davem@...emloft.net, alan.brady@...el.com, madhu.chittim@...el.com,
phani.r.burra@...el.com, shailendra.bhatnagar@...el.com,
pavan.kumar.linga@...el.com, simon.horman@...igine.com,
leon@...nel.org
Subject: Re: [net-next v3 02/15] idpf: add module register and probe
functionality
On 4/26/23 7:09 PM, Emil Tantilov wrote:
>
> From: Phani Burra <phani.r.burra@...el.com>
>
[...]
> +static int idpf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> +{
> + struct device *dev = &pdev->dev;
> + struct idpf_adapter *adapter;
> + int err;
> +
> + adapter = kzalloc(sizeof(*adapter), GFP_KERNEL);
> + if (!adapter)
> + return -ENOMEM;
> + adapter->pdev = pdev;
The custom more recently has been to allocate the devlink struct early
on and build the device struct from that allocation. You likely will
want to follow along and play in the devlink world.
sln
Powered by blists - more mailing lists