Message ID | 20230731083806.453036-5-hch@lst.de (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [1/5] ARM/pxa: use EXPORT_SYMBOL_GPL for sharpsl_battery_kick | expand |
On Mon, Jul 31, 2023 at 10:38:05AM +0200, Christoph Hellwig wrote: > mmc_detect_change is used via symbol_get, which was only ever intended > for very internal symbols like this one. Use EXPORT_SYMBOL_GPL > for it so that symbol_get can enforce only being used on > EXPORT_SYMBOL_GPL symbols. Btw, I really wonder if this should actually be used through symbol_get. It seems like the MIPS/alchemy boards should simply require MMC to be built in and not modular, or the IRQ handlers should move into a driver. That would be a much less mechanical change, but this use really looks a bit odd. And makes me wonder if we should only allow symbol_get on symbols specifically marked to supported it, but that would be another incremental step.
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 3d3e0ca5261481..8ffd78fae1e7b9 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1433,7 +1433,7 @@ void mmc_detect_change(struct mmc_host *host, unsigned long delay) { _mmc_detect_change(host, delay, true); } -EXPORT_SYMBOL(mmc_detect_change); +EXPORT_SYMBOL_GPL(mmc_detect_change); void mmc_init_erase(struct mmc_card *card) {
mmc_detect_change is used via symbol_get, which was only ever intended for very internal symbols like this one. Use EXPORT_SYMBOL_GPL for it so that symbol_get can enforce only being used on EXPORT_SYMBOL_GPL symbols. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/mmc/core/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)