* [PATCH] bus: fsl-mc: add missing fsl_mc_bus_dpdbg_type declaration
@ 2026-01-06 18:54 Christophe Leroy (CS GROUP)
2026-01-07 5:30 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Christophe Leroy (CS GROUP) @ 2026-01-06 18:54 UTC (permalink / raw)
To: Ioana Ciornei, Laurentiu Tudor, Greg Kroah-Hartman
Cc: Christophe Leroy (CS GROUP), linuxppc-dev, linux-arm-kernel,
linux-kernel
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?
As it is exported it can't be static. So declare it in mc.h like
all other similar objects.
Fixes: e70ba1b06c26 ("bus: fsl-mc: add the dpdbg device type")
Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
---
include/linux/fsl/mc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h
index 897d6211c1635..28441a456bb48 100644
--- a/include/linux/fsl/mc.h
+++ b/include/linux/fsl/mc.h
@@ -451,6 +451,7 @@ extern const struct device_type fsl_mc_bus_dpdcei_type;
extern const struct device_type fsl_mc_bus_dpaiop_type;
extern const struct device_type fsl_mc_bus_dpci_type;
extern const struct device_type fsl_mc_bus_dpdmai_type;
+extern const struct device_type fsl_mc_bus_dpdbg_type;
static inline bool is_fsl_mc_bus_dprc(const struct fsl_mc_device *mc_dev)
{
--
2.49.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] bus: fsl-mc: add missing fsl_mc_bus_dpdbg_type declaration 2026-01-06 18:54 [PATCH] bus: fsl-mc: add missing fsl_mc_bus_dpdbg_type declaration Christophe Leroy (CS GROUP) @ 2026-01-07 5:30 ` Greg Kroah-Hartman 2026-01-07 7:39 ` Christophe Leroy (CS GROUP) 0 siblings, 1 reply; 4+ messages in thread From: Greg Kroah-Hartman @ 2026-01-07 5:30 UTC (permalink / raw) To: Christophe Leroy (CS GROUP) Cc: Ioana Ciornei, Laurentiu Tudor, linuxppc-dev, linux-arm-kernel, linux-kernel On Tue, Jan 06, 2026 at 07:54:21PM +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? > > As it is exported it can't be static. So declare it in mc.h like > all other similar objects. > > Fixes: e70ba1b06c26 ("bus: fsl-mc: add the dpdbg device type") > Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> > --- > include/linux/fsl/mc.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h > index 897d6211c1635..28441a456bb48 100644 > --- a/include/linux/fsl/mc.h > +++ b/include/linux/fsl/mc.h > @@ -451,6 +451,7 @@ extern const struct device_type fsl_mc_bus_dpdcei_type; > extern const struct device_type fsl_mc_bus_dpaiop_type; > extern const struct device_type fsl_mc_bus_dpci_type; > extern const struct device_type fsl_mc_bus_dpdmai_type; > +extern const struct device_type fsl_mc_bus_dpdbg_type; As it's obviously not used anywhere, this should not be the fix, please just mark it static and remove the EXPORT_SYMBOL_GPL() as well. thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bus: fsl-mc: add missing fsl_mc_bus_dpdbg_type declaration 2026-01-07 5:30 ` Greg Kroah-Hartman @ 2026-01-07 7:39 ` Christophe Leroy (CS GROUP) 2026-01-07 7:44 ` Greg Kroah-Hartman 0 siblings, 1 reply; 4+ messages in thread From: Christophe Leroy (CS GROUP) @ 2026-01-07 7:39 UTC (permalink / raw) To: Ioana Ciornei Cc: Laurentiu Tudor, Greg Kroah-Hartman, linuxppc-dev, linux-arm-kernel, linux-kernel Hi Ioana, Le 07/01/2026 à 06:30, Greg Kroah-Hartman a écrit : > On Tue, Jan 06, 2026 at 07:54:21PM +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? >> >> As it is exported it can't be static. So declare it in mc.h like >> all other similar objects. >> >> Fixes: e70ba1b06c26 ("bus: fsl-mc: add the dpdbg device type") >> Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> >> --- >> include/linux/fsl/mc.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h >> index 897d6211c1635..28441a456bb48 100644 >> --- a/include/linux/fsl/mc.h >> +++ b/include/linux/fsl/mc.h >> @@ -451,6 +451,7 @@ extern const struct device_type fsl_mc_bus_dpdcei_type; >> extern const struct device_type fsl_mc_bus_dpaiop_type; >> extern const struct device_type fsl_mc_bus_dpci_type; >> extern const struct device_type fsl_mc_bus_dpdmai_type; >> +extern const struct device_type fsl_mc_bus_dpdbg_type; > > As it's obviously not used anywhere, this should not be the fix, please > just mark it static and remove the EXPORT_SYMBOL_GPL() as well. What's your opinion here as Maintainer of this driver, what should we do ? Greg is right that it is nowhere used, and it is the same for several other types, the only difference being that they have a matching is_fsl_mc_bus_dp..() helper that hides the type, but not all helpers are used, and many of them are not used outside drivers/bus/fsl-mc/ which cannot be built as a module: $ git grep is_fsl_mc_bus_ drivers/bus/fsl-mc/dprc-driver.c: if (!is_fsl_mc_bus_dprc(mc_dev)) drivers/bus/fsl-mc/dprc-driver.c: if (!is_fsl_mc_bus_dprc(mc_dev)) drivers/bus/fsl-mc/fsl-mc-allocator.c: return is_fsl_mc_bus_dpbp(mc_dev) || drivers/bus/fsl-mc/fsl-mc-allocator.c: is_fsl_mc_bus_dpmcp(mc_dev) || drivers/bus/fsl-mc/fsl-mc-allocator.c: is_fsl_mc_bus_dpcon(mc_dev); drivers/bus/fsl-mc/fsl-mc-allocator.c: if (is_fsl_mc_bus_dprc(mc_dev)) drivers/bus/fsl-mc/fsl-mc-allocator.c: if (is_fsl_mc_bus_dprc(mc_dev)) drivers/bus/fsl-mc/fsl-mc-bus.c: if (is_fsl_mc_bus_dprc(mc_dev) || drivers/bus/fsl-mc/fsl-mc-bus.c: is_fsl_mc_bus_dpmcp(mc_dev)) { drivers/bus/fsl-mc/fsl-mc-bus.c: } else if (is_fsl_mc_bus_dpio(mc_dev)) { drivers/bus/fsl-mc/fsl-mc-bus.c: if (is_fsl_mc_bus_dprc(mc_dev) && drivers/bus/fsl-mc/fsl-mc-bus.c: if (is_fsl_mc_bus_dprc(mc_dev)) drivers/vfio/fsl-mc/vfio_fsl_mc.c: int no_mmap = is_fsl_mc_bus_dprc(mc_dev); drivers/vfio/fsl-mc/vfio_fsl_mc.c: if (is_fsl_mc_bus_dprc(vdev->mc_dev)) { drivers/vfio/fsl-mc/vfio_fsl_mc.c: if (is_fsl_mc_bus_dprc(mc_dev)) drivers/vfio/fsl-mc/vfio_fsl_mc.c: if (!is_fsl_mc_bus_dprc(mc_dev)) { drivers/vfio/fsl-mc/vfio_fsl_mc.c: if (!is_fsl_mc_bus_dprc(mc_dev)) drivers/vfio/fsl-mc/vfio_fsl_mc.c: if (!is_fsl_mc_bus_dprc(mc_dev)) drivers/vfio/fsl-mc/vfio_fsl_mc.c: if (is_fsl_mc_bus_dprc(mc_dev)) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dprc(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpni(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpio(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpsw(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpdmux(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpbp(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpcon(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpmcp(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpmac(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dprtc(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpseci(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpdcei(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpaiop(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpci(const struct fsl_mc_device *mc_dev) include/linux/fsl/mc.h:static inline bool is_fsl_mc_bus_dpdmai(const struct fsl_mc_device *mc_dev) And the only outside user is drivers/vfio/fsl-mc/vfio_fsl_mc.c which can be a module, but has been orphaned by commit af6605f87ca5 ("MAINTAINERS: Orphan vfio fsl-mc bus driver") and scheduled for removal by commit 1b1d9ca13475 ("vfio/fsl-mc: Mark for removal") Christophe ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bus: fsl-mc: add missing fsl_mc_bus_dpdbg_type declaration 2026-01-07 7:39 ` Christophe Leroy (CS GROUP) @ 2026-01-07 7:44 ` Greg Kroah-Hartman 0 siblings, 0 replies; 4+ messages in thread From: Greg Kroah-Hartman @ 2026-01-07 7:44 UTC (permalink / raw) To: Christophe Leroy (CS GROUP) Cc: Ioana Ciornei, Laurentiu Tudor, linuxppc-dev, linux-arm-kernel, linux-kernel On Wed, Jan 07, 2026 at 08:39:41AM +0100, Christophe Leroy (CS GROUP) wrote: > Hi Ioana, > > Le 07/01/2026 à 06:30, Greg Kroah-Hartman a écrit : > > On Tue, Jan 06, 2026 at 07:54:21PM +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? > > > > > > As it is exported it can't be static. So declare it in mc.h like > > > all other similar objects. > > > > > > Fixes: e70ba1b06c26 ("bus: fsl-mc: add the dpdbg device type") > > > Signed-off-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org> > > > --- > > > include/linux/fsl/mc.h | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/include/linux/fsl/mc.h b/include/linux/fsl/mc.h > > > index 897d6211c1635..28441a456bb48 100644 > > > --- a/include/linux/fsl/mc.h > > > +++ b/include/linux/fsl/mc.h > > > @@ -451,6 +451,7 @@ extern const struct device_type fsl_mc_bus_dpdcei_type; > > > extern const struct device_type fsl_mc_bus_dpaiop_type; > > > extern const struct device_type fsl_mc_bus_dpci_type; > > > extern const struct device_type fsl_mc_bus_dpdmai_type; > > > +extern const struct device_type fsl_mc_bus_dpdbg_type; > > > > As it's obviously not used anywhere, this should not be the fix, please > > just mark it static and remove the EXPORT_SYMBOL_GPL() as well. > > What's your opinion here as Maintainer of this driver, what should we do ? > > Greg is right that it is nowhere used, and it is the same for several other > types, the only difference being that they have a matching > is_fsl_mc_bus_dp..() helper that hides the type, but not all helpers are > used, and many of them are not used outside drivers/bus/fsl-mc/ which cannot > be built as a module: Anything that does not need to be exported (i.e. not used by anything else in the kernel tree), should be made static. thanks, greg k-h ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-07 7:44 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-01-06 18:54 [PATCH] bus: fsl-mc: add missing fsl_mc_bus_dpdbg_type declaration Christophe Leroy (CS GROUP) 2026-01-07 5:30 ` Greg Kroah-Hartman 2026-01-07 7:39 ` Christophe Leroy (CS GROUP) 2026-01-07 7:44 ` Greg Kroah-Hartman
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox