[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <atr3nxbqeor5azeajgk5qwmnxuxm7q3qsn3pk53j4mbzvqsdc3@qxa3cgbfxdbc>
Date: Sun, 29 Jun 2025 12:09:34 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Igor Russkikh <irusskikh@...vell.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Alexander Loktionov <Alexander.Loktionov@...antia.com>, David VomLehn <vomlehn@...as.net>,
Dmitry Bezrukov <Dmitry.Bezrukov@...antia.com>, Pavel Belous <Pavel.Belous@...antia.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: atlantic: Rename PCI driver struct to end in _driver
On Fri, Jun 27, 2025 at 04:36:52PM -0700, Jakub Kicinski wrote:
> On Fri, 27 Jun 2025 11:46:41 +0200 Uwe Kleine-König wrote:
> > This is not only a cosmetic change because the section mismatch checks
> > also depend on the name and for drivers the checks are stricter than for
> > ops.
>
> Could you add more info about what check you're talking about or quote
> the warning you're fixing? I'm not following..
If you do
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
index ed5231dece3f..2ee5900337bb 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c
@@ -208,7 +208,7 @@ static void aq_pci_free_irq_vectors(struct aq_nic_s *self)
pci_free_irq_vectors(self->pdev);
}
-static int aq_pci_probe(struct pci_dev *pdev,
+static int __init aq_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *pci_id)
{
struct net_device *ndev;
this is buggy; so it's justified that you get:
WARNING: modpost: vmlinux: section mismatch in reference: aq_pci_driver+0x8 (section: .data) -> aq_pci_probe (section: .init.text)
ERROR: modpost: Section mismatches detected.
. However if the driver struct is named "aq_pci_ops", the warning is
suppressed due to
/* symbols in data sections that may refer to any init/exit sections */
if (match(fromsec, PATTERNS(DATA_SECTIONS)) &&
match(tosec, PATTERNS(ALL_INIT_SECTIONS, ALL_EXIT_SECTIONS)) &&
match(fromsym, PATTERNS("*_ops", "*_probe", "*_console")))
return 0;
in scripts/mod/modpost.c.
Best regards
Uwe
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists