> -----Original Message----- > From: Paolo Abeni <pab...@redhat.com> > Sent: Tuesday, May 27, 2025 5:29 AM > To: Haiyang Zhang <haiya...@microsoft.com>; linux-hyperv@vger.kernel.org; > net...@vger.kernel.org > Cc: Dexuan Cui <de...@microsoft.com>; step...@networkplumber.org; KY > Srinivasan <k...@microsoft.com>; Paul Rosswurm <paul...@microsoft.com>; > o...@aepfle.de; vkuzn...@redhat.com; da...@davemloft.net; > wei....@kernel.org; eduma...@google.com; k...@kernel.org; l...@kernel.org; > Long Li <lon...@microsoft.com>; ssen...@linux.microsoft.com; linux- > r...@vger.kernel.org; dan...@iogearbox.net; john.fastab...@gmail.com; > b...@vger.kernel.org; a...@kernel.org; h...@kernel.org; t...@linutronix.de; > shradhagu...@linux.microsoft.com; andrew+net...@lunn.ch; Konstantin > Taranov <kotara...@microsoft.com>; ho...@kernel.org; linux- > ker...@vger.kernel.org > Subject: [EXTERNAL] Re: [PATCH net-next,v5] net: mana: Add handler for > hardware servicing events > > On 5/22/25 2:22 AM, Haiyang Zhang wrote: > > @@ -400,6 +448,33 @@ static void mana_gd_process_eqe(struct gdma_queue > *eq) > > eq->eq.callback(eq->eq.context, eq, &event); > > break; > > > > + case GDMA_EQE_HWC_FPGA_RECONFIG: > > + dev_info(gc->dev, "Recv MANA service type:%d\n", type); > > + > > + if (gc->in_service) { > > + dev_info(gc->dev, "Already in service\n"); > > + break; > > + } > > + > > + if (!try_module_get(THIS_MODULE)) { > > + dev_info(gc->dev, "Module is unloading\n"); > > + break; > > + } > > + > > + mns_wk = kzalloc(sizeof(*mns_wk), GFP_ATOMIC); > > + if (!mns_wk) { > > + module_put(THIS_MODULE); > > + break; > > + } > > + > > + dev_info(gc->dev, "Start MANA service type:%d\n", type); > > + gc->in_service = true; > > + mns_wk->pdev = to_pci_dev(gc->dev); > > + pci_dev_get(mns_wk->pdev); > > Acquiring both the device and the module reference is confusing and > likely unnecessary. pci_dev_get() should suffice. >
Thanks for the review. I updated the patch accordingly, and submitted v6 yesterday. Thanks, - Haiyang