From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 61494C4332F for ; Fri, 10 Dec 2021 18:09:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244095AbhLJSNJ (ORCPT ); Fri, 10 Dec 2021 13:13:09 -0500 Received: from mail-oo1-f45.google.com ([209.85.161.45]:44884 "EHLO mail-oo1-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230284AbhLJSNI (ORCPT ); Fri, 10 Dec 2021 13:13:08 -0500 Received: by mail-oo1-f45.google.com with SMTP id t9-20020a4a8589000000b002c5c4d19723so2576190ooh.11; Fri, 10 Dec 2021 10:09:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bnSiIIEAxVbWb5ME0b4EjQTIeMlzMMlMKVBEVEKFmvo=; b=YI1kQA1tXM8B0BX24su8AbH2RzLXy9vgc9pDId6WATq1J6nWZdFuqMyXfmiybyrhgS T/9Bx98nvJDR2c/KIDCHqf7gLnpfT7gxpQhAnZf6X6aPLiUpN+zVNupoefmXZjjYCP4c k8K5tTzJGsrknUJQ6DYoKi2wVL/5VHLSSBDqNPj/BuQmcE7vL39ESatxNbsddEcxWmdL BOWdBHckq54xn28VHK5H2N6FwUCrHm4eYMQ4HMlF5dNZv2RDcSle1EBlXYXuEe0BNCkz iULn2CYkGgAGFaLJ8BcZ1P2ZFkbyPJz6FnAa/OQn/eKOSqVVGqFCQm/MbA3j9YBVYlvp iz/Q== X-Gm-Message-State: AOAM530zi3fsHOqr0XImH1ZyQnV63iw1997YtO2H/W5mTSb8hBbmGG8Z a/lwzK/qXhnTGZMXWUm06pAMQEvRoXx3B0dDAYc= X-Google-Smtp-Source: ABdhPJylQaHxxBjvxLDdejK26dmax8gF5GO2emXKWarqrtdmHFUWV4Injg4wQQswc1tWUgMSYyPwJPfech+QMe2lThI= X-Received: by 2002:a05:6820:388:: with SMTP id r8mr9365162ooj.0.1639159771506; Fri, 10 Dec 2021 10:09:31 -0800 (PST) MIME-Version: 1.0 References: <20211126180101.27818-1-digetx@gmail.com> <20211126180101.27818-8-digetx@gmail.com> In-Reply-To: <20211126180101.27818-8-digetx@gmail.com> From: "Rafael J. Wysocki" Date: Fri, 10 Dec 2021 19:09:20 +0100 Message-ID: Subject: Re: [PATCH v4 07/25] reboot: Remove extern annotation from function prototypes To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Russell King , Catalin Marinas , Will Deacon , Guo Ren , Geert Uytterhoeven , Greg Ungerer , Joshua Thompson , Thomas Bogendoerfer , Sebastian Reichel , Linus Walleij , Philipp Zabel , Greentime Hu , Vincent Chen , "James E.J. Bottomley" , Helge Deller , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Paul Walmsley , Palmer Dabbelt , Albert Ou , Yoshinori Sato , Rich Felker , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "the arch/x86 maintainers" , "H. Peter Anvin" , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , "Rafael J. Wysocki" , Len Brown , Santosh Shilimkar , Krzysztof Kozlowski , Liam Girdwood , Mark Brown , Pavel Machek , Lee Jones , Andrew Morton , Guenter Roeck , Daniel Lezcano , Andy Shevchenko , Ulf Hansson , alankao@andestech.com, "K . C . Kuen-Chern Lin" , Linux ARM , Linux Kernel Mailing List , linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev , linux-riscv@lists.infradead.org, Linux-sh list , xen-devel@lists.xenproject.org, ACPI Devel Maling List , Linux PM , linux-tegra Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 26, 2021 at 7:02 PM Dmitry Osipenko wrote: > > There is no need to annotate function prototypes with 'extern', it makes > code less readable. Remove unnecessary annotations from . > > Signed-off-by: Dmitry Osipenko I'm not sure that this is really useful. Personally, I tend to respect the existing conventions like this. Surely, this change is not required for the rest of the series to work. > --- > include/linux/reboot.h | 38 +++++++++++++++++++------------------- > 1 file changed, 19 insertions(+), 19 deletions(-) > > diff --git a/include/linux/reboot.h b/include/linux/reboot.h > index 7c288013a3ca..b7fa25726323 100644 > --- a/include/linux/reboot.h > +++ b/include/linux/reboot.h > @@ -40,36 +40,36 @@ extern int reboot_cpu; > extern int reboot_force; > > > -extern int register_reboot_notifier(struct notifier_block *); > -extern int unregister_reboot_notifier(struct notifier_block *); > +int register_reboot_notifier(struct notifier_block *); > +int unregister_reboot_notifier(struct notifier_block *); > > -extern int devm_register_reboot_notifier(struct device *, struct notifier_block *); > +int devm_register_reboot_notifier(struct device *, struct notifier_block *); > > -extern int register_restart_handler(struct notifier_block *); > -extern int unregister_restart_handler(struct notifier_block *); > -extern void do_kernel_restart(char *cmd); > +int register_restart_handler(struct notifier_block *); > +int unregister_restart_handler(struct notifier_block *); > +void do_kernel_restart(char *cmd); > > /* > * Architecture-specific implementations of sys_reboot commands. > */ > > -extern void migrate_to_reboot_cpu(void); > -extern void machine_restart(char *cmd); > -extern void machine_halt(void); > -extern void machine_power_off(void); > +void migrate_to_reboot_cpu(void); > +void machine_restart(char *cmd); > +void machine_halt(void); > +void machine_power_off(void); > > -extern void machine_shutdown(void); > +void machine_shutdown(void); > struct pt_regs; > -extern void machine_crash_shutdown(struct pt_regs *); > +void machine_crash_shutdown(struct pt_regs *); > > /* > * Architecture independent implementations of sys_reboot commands. > */ > > -extern void kernel_restart_prepare(char *cmd); > -extern void kernel_restart(char *cmd); > -extern void kernel_halt(void); > -extern void kernel_power_off(void); > +void kernel_restart_prepare(char *cmd); > +void kernel_restart(char *cmd); > +void kernel_halt(void); > +void kernel_power_off(void); > > extern int C_A_D; /* for sysctl */ > void ctrl_alt_del(void); > @@ -77,15 +77,15 @@ void ctrl_alt_del(void); > #define POWEROFF_CMD_PATH_LEN 256 > extern char poweroff_cmd[POWEROFF_CMD_PATH_LEN]; > > -extern void orderly_poweroff(bool force); > -extern void orderly_reboot(void); > +void orderly_poweroff(bool force); > +void orderly_reboot(void); > void hw_protection_shutdown(const char *reason, int ms_until_forced); > > /* > * Emergency restart, callable from an interrupt handler. > */ > > -extern void emergency_restart(void); > +void emergency_restart(void); > #include > > #endif /* _LINUX_REBOOT_H */ > -- > 2.33.1 >