Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp436535rwe; Wed, 24 Aug 2022 03:45:00 -0700 (PDT) X-Google-Smtp-Source: AA6agR6byUzhRfVd7KfSP3/fcrFvfX6tP/sOkqIFZWeMFgP75qMVWlYijVwkqVx9+0y/e/zz+NSq X-Received: by 2002:a17:90a:520a:b0:1fa:d8f9:5400 with SMTP id v10-20020a17090a520a00b001fad8f95400mr7840440pjh.42.1661337900694; Wed, 24 Aug 2022 03:45:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661337900; cv=none; d=google.com; s=arc-20160816; b=L6tgJ1fcDRpV7aK9ElISCKhW0KCC008Hr13zIWzxg6kLX0oKHy4yzAbpg87B/Xuxil T6aDFWH3CHCzXa5j9ORS6iKG7phW4IOpAOYuKBN+2XvQxoorfYGkr39+r3Qzzv+4yA/Q ypj4rLyq86vp+L3MDIJ3GZ8KqToXs55Li78vyMDDG35vZwgUYSIRcog685q9BNqNe1rz MICMn1F0tQvJRpdb6w/qWgMT2ib42v+Q+oJSZnKekAY2ullC6j7e7zic+7ljT5DjzHZT +s6XV0Tz1ZbXUvN1S52j4Bi0HNPdaBiQ5OWs+nkH+5vlGcuEuv545YbBh2jH4R4PLnGB Y/1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GMsB/QkgUGuGVP3Sgg2w2DjpVOY+HkKhrlrYtsZfMMw=; b=uFSYAScoNCWijTGpEB8DnmwYEFPgorXOhlQbyq6OJfQLWCJ+Oba6rflq+HABCOvWz5 bTU3LdAyrD6lnFqwGGe8RlaK5BUBBKizLxfwxScJC/U2EeZFXSZ1B7at3CL/4v9ndbZ1 fjmusqYPaQXcVHBI5GAKFY//q5oZnPyKA6jox1aBR4EiCmEz6P9dSwmAYpKK4lcpCiFz Hpfi2FxGc1mQL8E6ZhDbnzVBuJWxY97dGM/KSfySDN7AkbaG0xWyDP0xvw5AYOHy2wsY tH9REpYNWZuE14fB/Kw/Dlq5IbU+j5oiKASdTfCUvNisUBBIVXKfBjQC5LuRPtJq+FEk WnAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LL+lCMg5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z7-20020a655a47000000b00428c216464dsi17852252pgs.711.2022.08.24.03.44.49; Wed, 24 Aug 2022 03:45:00 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LL+lCMg5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235726AbiHXKKa (ORCPT + 99 others); Wed, 24 Aug 2022 06:10:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236495AbiHXKKS (ORCPT ); Wed, 24 Aug 2022 06:10:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 037EF65B4 for ; Wed, 24 Aug 2022 03:10:14 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E844161893 for ; Wed, 24 Aug 2022 10:10:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54C17C433C1 for ; Wed, 24 Aug 2022 10:10:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661335813; bh=G6PUNC1yHfS47YKEJZGI5+6sBFKntc7vGZXPfvBCAvk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=LL+lCMg5cpvXqZdf4dp2ZgfRKaC5aF1gQF//JgCwMIJ1YqpO1tIMyE6BMD/c38dpe +4QdDNwbMmGoCpsEDsCIPRX4GzMXeYocATH2gjhXPaENQglIuRxy164XQEQEtDToAY oNjX6Hq65/mUboyD+e8lOKwr8DD9Un4nVYMmacUB2vyD8Y8ejeh2W6KtrB3r5te5ME bez/fwy/TgnSUJpSVaU5ei/2SUYvzl3mQClOYuHhLS2qzW4i7uQaZaPisT7Rh3XOR3 M+6b6r0cVkncTTBTZ+yfj6j+zytp+bkOJ3ir40YqOrrQ/0fIR2Nl8B2mZDwnVh7Xkv LC1G3t84ouqVA== Received: by mail-ej1-f49.google.com with SMTP id y3so6170558ejc.1 for ; Wed, 24 Aug 2022 03:10:13 -0700 (PDT) X-Gm-Message-State: ACgBeo3ljgUA7otOLMvDgVJN9Qu+qn6x7tEWWB9g6V2xNuG4dEyRWWJY o/sUas8WKe1OEB7voBHsHaOCB27KvQm9q61vgzU= X-Received: by 2002:a17:906:8a69:b0:73d:8e42:abf9 with SMTP id hy9-20020a1709068a6900b0073d8e42abf9mr2454882ejc.547.1661335811571; Wed, 24 Aug 2022 03:10:11 -0700 (PDT) MIME-Version: 1.0 References: <20220820153506.607928-1-chenhuacai@loongson.cn> In-Reply-To: <20220820153506.607928-1-chenhuacai@loongson.cn> From: Arnd Bergmann Date: Wed, 24 Aug 2022 12:09:56 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] LoongArch: Fix build warnings in VDSO To: Huacai Chen Cc: Huacai Chen , loongarch@lists.linux.dev, Xuefeng Li , Guo Ren , Xuerui Wang , Jiaxun Yang , linux-kernel@vger.kernel.org, kernel test robot Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 On Sat, Aug 20, 2022 at 5:35 PM Huacai Chen wrote: > > 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) > { I don't think that adding the declaration before the function is a good workaround here, that is likely to just trigger another warning about declarations in .c files. I would add the declarations into a header file instead. If the prototypes are the same across architectures, this can be a global header that also avoids the warnings elsewhere, otherwise just keep it local to this directory. Arnd