Received: by 2002:a05:6358:5282:b0:b5:90e7:25cb with SMTP id g2csp555039rwa; Sat, 20 Aug 2022 08:54:51 -0700 (PDT) X-Google-Smtp-Source: AA6agR4ETHyJU3k+NGHyoOWzXfDa0ddbSsTL55lLTFz5ySqDGDx9CYATEg63E7bZadMdjpg9TrBe X-Received: by 2002:a17:902:8605:b0:16b:e755:3c6e with SMTP id f5-20020a170902860500b0016be7553c6emr12419684plo.42.1661010890883; Sat, 20 Aug 2022 08:54:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661010890; cv=none; d=google.com; s=arc-20160816; b=FicogTG4mdEFxdwbVgw4cr8Oj8Yrixw/5L/rsM86ho4j7OKC4w7zUU0qUmnsrQuJeh MPeJFE2E93JbbgqFfCUcpzm5IeIvL1zsBLno6P8XhCRtQMmcqFrma3mha4csvIzIPvEN bEB/4TbByDboxuYiWPKtjMoZbAF4sO0KUfsuOr9SPeilaMVQsdJcLB3RnivYF4KaUtDI RPeW4JNM+pmUFAQAqr5OYIrTHyQHXiiN1XV1q2RbjHEyGkVpLb2BaAM30XlnXWFWV0Ea rxNXYMlGxIQkJhaTJFJvjXrxhIvA+BuDyered1p2Ag83EIpw9gHah5f/PUO1cMDfbaHY OtfA== 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 :message-id:date:subject:cc:to:from; bh=wXb1jyV+SUBXkqSyHNCJV43qONP9i15AynOPoye3Sns=; b=p0mtqk421YDPgCthUcrR3/+Q9DDE01Yl2YKcSxdpfO3OgLei8YtgC9Cf9xbCmJhbmu C4ODG89D9UQIf+X+LAbr1fOYv04Nb6XnImbnMkeXHb5ztzn6zz5HNEKQBXSFZoOtaGrt 60nfwcQhSNO+RX7aTvrbqO/+cLEER++9KBfqHdLBMGymrcPn3TrfVkRRnZkmZhZhLtzX UDK6iiyJQkNGHHrEoP7aIMgv+cLm6kgGFIZY7kOOAkt8IXiCL6VTmI9G4U2iKUX5A+wN V7V39QrmhjqSRBqgI8NlgYXtG27ARcMMlhmL6rMexDJMc2kr9poHk+CkiT99yxtrM0PH 09uw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a170902f70700b0016f002733e3si7173861plo.497.2022.08.20.08.54.31; Sat, 20 Aug 2022 08:54:50 -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 S1346147AbiHTPfZ (ORCPT + 99 others); Sat, 20 Aug 2022 11:35:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345955AbiHTPfY (ORCPT ); Sat, 20 Aug 2022 11:35:24 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C58463F2E for ; Sat, 20 Aug 2022 08:35:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 33860B8068C for ; Sat, 20 Aug 2022 15:35:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 73429C433C1; Sat, 20 Aug 2022 15:35:18 +0000 (UTC) From: Huacai Chen To: Huacai Chen Cc: loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, Huacai Chen , kernel test robot Subject: [PATCH] LoongArch: Fix build warnings in VDSO Date: Sat, 20 Aug 2022 23:35:06 +0800 Message-Id: <20220820153506.607928-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 Fix build warnings in VDSO as below: arch/loongarch/vdso/vgettimeofday.c:9:5: warning: no previous prototype for '__vdso_clock_gettime' [-Wmissing-prototypes] 9 | int __vdso_clock_gettime(clockid_t clock, | ^~~~~~~~~~~~~~~~~~~~ arch/loongarch/vdso/vgettimeofday.c:15:5: warning: no previous prototype for '__vdso_gettimeofday' [-Wmissing-prototypes] 15 | int __vdso_gettimeofday(struct __kernel_old_timeval *tv, | ^~~~~~~~~~~~~~~~~~~ arch/loongarch/vdso/vgettimeofday.c:21:5: warning: no previous prototype for '__vdso_clock_getres' [-Wmissing-prototypes] 21 | int __vdso_clock_getres(clockid_t clock_id, | ^~~~~~~~~~~~~~~~~~~ arch/loongarch/vdso/vgetcpu.c:27:5: warning: no previous prototype for '__vdso_getcpu' [-Wmissing-prototypes] 27 | int __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused) Reported-by: kernel test robot Signed-off-by: Huacai Chen --- arch/loongarch/vdso/vgetcpu.c | 2 ++ arch/loongarch/vdso/vgettimeofday.c | 15 +++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/loongarch/vdso/vgetcpu.c b/arch/loongarch/vdso/vgetcpu.c index 43a0078e4418..e02e775f5360 100644 --- a/arch/loongarch/vdso/vgetcpu.c +++ b/arch/loongarch/vdso/vgetcpu.c @@ -24,6 +24,8 @@ static __always_inline const struct vdso_pcpu_data *get_pcpu_data(void) return (struct vdso_pcpu_data *)(get_vdso_base() - VDSO_DATA_SIZE); } +extern +int __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused); int __vdso_getcpu(unsigned int *cpu, unsigned int *node, struct getcpu_cache *unused) { int cpu_id; diff --git a/arch/loongarch/vdso/vgettimeofday.c b/arch/loongarch/vdso/vgettimeofday.c index b1f4548dae92..8f22863bd7ea 100644 --- a/arch/loongarch/vdso/vgettimeofday.c +++ b/arch/loongarch/vdso/vgettimeofday.c @@ -6,20 +6,23 @@ */ #include -int __vdso_clock_gettime(clockid_t clock, - struct __kernel_timespec *ts) +extern +int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts); +int __vdso_clock_gettime(clockid_t clock, struct __kernel_timespec *ts) { return __cvdso_clock_gettime(clock, ts); } -int __vdso_gettimeofday(struct __kernel_old_timeval *tv, - struct timezone *tz) +extern +int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz); +int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) { return __cvdso_gettimeofday(tv, tz); } -int __vdso_clock_getres(clockid_t clock_id, - struct __kernel_timespec *res) +extern +int __vdso_clock_getres(clockid_t clock_id, struct __kernel_timespec *res); +int __vdso_clock_getres(clockid_t clock_id, struct __kernel_timespec *res) { return __cvdso_clock_getres(clock_id, res); } -- 2.31.1