Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp621070pxb; Wed, 27 Jan 2021 17:03:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxeOuO+KFkxRJxj4LAibn+xFSqq39hNG/DagFXUClVzXtwikEh1K/LhmYS6H1tRoxBYPfBG X-Received: by 2002:a50:aad7:: with SMTP id r23mr11169673edc.83.1611795837870; Wed, 27 Jan 2021 17:03:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611795837; cv=none; d=google.com; s=arc-20160816; b=H0T3Gs8AD1Kje2i1dC9G/c4KiCVJkc6ZfdVtlSWxhfa4y5LzfL4Mr6w/QkXbXtxFi2 oANaMCZs7/M3ez6zrgWk8/hVUF1RzF3jlvcYYb17AiMOIGsmefznsHnFFpW0D7xnu9sM 0DquK9qNA9c4uIyD7O4dyv7HhfFuimtOjROXCOROYNDSdD2O9FvjVSxoGmS1zKnMojVp 7mi0sLQ0H/86F9kflL1uUhtAgSXwzcvxpnpvHw0ljAYo7a/PPp1D88DxUFRk82UMgAd9 CssEZoVSgzrZrQYYxSY6KVSiVQdtnTEWTdX72neOSyVAIMyVNNJoGn+Bl2UIgLMXrHHs +g8g== 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:dkim-filter; bh=C9LObEhixqVjpaN6rdMkGqM2Xyb7MoUJDaq7yjC2Zac=; b=KLwLsdl9aLOy3a4+rmoevptpS2Zox4s7GWyS0YRb0+UvdGaL9JMKRDBoKztqqdf5pr lqg7L6Emu3d8rQwVZ5KdrWQKpG0TNPXlWo9eoXZ+czmWgp/DyeI+3eEiW7pm5MKCSLiM +ijqw4MXZR/ihRqQ+vGzHqWq6b55ukQpXpSoxq8Ptl0kii8oFNvaO2fkvmOix33+jiCV YFDfCWyyEsaqwMCnZY8beI7UdovroTeqcL4ind5JOgPuTxNqrkrpN2nmkpsSJ9F5gIT5 wxNYgFrReYnvlFJxTaMRGFeF4D4i6BOot22pTpZf3j5i2d5FQI7KRBaMeibr0Sw3BGF0 xYCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IkmWBDfw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x9si1641057ejc.624.2021.01.27.17.03.33; Wed, 27 Jan 2021 17:03:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=IkmWBDfw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S231370AbhA1BCr (ORCPT + 99 others); Wed, 27 Jan 2021 20:02:47 -0500 Received: from conssluserg-02.nifty.com ([210.131.2.81]:59217 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231389AbhA1A7X (ORCPT ); Wed, 27 Jan 2021 19:59:23 -0500 X-Greylist: delayed 305 seconds by postgrey-1.27 at vger.kernel.org; Wed, 27 Jan 2021 19:59:12 EST Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 10S0u7vN029102; Thu, 28 Jan 2021 09:56:08 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 10S0u7vN029102 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1611795368; bh=C9LObEhixqVjpaN6rdMkGqM2Xyb7MoUJDaq7yjC2Zac=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=IkmWBDfwdvX+igh3pETYYFNb85y9N40ugyD2QkIaSl3gCnqt0sA2rbNJW6YUypyS4 w4JRcmF/UdHxDAmZFKbsN4fgW8UKMP9hKNej5GRQO6ohFyBQ708fW4jl7PX/kJg0J1 aFVW0TiepmxIdUhSebG33ZVax4jGwL8IVMJsg5Z5VH5JR2E9dhGLcMTrjck5EUjVb4 XiCDAfCkir9V8MK+oTVxfhcLK95dOXxN5Ef5fxmKmxTP71wObZ000Fy1HFwSXnlaRO +aq3Mv6FDhai9Zj9oUzf7ysIQnLv9UV6Ej85eWfexeY4VwcIrqO2XVoKs7JYqApRtv FryylukgsGUFA== X-Nifty-SrcIP: [209.85.216.45] Received: by mail-pj1-f45.google.com with SMTP id cq1so2800271pjb.4; Wed, 27 Jan 2021 16:56:08 -0800 (PST) X-Gm-Message-State: AOAM531A5koYxBhePcVZsZXqfWww+AteWwTUD1gRXMZMiRCusdCAVy1J FM8ZTuY3deIaPmEB+QIVvn6KEoCuMxTl814PWmc= X-Received: by 2002:a17:90a:5403:: with SMTP id z3mr8591341pjh.198.1611795367433; Wed, 27 Jan 2021 16:56:07 -0800 (PST) MIME-Version: 1.0 References: <20210128005110.2613902-1-masahiroy@kernel.org> <20210128005110.2613902-3-masahiroy@kernel.org> In-Reply-To: <20210128005110.2613902-3-masahiroy@kernel.org> From: Masahiro Yamada Date: Thu, 28 Jan 2021 09:55:30 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 02/27] x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL() To: linux-arch , X86 ML Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , linux-alpha@vger.kernel.org, linux-arm-kernel , linux-ia64@vger.kernel.org, linux-m68k , linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, Linux-sh list , linux-um@lists.infradead.org, "open list:TENSILICA XTENSA PORT (xtensa)" , linuxppc-dev , sparclinux Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 28, 2021 at 9:52 AM Masahiro Yamada wrote: > > Building kernel/sys_ni.c with W=1 omits tons of -Wmissing-prototypes This is a typo. "omits" -> "emits" > warnings. > > $ make W=1 kernel/sys_ni.o > [ snip ] > CC kernel/sys_ni.o > In file included from kernel/sys_ni.c:10: > ./arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__x64_sys_io_setup' [-Wmissing-prototypes] > 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ > | ^~ > ./arch/x86/include/asm/syscall_wrapper.h:100:2: note: in expansion of macro '__COND_SYSCALL' > 100 | __COND_SYSCALL(x64, sys_##name) > | ^~~~~~~~~~~~~~ > ./arch/x86/include/asm/syscall_wrapper.h:256:2: note: in expansion of macro '__X64_COND_SYSCALL' > 256 | __X64_COND_SYSCALL(name) \ > | ^~~~~~~~~~~~~~~~~~ > kernel/sys_ni.c:39:1: note: in expansion of macro 'COND_SYSCALL' > 39 | COND_SYSCALL(io_setup); > | ^~~~~~~~~~~~ > ./arch/x86/include/asm/syscall_wrapper.h:83:14: warning: no previous prototype for '__ia32_sys_io_setup' [-Wmissing-prototypes] > 83 | __weak long __##abi##_##name(const struct pt_regs *__unused) \ > | ^~ > ./arch/x86/include/asm/syscall_wrapper.h:120:2: note: in expansion of macro '__COND_SYSCALL' > 120 | __COND_SYSCALL(ia32, sys_##name) > | ^~~~~~~~~~~~~~ > ./arch/x86/include/asm/syscall_wrapper.h:257:2: note: in expansion of macro '__IA32_COND_SYSCALL' > 257 | __IA32_COND_SYSCALL(name) > | ^~~~~~~~~~~~~~~~~~~ > kernel/sys_ni.c:39:1: note: in expansion of macro 'COND_SYSCALL' > 39 | COND_SYSCALL(io_setup); > | ^~~~~~~~~~~~ > ... > > __SYS_STUB0() and __SYS_STUBx() defined a few lines above have forward > declarations. Let's do likewise for __COND_SYSCALL() to fix the > warnings. > > Signed-off-by: Masahiro Yamada > --- > > arch/x86/include/asm/syscall_wrapper.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/x86/include/asm/syscall_wrapper.h b/arch/x86/include/asm/syscall_wrapper.h > index a84333adeef2..80c08c7d5e72 100644 > --- a/arch/x86/include/asm/syscall_wrapper.h > +++ b/arch/x86/include/asm/syscall_wrapper.h > @@ -80,6 +80,7 @@ extern long __ia32_sys_ni_syscall(const struct pt_regs *regs); > } > > #define __COND_SYSCALL(abi, name) \ > + __weak long __##abi##_##name(const struct pt_regs *__unused); \ > __weak long __##abi##_##name(const struct pt_regs *__unused) \ > { \ > return sys_ni_syscall(); \ > -- > 2.27.0 > -- Best Regards Masahiro Yamada