Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3797349pxb; Mon, 4 Oct 2021 09:48:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhTLoxfusQmVNRQZbjxjlacd4SI+LplNFEQBTqwoow4ydaDuggfIJBrhy7oojYtD1A8H/L X-Received: by 2002:a17:902:7fcf:b0:13e:c994:ee67 with SMTP id t15-20020a1709027fcf00b0013ec994ee67mr659407plb.12.1633366090951; Mon, 04 Oct 2021 09:48:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633366090; cv=none; d=google.com; s=arc-20160816; b=bWI4E1N3oscCt4HJLFJ3Ck3t/w8QUh1kulwczPXMoMJZ8E2qtRFBCKfmaxC9lj9Oxd Gucm3YQ2aehWvzx3qvogAM3g2FCYBr97mDcrdRra3gezNryreTVkR042V/L6Kj6ZM8zg 06bzza8dHWyVVWx+lKpYLaJXvx6h8fdIM3n5Bxl0eGHGxETrRQtACDDkKdUSpQGtdQFT vAkEB5CpiZxsx16iR6Kt1XwQ5OheL50WsbUPRxJ0jezS9/SBiTv4KVNKQQmgoTK7yW+n zCvdb20iD3FK3IIP+mYpYpwHvVJrfuLVXI0di4vPw+z8AY7Jr6ZIuo43Xo1BkIlI7n1k u/lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OZeXfyvaNhyqVWAnVs7UGSFaoP87xmOHskwb4UUgmDU=; b=uFa+UfrsM8+HYNAqEPz7xEfKaIWqAYBChpDjAIFFGrrIt247WFmvz9gIZDdKtOoprq hQIgt30/FJJ3CXPxc7GL7r91LF4VlAoMR3a43sBotksXO7s8V5BIXr3GV9idKXAsb987 5mo9fJwnDgGc1mCl0/dY/s6HBfmYkEa1+kTqgJgF1d3Ri4785jE56oyHBEgC4Shdlpkz vEyf2c9S+K0xCQ1VJmrr4rPKHAmxfV9OeC0yCRBa7lUSNpzZ893VbED8fGSr5N96TiVL F+JZZhklrUPxESYFgBk6CneLHd58KLrmytL/M3M+6kgDnnXJVd/ohvSJsEr/zhBgnSFf l36w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yILEQddT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t9si16105299plb.248.2021.10.04.09.47.58; Mon, 04 Oct 2021 09:48:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yILEQddT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235766AbhJDNjI (ORCPT + 99 others); Mon, 4 Oct 2021 09:39:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:48650 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238148AbhJDNh2 (ORCPT ); Mon, 4 Oct 2021 09:37:28 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6EDD36121F; Mon, 4 Oct 2021 13:16:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1633353415; bh=ZO6zA9c8Lzwvtuu4Dipo711ge+UklH1aYIsTPUIsBKc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yILEQddT1Zq8HIn/fU9T8qzyJqkbNXzmam7uwU5BwuWFu0UzIZFUdvIOs4EbtfCyU zr6FNgL3YBvsBCaWXJX5YM3lmSOUu08PYX/s3Shm9gNBpOmuf2lC6Lv1cLqbRe/BDj gfie/25RqchV48pNr5QgJ6tVV1Oo9GJ8K+yxgsOg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrew Lunn , Marek Vasut , Arnd Bergmann , "David S. Miller" , Sasha Levin Subject: [PATCH 5.14 119/172] net: ks8851: fix link error Date: Mon, 4 Oct 2021 14:52:49 +0200 Message-Id: <20211004125048.824493986@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211004125044.945314266@linuxfoundation.org> References: <20211004125044.945314266@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann [ Upstream commit 51bb08dd04a05035a64504faa47651d36b0f3125 ] An object file cannot be built for both loadable module and built-in use at the same time: arm-linux-gnueabi-ld: drivers/net/ethernet/micrel/ks8851_common.o: in function `ks8851_probe_common': ks8851_common.c:(.text+0xf80): undefined reference to `__this_module' Change the ks8851_common code to be a standalone module instead, and use Makefile logic to ensure this is built-in if at least one of its two users is. Fixes: 797047f875b5 ("net: ks8851: Implement Parallel bus operations") Link: https://lore.kernel.org/netdev/20210125121937.3900988-1-arnd@kernel.org/ Reviewed-by: Andrew Lunn Acked-by: Marek Vasut Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/micrel/Makefile | 6 ++---- drivers/net/ethernet/micrel/ks8851_common.c | 8 ++++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/micrel/Makefile b/drivers/net/ethernet/micrel/Makefile index 5cc00d22c708..6ecc4eb30e74 100644 --- a/drivers/net/ethernet/micrel/Makefile +++ b/drivers/net/ethernet/micrel/Makefile @@ -4,8 +4,6 @@ # obj-$(CONFIG_KS8842) += ks8842.o -obj-$(CONFIG_KS8851) += ks8851.o -ks8851-objs = ks8851_common.o ks8851_spi.o -obj-$(CONFIG_KS8851_MLL) += ks8851_mll.o -ks8851_mll-objs = ks8851_common.o ks8851_par.o +obj-$(CONFIG_KS8851) += ks8851_common.o ks8851_spi.o +obj-$(CONFIG_KS8851_MLL) += ks8851_common.o ks8851_par.o obj-$(CONFIG_KSZ884X_PCI) += ksz884x.o diff --git a/drivers/net/ethernet/micrel/ks8851_common.c b/drivers/net/ethernet/micrel/ks8851_common.c index 831518466de2..0f9c5457b93e 100644 --- a/drivers/net/ethernet/micrel/ks8851_common.c +++ b/drivers/net/ethernet/micrel/ks8851_common.c @@ -1057,6 +1057,7 @@ int ks8851_suspend(struct device *dev) return 0; } +EXPORT_SYMBOL_GPL(ks8851_suspend); int ks8851_resume(struct device *dev) { @@ -1070,6 +1071,7 @@ int ks8851_resume(struct device *dev) return 0; } +EXPORT_SYMBOL_GPL(ks8851_resume); #endif static int ks8851_register_mdiobus(struct ks8851_net *ks, struct device *dev) @@ -1243,6 +1245,7 @@ int ks8851_probe_common(struct net_device *netdev, struct device *dev, err_reg_io: return ret; } +EXPORT_SYMBOL_GPL(ks8851_probe_common); int ks8851_remove_common(struct device *dev) { @@ -1261,3 +1264,8 @@ int ks8851_remove_common(struct device *dev) return 0; } +EXPORT_SYMBOL_GPL(ks8851_remove_common); + +MODULE_DESCRIPTION("KS8851 Network driver"); +MODULE_AUTHOR("Ben Dooks "); +MODULE_LICENSE("GPL"); -- 2.33.0