From: Jakub Kicinski <kuba@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: Igor Russkikh <irusskikh@marvell.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Alexander Loktionov <Alexander.Loktionov@aquantia.com>,
David VomLehn <vomlehn@texas.net>,
Dmitry Bezrukov <Dmitry.Bezrukov@aquantia.com>,
Pavel Belous <Pavel.Belous@aquantia.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH] net: atlantic: Rename PCI driver struct to end in _driver
Date: Mon, 30 Jun 2025 17:19:38 -0700 [thread overview]
Message-ID: <20250630171938.1d2a0e44@kernel.org> (raw)
In-Reply-To: <atr3nxbqeor5azeajgk5qwmnxuxm7q3qsn3pk53j4mbzvqsdc3@qxa3cgbfxdbc>
On Sun, 29 Jun 2025 12:09:34 +0200 Uwe Kleine-König wrote:
> 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.
Now it makes perfect sense :) I see you already reposted with a better
message. IIF you have more such patches I'd use the word "suppressed" -
something along the lines "the section mismatch warnings are suppressed
if the function is assigned to a struct with a name ending in _ops".
prev parent reply other threads:[~2025-07-01 0:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-27 9:46 [PATCH] net: atlantic: Rename PCI driver struct to end in _driver Uwe Kleine-König
2025-06-27 19:47 ` Simon Horman
2025-06-27 21:18 ` Uwe Kleine-König
2025-06-30 12:33 ` Simon Horman
2025-06-27 23:36 ` Jakub Kicinski
2025-06-29 10:09 ` Uwe Kleine-König
2025-07-01 0:19 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250630171938.1d2a0e44@kernel.org \
--to=kuba@kernel.org \
--cc=Alexander.Loktionov@aquantia.com \
--cc=Dmitry.Bezrukov@aquantia.com \
--cc=Pavel.Belous@aquantia.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=irusskikh@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=vomlehn@texas.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.