From patchwork Tue Apr 2 22:39:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 10882405 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 084AB922 for ; Tue, 2 Apr 2019 22:39:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7D9F27FA8 for ; Tue, 2 Apr 2019 22:39:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C803C2894E; Tue, 2 Apr 2019 22:39:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 581AF27FA8 for ; Tue, 2 Apr 2019 22:39:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726157AbfDBWj2 (ORCPT ); Tue, 2 Apr 2019 18:39:28 -0400 Received: from merlin.infradead.org ([205.233.59.134]:33326 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbfDBWj2 (ORCPT ); Tue, 2 Apr 2019 18:39:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Date:Message-ID:Subject:From:Cc:To:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=6Dc4yOd/LsQUmIb21uC+y24e1MF+JwP4QAcIUwTjmeg=; b=m0EOxOocF/r8HG76LdT7ZjhW5I aOjh9P3R0V4Ine1Qu/uMk1YpbEhv2C/Zwhs2SnLVLqnkZVCvfTMP3pyYUU8577RYBgIFclk79BWsP arCNXMPwnsvjT725rDRZfCbwNC8apBUTxxgIFeGet5tqgr0zjrDuiH5ty2LbeQPtZdCgXnzNwpciS 2fHsSGTW0W9usuMBKQubb/xY1xqB6IkLDNAoYVN6B0wGkyC1lBID2i8pbytkQaxaqaAJiGKXozO6h HOEM4NeylC3GO9GUCEmg2UN2nPFzO9pNd8L4Y6a5K6FCs4olgHmTpRQ4tix8vtEgSUGRDsmwgrTHk z8iF5EuQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=dragon.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hBS3v-0005eB-8v; Tue, 02 Apr 2019 22:39:23 +0000 To: LKML , Andrew Morton Cc: Takashi Iwai , Yoshinori Sato , Rich Felker , Linux-sh list From: Randy Dunlap Subject: [PATCH] sh: fix multiple function definition build errors Message-ID: <9ee4e0c5-f100-86a2-bd4d-1d3287ceab31@infradead.org> Date: Tue, 2 Apr 2019 15:39:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 Content-Language: en-US Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Randy Dunlap Many of the sh CPU-types have their own plat_irq_setup() and arch_init_clk_ops() functions, so these same (empty) functions in arch/sh/boards/of-generic.c are not needed and cause build errors. If there is some case where these empty functions are needed, they can be retained by marking them as "__weak" while at the same time making builds that do not need them succeed. Fixes these build errors: arch/sh/boards/of-generic.o: In function `plat_irq_setup': (.init.text+0x134): multiple definition of `plat_irq_setup' arch/sh/kernel/cpu/sh2/setup-sh7619.o:(.init.text+0x30): first defined here arch/sh/boards/of-generic.o: In function `arch_init_clk_ops': (.init.text+0x118): multiple definition of `arch_init_clk_ops' arch/sh/kernel/cpu/sh2/clock-sh7619.o:(.init.text+0x0): first defined here Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Cc: Takashi Iwai Cc: Yoshinori Sato Cc: Rich Felker Cc: linux-sh@vger.kernel.org --- arch/sh/boards/of-generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- lnx-51-rc2.orig/arch/sh/boards/of-generic.c +++ lnx-51-rc2/arch/sh/boards/of-generic.c @@ -164,10 +164,10 @@ static struct sh_machine_vector __initmv struct sh_clk_ops; -void __init arch_init_clk_ops(struct sh_clk_ops **ops, int idx) +void __init __weak arch_init_clk_ops(struct sh_clk_ops **ops, int idx) { } -void __init plat_irq_setup(void) +void __init __weak plat_irq_setup(void) { }