* [bug report] net: enetc: reimplement RFS/RSS memory clearing as PCI quirk
@ 2023-09-06 11:48 Dan Carpenter
2023-09-06 14:16 ` Vladimir Oltean
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-09-06 11:48 UTC (permalink / raw)
To: vladimir.oltean; +Cc: netdev
Hello Vladimir Oltean,
The patch f0168042a212: "net: enetc: reimplement RFS/RSS memory
clearing as PCI quirk" from Aug 3, 2023 (linux-next), leads to the
following Smatch static checker warning:
drivers/net/ethernet/freescale/enetc/enetc_pf.c:1405 enetc_fixup_clear_rss_rfs()
warn: 'si' is an error pointer or valid
drivers/net/ethernet/freescale/enetc/enetc_pf.c
1393 static void enetc_fixup_clear_rss_rfs(struct pci_dev *pdev)
1394 {
1395 struct device_node *node = pdev->dev.of_node;
1396 struct enetc_si *si;
1397
1398 /* Only apply quirk for disabled functions. For the ones
1399 * that are enabled, enetc_pf_probe() will apply it.
1400 */
1401 if (node && of_device_is_available(node))
1402 return;
1403
1404 si = enetc_psi_create(pdev);
--> 1405 if (si)
I guess this should be if (!IS_ERR(si)) {?
1406 enetc_psi_destroy(pdev);
1407 }
regards,
dan carpenter
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [bug report] net: enetc: reimplement RFS/RSS memory clearing as PCI quirk
2023-09-06 11:48 [bug report] net: enetc: reimplement RFS/RSS memory clearing as PCI quirk Dan Carpenter
@ 2023-09-06 14:16 ` Vladimir Oltean
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir Oltean @ 2023-09-06 14:16 UTC (permalink / raw)
To: Dan Carpenter; +Cc: netdev
On Wed, Sep 06, 2023 at 02:48:20PM +0300, Dan Carpenter wrote:
> Hello Vladimir Oltean,
>
> The patch f0168042a212: "net: enetc: reimplement RFS/RSS memory
> clearing as PCI quirk" from Aug 3, 2023 (linux-next), leads to the
> following Smatch static checker warning:
>
> drivers/net/ethernet/freescale/enetc/enetc_pf.c:1405 enetc_fixup_clear_rss_rfs()
> warn: 'si' is an error pointer or valid
>
> drivers/net/ethernet/freescale/enetc/enetc_pf.c
> 1393 static void enetc_fixup_clear_rss_rfs(struct pci_dev *pdev)
> 1394 {
> 1395 struct device_node *node = pdev->dev.of_node;
> 1396 struct enetc_si *si;
> 1397
> 1398 /* Only apply quirk for disabled functions. For the ones
> 1399 * that are enabled, enetc_pf_probe() will apply it.
> 1400 */
> 1401 if (node && of_device_is_available(node))
> 1402 return;
> 1403
> 1404 si = enetc_psi_create(pdev);
> --> 1405 if (si)
>
> I guess this should be if (!IS_ERR(si)) {?
>
> 1406 enetc_psi_destroy(pdev);
> 1407 }
>
> regards,
> dan carpenter
Thanks. I've submitted a patch based on this suggestion
(Message-ID: 20230906141609.247579-1-vladimir.oltean@nxp.com).
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-09-06 14:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-06 11:48 [bug report] net: enetc: reimplement RFS/RSS memory clearing as PCI quirk Dan Carpenter
2023-09-06 14:16 ` Vladimir Oltean
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox