From: Rasmus Villemoes Date: Fri, 19 Sep 2025 10:09:58 +0000 (+0200) Subject: exports.c: drop unused dummy function X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a78941bc7ff72ab3b67197d53216306429e6a831;p=thirdparty%2Fu-boot.git exports.c: drop unused dummy function The !CONFIG_PHY_AQUANTIA defines were already superfluous since _exports.h does have a CONFIG_PHY_AQUANTIA, so the entries never existed. In fact, it couldn't have worked, because the defines would affect both occurences of the mdio_get_current_dev identifier in the EXPORT_FUNC(mdio_get_current_dev, struct mii_dev *, mdio_get_current_dev, void) so the C code would end up containing four copies of gd->jt->dummy = dummy but struct jt_funcs would not and does not have any 'dummy' member. Now that nothing in _exports.h refers to dummy(), remove the empty function. Signed-off-by: Rasmus Villemoes Reviewed-by: Tom Rini --- diff --git a/common/exports.c b/common/exports.c index 48b084c3861..1b7fec685b1 100644 --- a/common/exports.c +++ b/common/exports.c @@ -7,10 +7,6 @@ DECLARE_GLOBAL_DATA_PTR; -__attribute__((unused)) static void dummy(void) -{ -} - unsigned long get_version(void) { return XF_VERSION; @@ -18,13 +14,6 @@ unsigned long get_version(void) #define EXPORT_FUNC(f, a, x, ...) gd->jt->x = f; -#ifndef CONFIG_PHY_AQUANTIA -# define mdio_get_current_dev dummy -# define phy_find_by_mask dummy -# define mdio_phydev_for_ethname dummy -# define miiphy_set_current_dev dummy -#endif - int jumptable_init(void) { gd->jt = malloc(sizeof(struct jt_funcs));