From: Michael Ellerman <mpe@ellerman.id.au>
To: Herve Codina <herve.codina@bootlin.com>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Herve Codina <herve.codina@bootlin.com>,
Yury Norov <yury.norov@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linuxppc-dev@lists.ozlabs.org, Andrew Lunn <andrew@lunn.ch>,
Mark Brown <broonie@kernel.org>,
Ratheesh Kannoth <rkannoth@marvell.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH v7 1/5] net: wan: Add support for QMC HDLC
Date: Thu, 14 Mar 2024 10:05:37 +1100 [thread overview]
Message-ID: <87ttl93f7i.fsf@mail.lhotse> (raw)
In-Reply-To: <20240307113909.227375-2-herve.codina@bootlin.com>
Hi Herve,
Herve Codina <herve.codina@bootlin.com> writes:
> The QMC HDLC driver provides support for HDLC using the QMC (QUICC
> Multichannel Controller) to transfer the HDLC data.
...
>
> diff --git a/drivers/net/wan/fsl_qmc_hdlc.c b/drivers/net/wan/fsl_qmc_hdlc.c
> new file mode 100644
> index 000000000000..5fd7ed325f5b
> --- /dev/null
> +++ b/drivers/net/wan/fsl_qmc_hdlc.c
> @@ -0,0 +1,419 @@
...
> +static int qmc_hdlc_remove(struct platform_device *pdev)
> +{
> + struct qmc_hdlc *qmc_hdlc = platform_get_drvdata(pdev);
> +
> + unregister_hdlc_device(qmc_hdlc->netdev);
> + free_netdev(qmc_hdlc->netdev);
> +
> + return 0;
> +}
> +
> +static const struct of_device_id qmc_hdlc_id_table[] = {
> + { .compatible = "fsl,qmc-hdlc" },
> + {} /* sentinel */
> +};
> +MODULE_DEVICE_TABLE(of, qmc_hdlc_driver);
This breaks when building as a module (eg. ppc32_allmodconfig):
In file included from ../include/linux/device/driver.h:21,
from ../include/linux/device.h:32,
from ../include/linux/dma-mapping.h:8,
from ../drivers/net/wan/fsl_qmc_hdlc.c:13:
../drivers/net/wan/fsl_qmc_hdlc.c:405:25: error: ‘qmc_hdlc_driver’ undeclared here (not in a function); did you mean ‘qmc_hdlc_probe’?
405 | MODULE_DEVICE_TABLE(of, qmc_hdlc_driver);
| ^~~~~~~~~~~~~~~
IIUIC it should be pointing to the table, not the driver, so:
diff --git a/drivers/net/wan/fsl_qmc_hdlc.c b/drivers/net/wan/fsl_qmc_hdlc.c
index 5fd7ed325f5b..705c3681fb92 100644
--- a/drivers/net/wan/fsl_qmc_hdlc.c
+++ b/drivers/net/wan/fsl_qmc_hdlc.c
@@ -402,7 +402,7 @@ static const struct of_device_id qmc_hdlc_id_table[] = {
{ .compatible = "fsl,qmc-hdlc" },
{} /* sentinel */
};
-MODULE_DEVICE_TABLE(of, qmc_hdlc_driver);
+MODULE_DEVICE_TABLE(of, qmc_hdlc_id_table);
static struct platform_driver qmc_hdlc_driver = {
.driver = {
Which then builds correctly.
cheers
next prev parent reply other threads:[~2024-03-13 23:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 11:39 [PATCH v7 0/5] Add support for QMC HDLC Herve Codina
2024-03-07 11:39 ` [PATCH v7 1/5] net: wan: " Herve Codina
2024-03-13 23:05 ` Michael Ellerman [this message]
2024-03-14 7:12 ` Herve Codina
2024-03-14 10:51 ` Michael Ellerman
2024-03-07 11:39 ` [PATCH v7 2/5] MAINTAINERS: Add the Freescale QMC HDLC driver entry Herve Codina
2024-03-07 11:39 ` [PATCH v7 3/5] lib/bitmap: Introduce bitmap_scatter() and bitmap_gather() helpers Herve Codina
2024-03-07 11:39 ` [PATCH v7 4/5] net: wan: fsl_qmc_hdlc: Add runtime timeslots changes support Herve Codina
2024-03-07 11:39 ` [PATCH v7 5/5] net: wan: fsl_qmc_hdlc: Add framer support Herve Codina
2024-03-11 21:11 ` [PATCH v7 0/5] Add support for QMC HDLC Jakub Kicinski
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=87ttl93f7i.fsf@mail.lhotse \
--to=mpe@ellerman.id.au \
--cc=andrew@lunn.ch \
--cc=andriy.shevchenko@linux.intel.com \
--cc=broonie@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=herve.codina@bootlin.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rkannoth@marvell.com \
--cc=thomas.petazzoni@bootlin.com \
--cc=vadim.fedorenko@linux.dev \
--cc=yury.norov@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).