From patchwork Thu Sep 7 13:41:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 137680 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp77490vqo; Thu, 7 Sep 2023 11:29:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGDsaA7+EsBJOGUGFYww4dbs2KVz0KJVp95Y0pGLA8TJYse+WBI7rq9nVi6JS5yWiIM1kUu X-Received: by 2002:a05:6a20:9384:b0:14c:4785:497f with SMTP id x4-20020a056a20938400b0014c4785497fmr632945pzh.1.1694111383982; Thu, 07 Sep 2023 11:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694111383; cv=none; d=google.com; s=arc-20160816; b=CzxiPfn0OczyclIV2i+3RF/+D7t+OTipVZklMri59PibQN24usNTnE7yTZtASRa19o Zi2d9QvzWl4Dw9DKJW4eTxpdwEF+m7lavYkNIW9xy+9qy2oFCvjp9RPhKB+4pCzBdLR0 pJy3tTUAom0W7KTW2ld4a8Bidh6nvyZcTel7xDYi8p7tDKoo43II9HXxsJrv7GCL2UuC 3tuwwdvhpNolpJ2D/Qjt0g6Eop4IZfeY8ilKikMJbFpeFn/BAC18fM/n4qUePKTM6yA4 xm1cUFlSA/SPS5Fi0OlBKiNTIc29MlxA1jMdML8c5hBTZpDiuilVux6ub0iIukElzrPo wNEw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Vi2wlyY+HBFG639C7F5UO6D/6st1IitxV9DFfpFp8I8=; fh=fKMC3BTGjlLXl5EvEhzqt3WHCynqYJKK7wAqLAOkWUw=; b=i9XglzWjv9WpuPbgXR+N6IaQYxVShFEIvuZWY07sRWUVOueqeFjKtJbmaejGNdIKKy czJhq47Mac8TUpHppq2Jma4N09Eiiyf4erjuqXTr8+UKn66ryyjUOHuR+RKplu9gW+Bw 4vSPAof9LN/ATEzLDKLNMF0NK+aFd04b+4Rd+mNPQbEMdBnQg27tHxMDTwLSPGuAAbJ3 sw3h7SYOOMJp3T2ywx6FBkze8fxxbIAdkDrrNg0c638PmJ1/HJpeYUPc7aef07iwgWXA 0IoaYTvY8u/Vn21NocYthS8ITZqxLz7HW97kbgtecwe/8gpna2yhHjgcJbRsFQYVTDas TlfA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e19-20020a656793000000b005638183ab90si13324217pgr.611.2023.09.07.11.29.13; Thu, 07 Sep 2023 11:29:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237013AbjIGQMO (ORCPT + 99 others); Thu, 7 Sep 2023 12:12:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238054AbjIGQLr (ORCPT ); Thu, 7 Sep 2023 12:11:47 -0400 X-Greylist: delayed 1775 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 07 Sep 2023 09:08:36 PDT Received: from gauss.telenet-ops.be (gauss.telenet-ops.be [IPv6:2a02:1800:120:4::f00:11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8D3830EA for ; Thu, 7 Sep 2023 09:08:36 -0700 (PDT) Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by gauss.telenet-ops.be (Postfix) with ESMTPS id 4RhL534qBKz4x6x5 for ; Thu, 7 Sep 2023 15:41:59 +0200 (CEST) Received: from ramsan.of.borg ([84.195.187.55]) by michel.telenet-ops.be with bizsmtp id j1hy2A00n1C8whw061hyuv; Thu, 07 Sep 2023 15:41:59 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qeFGQ-002mA1-T2; Thu, 07 Sep 2023 15:41:58 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qeFGg-00CMhu-51; Thu, 07 Sep 2023 15:41:58 +0200 From: Geert Uytterhoeven To: linux-m68k@lists.linux-m68k.org Cc: Arnd Bergmann , Finn Thain , Michael Schmitz , Philip Blundell , Greg Ungerer , Joshua Thompson , Sam Creasey , Laurent Vivier , linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 36/52] m68k: q40: Add and use "q40.h" Date: Thu, 7 Sep 2023 15:41:37 +0200 Message-Id: <16313fd669800e0e53d5aacdabd2405d6d4c99b1.1694093327.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776404538408865938 X-GMAIL-MSGID: 1776404538408865938 When building with W=1: arch/m68k/q40/q40ints.c:84:13: warning: no previous prototype for ‘q40_init_IRQ’ [-Wmissing-prototypes] 84 | void __init q40_init_IRQ(void) | ^~~~~~~~~~~~ arch/m68k/q40/q40ints.c:112:6: warning: no previous prototype for ‘q40_mksound’ [-Wmissing-prototypes] 112 | void q40_mksound(unsigned int hz, unsigned int ticks) | ^~~~~~~~~~~ arch/m68k/q40/q40ints.c:152:6: warning: no previous prototype for ‘q40_sched_init’ [-Wmissing-prototypes] 152 | void q40_sched_init (void) | ^~~~~~~~~~~~~~ Fix this by introducing a new header file "q40.h" for holding the prototypes of functions implemented in arch/m68k/q40/. Signed-off-by: Geert Uytterhoeven --- arch/m68k/q40/config.c | 6 ++---- arch/m68k/q40/q40.h | 6 ++++++ arch/m68k/q40/q40ints.c | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 arch/m68k/q40/q40.h diff --git a/arch/m68k/q40/config.c b/arch/m68k/q40/config.c index c78ee709b45879c7..2c51c2b4a4fbbf79 100644 --- a/arch/m68k/q40/config.c +++ b/arch/m68k/q40/config.c @@ -36,16 +36,14 @@ #include #include -extern void q40_init_IRQ(void); +#include "q40.h" + static void q40_get_model(char *model); -extern void q40_sched_init(void); static int q40_hwclk(int, struct rtc_time *); static int q40_get_rtc_pll(struct rtc_pll_info *pll); static int q40_set_rtc_pll(struct rtc_pll_info *pll); -extern void q40_mksound(unsigned int /*freq*/, unsigned int /*ticks*/); - static void q40_mem_console_write(struct console *co, const char *b, unsigned int count); diff --git a/arch/m68k/q40/q40.h b/arch/m68k/q40/q40.h new file mode 100644 index 0000000000000000..3146679bde0dab97 --- /dev/null +++ b/arch/m68k/q40/q40.h @@ -0,0 +1,6 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* q40ints.c */ +void q40_init_IRQ(void); +void q40_mksound(unsigned int hz, unsigned int ticks); +void q40_sched_init(void); diff --git a/arch/m68k/q40/q40ints.c b/arch/m68k/q40/q40ints.c index 127d7ecdbd49ecd9..10f1f294e91f9705 100644 --- a/arch/m68k/q40/q40ints.c +++ b/arch/m68k/q40/q40ints.c @@ -24,6 +24,8 @@ #include #include +#include "q40.h" + /* * Q40 IRQs are defined as follows: * 3,4,5,6,7,10,11,14,15 : ISA dev IRQs