[PATCH] bus: fsl-mc: declare fsl_mc_bus_dpdbg_type static

Christophe Leroy (CS GROUP) posted 1 patch 3 weeks, 1 day ago
drivers/bus/fsl-mc/fsl-mc-bus.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
[PATCH] bus: fsl-mc: declare fsl_mc_bus_dpdbg_type static
Posted by Christophe Leroy (CS GROUP) 3 weeks, 1 day ago
Fix following sparse warning:

  CHECK   drivers/bus/fsl-mc/fsl-mc-bus.c
drivers/bus/fsl-mc/fsl-mc-bus.c:435:26: warning: symbol 'fsl_mc_bus_dpdbg_type' was not declared. Should it be static?

fsl_mc_bus_dpdbg_type is not used outside of fsl-mc-bus.c

Remove the EXPORT_SYMBOL and declare it static.

Fixes: e70ba1b06c26 ("bus: fsl-mc: add the dpdbg device type")
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
---
 drivers/bus/fsl-mc/fsl-mc-bus.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c
index 08b99b0b342f3..d9d7f006f92ba 100644
--- a/drivers/bus/fsl-mc/fsl-mc-bus.c
+++ b/drivers/bus/fsl-mc/fsl-mc-bus.c
@@ -432,10 +432,9 @@ const struct device_type fsl_mc_bus_dpdmai_type = {
 };
 EXPORT_SYMBOL_GPL(fsl_mc_bus_dpdmai_type);
 
-const struct device_type fsl_mc_bus_dpdbg_type = {
+static const struct device_type fsl_mc_bus_dpdbg_type = {
 	.name = "fsl_mc_bus_dpdbg"
 };
-EXPORT_SYMBOL_GPL(fsl_mc_bus_dpdbg_type);
 
 static const struct device_type *fsl_mc_get_device_type(const char *type)
 {
-- 
2.49.0
Re: [PATCH] bus: fsl-mc: declare fsl_mc_bus_dpdbg_type static
Posted by Ioana Ciornei 2 weeks, 2 days ago
On Fri, Jan 16, 2026 at 01:23:33PM +0100, Christophe Leroy (CS GROUP) wrote:
> Fix following sparse warning:
> 
>   CHECK   drivers/bus/fsl-mc/fsl-mc-bus.c
> drivers/bus/fsl-mc/fsl-mc-bus.c:435:26: warning: symbol 'fsl_mc_bus_dpdbg_type' was not declared. Should it be static?
> 
> fsl_mc_bus_dpdbg_type is not used outside of fsl-mc-bus.c
> 
> Remove the EXPORT_SYMBOL and declare it static.
> 
> Fixes: e70ba1b06c26 ("bus: fsl-mc: add the dpdbg device type")
> Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>

Thanks a lot for this patch. I'm sorry for the really late reply.

I did test this and I am ok with the approach but since it was already
applied, I'm not going to give a tag.

Ioana