Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3449216pxb; Fri, 12 Feb 2021 20:53:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQ3mXkSEdpDAGU0wrSARX9DxAMl7QVicMpR2w0RstLZwmhCfX344sLRZ0ASZPliNqBeOAA X-Received: by 2002:a05:6402:1bc7:: with SMTP id ch7mr6611551edb.124.1613192018599; Fri, 12 Feb 2021 20:53:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613192018; cv=none; d=google.com; s=arc-20160816; b=VfSF3550FXEdmElP9Sn3SFNpza1WOTdSOocvY2pDx47lrus1qJeY31bLV9InSsuDdd R9aZOap+L6Ih7hsTTphR8yu5D8Xd8T3SLiRQOjo7TBC9KZsOJnrFNrWGuhoy8Mzv+dbN +AWwefoGXhXRzJ68a8Uyi1e3KJMcl/jAyOc5fI0SeIf4E+2JtyCNU8w2JkEjRIlXOz+G LgTaaTj1B8QCBUgikmI+IKGhHG18RAtE5HZxGmhP0fPxKSm5loY/Vs3RrdFaOxogYnRU pycaF2UcJYhRMIp2BhCeFgixP08MdkKQiEsMPwbZ5t/c8H4B/OfvfnzKN2LnMOcbpEJO /Hbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:dkim-filter; bh=F5rAstRKVcnldUmASCxQnLhZwn4DufsgGL1w1X7AFfs=; b=UwS0iUuQzGYewUFAGtvBsm5JPNVyTxH1s70vKa3miEESTZHFaBhm9gSqrleJ0vDYSa Bun8Z1ZJNzRQG9r+wGRlZt2/4V5ANdzrFUVeMbSdCaB4cBAs1mSLXvAzven/vXvhGbaB JbgxP55D5bNk3SPeLohvwH2Lk5utt8t4JwvLL1wsDMlpzHm+9YOoZ3qx2n1TKu5XOc6g K16PaG/NM0mtleH8mG0uMzGAleb7wHfQwOeTJPiCsrXaRB3G3dq/CWvuKqHzEcPwOuWn 4JIBNGB+gi4jm0vOODLV1RJrDE13zkV3FyZY3CtKShSkvWOLq/QsGFA8LCGNsWS1PGta NLzA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=kkpUarNa; 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 y25si7828102ejb.546.2021.02.12.20.53.13; Fri, 12 Feb 2021 20:53:38 -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=kkpUarNa; 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 S231699AbhBMEwj (ORCPT + 99 others); Fri, 12 Feb 2021 23:52:39 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:47950 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbhBMEwh (ORCPT ); Fri, 12 Feb 2021 23:52:37 -0500 Received: from mail-pg1-f174.google.com (mail-pg1-f174.google.com [209.85.215.174]) (authenticated) by conssluserg-06.nifty.com with ESMTP id 11D4pUOw003083; Sat, 13 Feb 2021 13:51:30 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com 11D4pUOw003083 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1613191891; bh=F5rAstRKVcnldUmASCxQnLhZwn4DufsgGL1w1X7AFfs=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=kkpUarNaB20eqpe1Sati0y360f5NaP05pmUMhRh2z74rUlAuBzGGPvGts0tMiGDxH qSp0FSF7x8GRxyH/WXBxFwabMNDJ6My79VbqdiyN5H7D+WCZEyGu74TZEBinkxrYG4 z5svoDqoJchN/M1jPULH3ICaSlvMECqrBsf5aE7VRPUL09VxgiAIETRsP1CNNxAjM/ JANmGUdPes12FIU6EhRCp4HV2xwFsyHqdSSL/XO0hlnJ6BSpJhy7pSi8uJb5JTtcye 9JrZXJHr66fMiSsGZ3uSZPpowjzlZ+XBRFvoMhX0KXVjS5D2jSrx4jUoVVzfogRk8i KLabM4lfvq3FA== X-Nifty-SrcIP: [209.85.215.174] Received: by mail-pg1-f174.google.com with SMTP id o7so983003pgl.1; Fri, 12 Feb 2021 20:51:30 -0800 (PST) X-Gm-Message-State: AOAM5339SzKTYHgSelGwai2DFq+51MpHUEN8Gcngc96FW2+U+CecZB9b bT9+yGEZxzPHAE46aPSetKDIrREfreNdmyKkY8I= X-Received: by 2002:a63:575e:: with SMTP id h30mr6167948pgm.7.1613191889994; Fri, 12 Feb 2021 20:51:29 -0800 (PST) MIME-Version: 1.0 References: <20210128005110.2613902-1-masahiroy@kernel.org> <20210128005110.2613902-3-masahiroy@kernel.org> <41f7ad59-6ee7-db95-0e56-861c61e8318f@digikod.net> In-Reply-To: From: Masahiro Yamada Date: Sat, 13 Feb 2021 13:50:52 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 02/27] x86/syscalls: fix -Wmissing-prototypes warnings from COND_SYSCALL() To: =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= Cc: Linux Kbuild mailing list , Linux Kernel Mailing List , kernel test robot , linux-arch , X86 ML , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Linus Torvalds Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Feb 13, 2021 at 12:12 AM Micka=C3=ABl Sala=C3=BCn = wrote: > > Could you please push this patch to Linus? Thanks. > > On 04/02/2021 15:16, Micka=C3=ABl Sala=C3=BCn wrote: > > > > On 28/01/2021 01:50, Masahiro Yamada wrote: > >> Building kernel/sys_ni.c with W=3D1 omits tons of -Wmissing-prototypes > >> warnings. > >> > >> $ make W=3D1 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 p= rototype 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 p= rototype 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 > > > > Tested-by: Micka=C3=ABl Sala=C3=BCn > > > > Thanks to this patch we avoid multiple emails from Intel's bot when > > adding new syscalls. :) Thanks for the reminder. I will fix the typo "omits" -> "emits" and send v2 just in case. > > > > > >> --- > >> > >> 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_re= gs *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(); \ > >> --=20 Best Regards Masahiro Yamada