From patchwork Wed Nov 8 12:58:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 13450029 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D04AC4332F for ; Wed, 8 Nov 2023 13:00:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4L3eo5Tdvmea6gCBsDofO7nYA4ooG7WiNwhbm6PHmLU=; b=3R7huJolr2Jp7b WiKw3qWDuerpI2jNMnHJYXNe34qL+C8GWDSc/M4+dsxGsDgxjXI+l0CF4S+xa2RcUnn091/2k0hXc jRFBQ78llbH1LNn3Zuq1kfxTasljVRFrhdV09usC6VmcECxm+ilAKFkcw5ftQEvsydSM0EV5HHWSs kAWcpsMLk1MhP+IYaMoK045q2wTFZS6/h3sBeqCW9z61CGW+Tgwp9+LDILS6T2Cr44DhqqHzAoJFA ewlLe7YNfnlQdlT9C3lBqagbu4M9ijoOMwWZwfNsSya3SPtF352OS1oHzC0a4K/qufJ43aHtW38Vn OE9jGYhy+5uRW8JtBIag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r0iAE-003pNg-0g; Wed, 08 Nov 2023 13:00:10 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r0iA7-003pJH-0m; Wed, 08 Nov 2023 13:00:05 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 2D151615BA; Wed, 8 Nov 2023 13:00:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A176C433D9; Wed, 8 Nov 2023 12:59:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1699448402; bh=lWSNAkUa9zp9KaZHQMU5GW4zFS42gSKCMng8P6T4A2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U6dgTgqdrhjCu/me4BW5zxGXxjkr3PVJ1avxPAZ6so0kvLG8+yeKS1POYYVMevcff ej2TK9Qha2L8Mi7XQdRSl+xglVkhgvVrVNZW+ORQMvL9bwQhn8LizVhhMSOgSPns7u JJyzzo+WsONP/YGaENuw0woNnreq3zT9OSDFf0LY703y2te6yNDmw7EQyq7guOhrXC ObIXRkM7LuyUPJ5UZPajzeSUMzXsZ/oTNFS2AJ66D/lUMhyNIjeaTtoFkQGGCIJgxj RCicg9Ci7MtSk8h1rZwozbVS6sb/U0v0rjiKUe13d/py/jMXF9uCJB9/QPCiHgI0di LaebSIFDWfJMQ== From: Arnd Bergmann To: Andrew Morton , linux-kernel@vger.kernel.org, Masahiro Yamada , linux-kbuild@vger.kernel.org Cc: Arnd Bergmann , Matt Turner , Vineet Gupta , Russell King , Catalin Marinas , Will Deacon , Steven Rostedt , Masami Hiramatsu , Mark Rutland , Guo Ren , Peter Zijlstra , Ard Biesheuvel , Huacai Chen , Greg Ungerer , Michal Simek , Thomas Bogendoerfer , Dinh Nguyen , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Geoff Levand , Palmer Dabbelt , Heiko Carstens , John Paul Adrian Glaubitz , "David S. Miller" , Andy Lutomirski , Thomas Gleixner , Ingo Molnar , x86@kernel.org, Helge Deller , Sudip Mukherjee , Greg Kroah-Hartman , Timur Tabi , Kent Overstreet , David Woodhouse , "Naveen N. Rao" , Anil S Keshavamurthy , Kees Cook , Vincenzo Frascino , Juri Lelli , Vincent Guittot , Nathan Chancellor , Nick Desaulniers , Nicolas Schier , Al Viro , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-trace-kernel@vger.kernel.org, linux-csky@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, netdev@vger.kernel.org, linux-parisc@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-bcachefs@vger.kernel.org, linux-mtd@lists.infradead.org Subject: [PATCH 04/22] [RESEND] time: make sysfs_get_uname() function visible in header Date: Wed, 8 Nov 2023 13:58:25 +0100 Message-Id: <20231108125843.3806765-5-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231108125843.3806765-1-arnd@kernel.org> References: <20231108125843.3806765-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231108_050003_370981_495A75B1 X-CRM114-Status: GOOD ( 14.31 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann This function is defined globally in clocksource.c and used conditionally in clockevent.c, which the declaration hidden when clockevent support is disabled. This causes a harmless warning in the definition: kernel/time/clocksource.c:1324:9: warning: no previous prototype for 'sysfs_get_uname' [-Wmissing-prototypes] 1324 | ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt) Move the declaration out of the #ifdef so it is always visible. Signed-off-by: Arnd Bergmann Reviewed-by: Uwe Kleine-König --- kernel/time/tick-internal.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h index 649f2b48e8f0..481b7ab65e2c 100644 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h @@ -56,7 +56,6 @@ extern int clockevents_program_event(struct clock_event_device *dev, ktime_t expires, bool force); extern void clockevents_handle_noop(struct clock_event_device *dev); extern int __clockevents_update_freq(struct clock_event_device *dev, u32 freq); -extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt); /* Broadcasting support */ # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST @@ -197,3 +196,5 @@ void hrtimers_resume_local(void); #else #define JIFFIES_SHIFT 8 #endif + +extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt);