Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1012258rdd; Wed, 10 Jan 2024 06:16:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IGClXEwmGKVuh6CiteVNcb+09QOFrIcB4BWk+gkNj+/+5KQNyt1FGp5tLKH2TVmgQy9xG8u X-Received: by 2002:a05:6512:b02:b0:50e:6b69:6ab9 with SMTP id w2-20020a0565120b0200b0050e6b696ab9mr603988lfu.21.1704896169701; Wed, 10 Jan 2024 06:16:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704896169; cv=none; d=google.com; s=arc-20160816; b=QJIedTN1BO4cWlPYu7jV0kxsB1Ali+/keAqARR/dkia6ASYw6ZIaRwHzW9vFYdPkwI IEItvK9zMv6PTz2zNnxKGMIzkPLRh+RfVvwF7PCoHdI6k77fMy7WZoNOpI+uVlMo8N2k tSOeGExVWCs3GG55oKUQaw9Vxr2RvjmiMb/3FQgtI3HOGdA90N0kbzCKiACZBFeOPWk/ +SoaG00/ct1xgrvCF5mnDXgZeMikME0tFHpgI8DUIohEdrX55BFg+/gXPkXnxHf1vBj4 t/NT9We19SFLaE3WHSuJqEClEEcsoCrw8B1zxexqxK59ivoeC2AhO7lJVpK+2UXmbPD9 2H3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=ou9sJvQSeeR4HtOR/Ml8GU9JP2QxF1IyETHd5osi77Y=; fh=w9jWcao72cM+Iy+fxFS+Gmz/kk7t5dIHaMc72tA4caQ=; b=OyWaI993PG5u0HzXRk6b8uoDhNuhnp5uDcwAR7N47sWrblsf+T9vqk1ZXVN3Nd9TpP JwHFKx17g/B/D99JAWIJRzlWheKUxHeLads9Vv1sQ3b9kRM1XVaV1U5TRLErMkA8wsyk ZShnThzcCJ0scypwaS650+RYkPDvWArkSIHg7JqK6usGqu4N9vnYbSmb/dwiTDA8ZeyA tdVQRtK5JPmmBRq+qh+jSAdrESIvAIkD2PFh4TN5W/vlhIaOBGcalTNfiYSRDxwWnDnR ugsAiQI6or9uUFyGcHvpnyHGRBzkW+cyDz8dp5ZBVGMagQTdG1rqNkaErxX0d71A78pI hSXw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-22331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22331-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t19-20020a50d713000000b0055762efa148si1795428edi.375.2024.01.10.06.16.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 06:16:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-22331-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22331-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B074A1F262D1 for ; Wed, 10 Jan 2024 14:16:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BFBB24BAB3; Wed, 10 Jan 2024 14:13:58 +0000 (UTC) Received: from albert.telenet-ops.be (albert.telenet-ops.be [195.130.137.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF3D54A98B for ; Wed, 10 Jan 2024 14:13:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux-m68k.org Received: from ramsan.of.borg ([IPv6:2a02:1810:ac12:ed40:b0d9:a4e2:30ba:1f13]) by albert.telenet-ops.be with bizsmtp id Z2Dn2B0071LwnfP062DntR; Wed, 10 Jan 2024 15:13:48 +0100 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1rNZKK-00F4Hl-UA; Wed, 10 Jan 2024 15:13:47 +0100 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1rNYWm-007fie-3M; Wed, 10 Jan 2024 14:21:52 +0100 From: Geert Uytterhoeven To: Greg Kroah-Hartman Cc: Arnd Bergmann , Philip Blundell , Kars de Jong , linux-m68k@lists.linux-m68k.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] serial: 8250: Move hp300_setup_serial_console() to Date: Wed, 10 Jan 2024 14:21:46 +0100 Message-Id: X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If CONFIG_SERIAL_8250_HP300=y and CONFIG_SERIAL_8250_CONSOLE=y (e.g. m68k/allyesconfig): drivers/tty/serial/8250/8250_hp300.c:91:12: error: no previous prototype for ‘hp300_setup_serial_console’ [-Werror=missing-prototypes] 91 | int __init hp300_setup_serial_console(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ Fix this by moving the existing prototype in arch/m68k/hp300/config.c to , so it is visible to both caller and implementor. While at it, provide a dummy in case CONFIG_SERIAL_8250_CONSOLE is not enabled, to reduce #ifdef clutter in the caller. Exposed by commit 0fcb70851fbfea17 ("Makefile.extrawarn: turn on missing-prototypes globally"). Signed-off-by: Geert Uytterhoeven --- arch/m68k/hp300/config.c | 6 +----- include/linux/serial_8250.h | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/arch/m68k/hp300/config.c b/arch/m68k/hp300/config.c index e4bd6913f50e9ef3..1a27398523517a65 100644 --- a/arch/m68k/hp300/config.c +++ b/arch/m68k/hp300/config.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -67,9 +68,6 @@ static char *hp300_models[] __initdata = { static char hp300_model_name[13] = "HP9000/"; extern void hp300_reset(void); -#ifdef CONFIG_SERIAL_8250_CONSOLE -extern int hp300_setup_serial_console(void) __init; -#endif int __init hp300_parse_bootinfo(const struct bi_record *record) { @@ -263,7 +261,5 @@ void __init config_hp300(void) } else { panic("Unknown HP9000 Model"); } -#ifdef CONFIG_SERIAL_8250_CONSOLE hp300_setup_serial_console(); -#endif } diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index be65de65fe612007..fd59ed2cca53e967 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h @@ -210,6 +210,12 @@ int serial8250_console_exit(struct uart_port *port); void serial8250_set_isa_configurator(void (*v)(int port, struct uart_port *up, u32 *capabilities)); +#ifdef CONFIG_SERIAL_8250_CONSOLE +extern int hp300_setup_serial_console(void) __init; +#else +static inline int hp300_setup_serial_console(void) { return 0; } +#endif + #ifdef CONFIG_SERIAL_8250_RT288X int rt288x_setup(struct uart_port *p); int au_platform_setup(struct plat_serial8250_port *p); -- 2.34.1