From patchwork Wed Sep 13 14:08:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 138831 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9ecd:0:b0:3f2:4152:657d with SMTP id t13csp1120474vqx; Wed, 13 Sep 2023 07:20:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEBilShUkpChl+wq4O3lT1qRgtYw91z4b4rLZQM5Jr7OqEVxKvOMdZvyUe2Qu4e6S4WA2eI X-Received: by 2002:aca:1c18:0:b0:3a4:57a7:b30e with SMTP id c24-20020aca1c18000000b003a457a7b30emr2759034oic.26.1694614805241; Wed, 13 Sep 2023 07:20:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694614805; cv=none; d=google.com; s=arc-20160816; b=nLAqnEMLCUCnXDuxG+MKT6JtkMnODZvt+S0czU2Zv3EaI0HZ+LN3+zHt7/kap3OA37 BN7EO6Uz1dEmTPJ7JgYVuYiBtdV9Htsc8A7uLioFg59v25G0dKF3Y13jNaHXFnPwY4YJ DsNoCFBarGB/C50pUKzWYRa9hrNYUeu/yzX2X9/XXZh9dbm7/a49T7XVqTb/lKuUEm16 0SEMUKrUq9wOU5tJzBjsc1pYO3Lmt8e2iSr9VE4aEART7k+72NgjwwEFk1l5ruFAGkU6 nZejKQwwr+6YoVRtJeHehT3EleeeOKa3W1GE7JILiVuzrAEny0V29OpTIpgWbP2fxw4R uOOA== 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=1PGt7KFiaxdGU2pNB9Ea0b+MyypcU7J4ocvWFj0AAIA=; fh=fKMC3BTGjlLXl5EvEhzqt3WHCynqYJKK7wAqLAOkWUw=; b=xir/Pm6ARxmmVEoozos8eMf4wYQMdAedKzyc21nRb1lyyspEouPnVRnijQFmiOeAo1 V+3My3G+Yx1iaRKvxboiuf9GSx6PfP0jYFT2KK0qIOzHjhsWnqS0/6KpPFC4RYq2K4I4 nJQGM8XgKjpv6UBMpVscqQjRKef82zU7gqM9DVIqtKIAiwuJg1Y0oTPdMVCZ5Dm/okzl 3zamzN70VJcqjUrKwD6bgL3BpcAC/WjJ/ebZb0EayFRjiVWegnZOY6Xt3CL056tjGPHI 9voUXtkdGgQoj7lAuKPeUzJRHqiiOvOj6VPlWMuys/armYOTklFc4ishWShG4I8KezU6 N4pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id t23-20020a656097000000b0056c403cd154si9748979pgu.595.2023.09.13.07.20.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Sep 2023 07:20:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id D22C380C03A3; Wed, 13 Sep 2023 07:10:23 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241436AbjIMOKR (ORCPT + 36 others); Wed, 13 Sep 2023 10:10:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241377AbjIMOJW (ORCPT ); Wed, 13 Sep 2023 10:09:22 -0400 Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440381BD4 for ; Wed, 13 Sep 2023 07:08:52 -0700 (PDT) Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:f674:9611:cd05:f25a]) by laurent.telenet-ops.be with bizsmtp id lS8n2A00D3fvA4V01S8nmG; Wed, 13 Sep 2023 16:08:48 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qgQXe-003csx-3N; Wed, 13 Sep 2023 16:08:47 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qgQXv-00FV5w-Ej; Wed, 13 Sep 2023 16:08:47 +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 v2 32/52] m68k: mac: Add and use "mac.h" Date: Wed, 13 Sep 2023 16:08:22 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 13 Sep 2023 07:10:23 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776932414177956462 X-GMAIL-MSGID: 1776932414177956462 When building with W=1: arch/m68k/mac/iop.c:235:13: warning: no previous prototype for ‘iop_init’ [-Wmissing-prototypes] 235 | void __init iop_init(void) | ^~~~~~~~ arch/m68k/mac/via.c:112:13: warning: no previous prototype for ‘via_init’ [-Wmissing-prototypes] 111 | void __init via_init(void) | ^~~~~~~~ arch/m68k/mac/via.c:623:13: warning: no previous prototype for ‘via_init_clock’ [-Wmissing-prototypes] 593 | void __init via_init_clock(void) | ^~~~~~~~~~~~~~ arch/m68k/mac/oss.c:37:13: warning: no previous prototype for ‘oss_init’ [-Wmissing-prototypes] 37 | void __init oss_init(void) | ^~~~~~~~ arch/m68k/mac/psc.c:76:13: warning: no previous prototype for ‘psc_init’ [-Wmissing-prototypes] 76 | void __init psc_init(void) | ^~~~~~~~ arch/m68k/mac/baboon.c:25:13: warning: no previous prototype for ‘baboon_init’ [-Wmissing-prototypes] 25 | void __init baboon_init(void) | ^~~~~~~~~~~ arch/m68k/mac/macboing.c:155:6: warning: no previous prototype for ‘mac_mksound’ [-Wmissing-prototypes] 155 | void mac_mksound( unsigned int freq, unsigned int length ) | ^~~~~~~~~~~ arch/m68k/mac/misc.c:608:5: warning: no previous prototype for ‘mac_hwclk’ [-Wmissing-prototypes] 608 | int mac_hwclk(int op, struct rtc_time *t) | ^~~~~~~~~ Fix this by introducing a new header file "mac.h" for holding the prototypes of functions implemented in arch/m68k/mac/. Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann --- v2: - Add Acked-by. --- arch/m68k/mac/baboon.c | 2 ++ arch/m68k/mac/config.c | 12 ++---------- arch/m68k/mac/iop.c | 2 ++ arch/m68k/mac/mac.h | 25 +++++++++++++++++++++++++ arch/m68k/mac/macboing.c | 2 ++ arch/m68k/mac/misc.c | 2 ++ arch/m68k/mac/oss.c | 2 ++ arch/m68k/mac/psc.c | 2 ++ arch/m68k/mac/via.c | 2 ++ 9 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 arch/m68k/mac/mac.h diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c index a7d280220662c747..5c97a7058bcdee2e 100644 --- a/arch/m68k/mac/baboon.c +++ b/arch/m68k/mac/baboon.c @@ -15,6 +15,8 @@ #include #include +#include "mac.h" + int baboon_present; static volatile struct baboon *baboon; diff --git a/arch/m68k/mac/config.c b/arch/m68k/mac/config.c index d56affefd5cabeb5..e324410ef239c09f 100644 --- a/arch/m68k/mac/config.c +++ b/arch/m68k/mac/config.c @@ -50,22 +50,14 @@ #include #include +#include "mac.h" + /* Mac bootinfo struct */ struct mac_booter_data mac_bi_data; /* The phys. video addr. - might be bogus on some machines */ static unsigned long mac_orig_videoaddr; -extern int mac_hwclk(int, struct rtc_time *); -extern void iop_init(void); -extern void via_init(void); -extern void via_init_clock(void); -extern void oss_init(void); -extern void psc_init(void); -extern void baboon_init(void); - -extern void mac_mksound(unsigned int, unsigned int); - static void mac_get_model(char *str); static void mac_identify(void); static void mac_report_hardware(void); diff --git a/arch/m68k/mac/iop.c b/arch/m68k/mac/iop.c index 010b3b5ae8e8584a..a92740d530ac4fbe 100644 --- a/arch/m68k/mac/iop.c +++ b/arch/m68k/mac/iop.c @@ -119,6 +119,8 @@ #include #include +#include "mac.h" + #ifdef DEBUG #define iop_pr_debug(fmt, ...) \ printk(KERN_DEBUG "%s: " fmt, __func__, ##__VA_ARGS__) diff --git a/arch/m68k/mac/mac.h b/arch/m68k/mac/mac.h new file mode 100644 index 0000000000000000..d3d142cea3b4b911 --- /dev/null +++ b/arch/m68k/mac/mac.h @@ -0,0 +1,25 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +struct rtc_time; + +/* baboon.c */ +void baboon_init(void); + +/* iop.c */ +void iop_init(void); + +/* misc.c */ +int mac_hwclk(int op, struct rtc_time *t); + +/* macboing.c */ +void mac_mksound(unsigned int freq, unsigned int length); + +/* oss.c */ +void oss_init(void); + +/* psc.c */ +void psc_init(void); + +/* via.c */ +void via_init(void); +void via_init_clock(void); diff --git a/arch/m68k/mac/macboing.c b/arch/m68k/mac/macboing.c index 76431241347682fc..faea2265a540192d 100644 --- a/arch/m68k/mac/macboing.c +++ b/arch/m68k/mac/macboing.c @@ -16,6 +16,8 @@ #include #include +#include "mac.h" + static int mac_asc_inited; /* * dumb triangular wave table diff --git a/arch/m68k/mac/misc.c b/arch/m68k/mac/misc.c index 65107abc8848232c..4c8f8cbfa05f3404 100644 --- a/arch/m68k/mac/misc.c +++ b/arch/m68k/mac/misc.c @@ -25,6 +25,8 @@ #include +#include "mac.h" + /* * Offset between Unix time (1970-based) and Mac time (1904-based). Cuda and PMU * times wrap in 2040. If we need to handle later times, the read_time functions diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c index 921e6c092f2c6626..1641607f300d981c 100644 --- a/arch/m68k/mac/oss.c +++ b/arch/m68k/mac/oss.c @@ -27,6 +27,8 @@ #include #include +#include "mac.h" + int oss_present; volatile struct mac_oss *oss; diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c index 0d0965b19c09b439..b4183cf66efef7f5 100644 --- a/arch/m68k/mac/psc.c +++ b/arch/m68k/mac/psc.c @@ -26,6 +26,8 @@ #include #include +#include "mac.h" + #define DEBUG_PSC volatile __u8 *psc; diff --git a/arch/m68k/mac/via.c b/arch/m68k/mac/via.c index 3d11d6219cdd56da..01e6b0e37f8dd0e8 100644 --- a/arch/m68k/mac/via.c +++ b/arch/m68k/mac/via.c @@ -38,6 +38,8 @@ #include #include +#include "mac.h" + volatile __u8 *via1, *via2; int rbv_present; int via_alt_mapping;