Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1744775pxj; Wed, 19 May 2021 12:54:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyIs76scuEAJw5EljuStA4TPROJ8aBZkA935Jn+ODxBIvvHUl8HFiz2H7yHB+GtgE3uIxGU X-Received: by 2002:a17:906:6717:: with SMTP id a23mr848442ejp.410.1621454088245; Wed, 19 May 2021 12:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621454088; cv=none; d=google.com; s=arc-20160816; b=TPMioha8awKbC+68OJ+lRdUf+yNNvHigvupCI+XnQy+sRZtrH+zdC67wUlF0O9IIEn 802F4LDfml5mY3AoQxzRape/algrvLUofFdJIxaqG3eQff4luxE2YTX/FLQaQ2QQfWQQ KNVnE6dOBSCtg5ErI8XoFjHW3JXCtZE/d5LBl7s+K8yJRYbZozRn0j9DLzHNY4X4uQPr KxH+MISSb6qqjswEkj8+W0K6SaDM7+dhBREChwTH2xslylRGFiU5/0oJYMhoq/QTbDpc 4xaZG4pCpmLBnBRuai9FWxHc3IxW/KJnLeNfcqAHXbbc3tGqF3CWf3loC9dDV0jnja5r EaZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:dkim-signature; bh=AX1KyNTr3f6ACIFrlzPJ/39X6FbXJDzADF33t6t89Y0=; b=lwdx1lThi7DAeCY+0ygugnolEtjn0NPhsE9xZF3Q9zIO71GI3f9xHYEnsKdAqGzIik GE9rwCdwJ6t2OQWSUcHPHKpiiemhiT/R70a0RlQC3J+MIuLRFDxKGAumDHHOHekK+Hra xM84pZbbz4iKRrTGPejH6hb7XjWD4KChI+nNgATFk3aLePUIz1nX+utuyqsFN0xmQs9O shA8e716ZbQwFiOHmFtdAHdblBAGgBocqbttpumtItzLgOz58XlVJHamC8eD5BdtORjc x9BLcPpf4iMk5BcMbBjN1ukn2lDxTc5f53XYvM4SjaNuxEvxGcawi9t5nZ0qJl9A7s4K 2tWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@flygoat.com header.s=fm2 header.b=SxapN2vN; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mDFcChx2; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si3604edd.87.2021.05.19.12.54.24; Wed, 19 May 2021 12:54:48 -0700 (PDT) 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=@flygoat.com header.s=fm2 header.b=SxapN2vN; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=mDFcChx2; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353758AbhESOGB (ORCPT + 99 others); Wed, 19 May 2021 10:06:01 -0400 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:44671 "EHLO wout5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240179AbhESOGA (ORCPT ); Wed, 19 May 2021 10:06:00 -0400 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 705911AF5; Wed, 19 May 2021 10:04:40 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute7.internal (MEProxy); Wed, 19 May 2021 10:04:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=flygoat.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=A X1KyNTr3f6ACIFrlzPJ/39X6FbXJDzADF33t6t89Y0=; b=SxapN2vNZH7Iurzl/ TNXOE3oW+hwphm+73bhGB+lMRLDKRvS1Odip8IX2awCHjw8pBJZ+Y6HsblLoQ2rT 7on1lhdeVcqGud5pZU8t0SVtCM49v3KW+rFgJOEmsK/mvh8rmilgyVj78xNr2Daz V+YL9y3ml5++rKHmA1aXlIVrRZe8dmJa8B7IFVHtGUIy0fwXFSQg6Ujd1wQuqEOz KW9xT5CLok9MImr2RBnY+faIVZRPWw96pSCzFD0MMTOqx/zlgSDtDje1LxW4ziH9 gUAjxx1AgPT2wFw1N3cUHeTegnS6oifz2mfGRDjbp33LFmwB9XosoXOGJO59txAT I0WGA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=AX1KyNTr3f6ACIFrlzPJ/39X6FbXJDzADF33t6t89 Y0=; b=mDFcChx21o7hBaZmALBQYqjrHnjsdszJ6hpZWFXM9j+m0uIz2FfRY+sM3 W3rTppczTSovJcDs+e2+DdD73yv0Ed1pgrmfPR+SN+MY3/nFAc/ocOsFY8gr3rHL J2xiwqnyEXMOfp+VqiB53kCBBUkqO8znArm9Euu0fzBAKBC2DiT8dvKNCzxLHm73 fsqtU9/fyzvrm1Cjt/uOmxKt10EfkbWv46NxJgfmPOFZwD9ZVWx8hwnCNPRwBa1V qR3dM0CDh+UEjbrowJCJShJU+pvQbKHOw0o12oqZX9p9SLUh7A5JXSba1HOnbDq0 p7rM6LxgIQeXWGu9+4bu50KBl/58w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdeiledgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeftnecuhfhrohhmpeflihgrgihunhcujggrnhhguceojhhirgiguhhnrdihrghn ghesfhhlhihgohgrthdrtghomheqnecuggftrfgrthhtvghrnhepheettdefjedtudeuud evgfejheefieeltdettdduheejkeekleefgeekueegtdeinecuffhomhgrihhnpehinhhs ihguvghlihhnuhiguggvvhdrnhgvthenucfkphepfeelrddugeegrdeghedrvdelnecuve hluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhirgiguhhn rdihrghnghesfhhlhihgohgrthdrtghomh X-ME-Proxy: Received: from [192.168.143.245] (unknown [39.144.45.29]) by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 19 May 2021 10:04:37 -0400 (EDT) Subject: Re: [PATCH] arch/mips/kernel/asm-offsets.c: Make local functions static To: zhaoxiao , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Cc: tsbogend@alpha.franken.de References: <20210519062804.30047-1-zhaoxiao@uniontech.com> From: Jiaxun Yang Message-ID: <8223a6cd-ff3b-d105-0a95-30d5a4d1194e@flygoat.com> Date: Wed, 19 May 2021 22:04:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: <20210519062804.30047-1-zhaoxiao@uniontech.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ?? 2021/5/19 14:28, zhaoxiao ะด??: > Fixes the following W=1 kernel build warning(s): > arch/mips/kernel/asm-offsets.c:26:6: warning: no previous prototype for 'output_ptreg_defines' [-Wmissing-prototypes] > void output_ptreg_defines(void) > ^~~~~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:78:6: warning: no previous prototype for 'output_task_defines' [-Wmissing-prototypes] > void output_task_defines(void) > ^~~~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:93:6: warning: no previous prototype for 'output_thread_info_defines' [-Wmissing-prototypes] > void output_thread_info_defines(void) > ^~~~~~~~~~~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:109:6: warning: no previous prototype for 'output_thread_defines' [-Wmissing-prototypes] > void output_thread_defines(void) > ^~~~~~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:137:6: warning: no previous prototype for 'output_thread_fpu_defines' [-Wmissing-prototypes] > void output_thread_fpu_defines(void) > ^~~~~~~~~~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:180:6: warning: no previous prototype for 'output_mm_defines' [-Wmissing-prototypes] > void output_mm_defines(void) > ^~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:241:6: warning: no previous prototype for 'output_sc_defines' [-Wmissing-prototypes] > void output_sc_defines(void) > ^~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:254:6: warning: no previous prototype for 'output_signal_defined' [-Wmissing-prototypes] > void output_signal_defined(void) > ^~~~~~~~~~~~~~~~~~~~~ > arch/mips/kernel/asm-offsets.c:347:6: warning: no previous prototype for 'output_kvm_defines' [-Wmissing-prototypes] > void output_kvm_defines(void) The same... they're supposed to be used by asm-offset generator. If you don't understand how it works there is an article[1] in Chinese. You may try __used attribute to bypass these warning. Thanks. [1]: https://insidelinuxdev.net/article/a030fi.html - Jiaxun > > Signed-off-by: zhaoxiao > --- > arch/mips/kernel/asm-offsets.c | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > > diff --git a/arch/mips/kernel/asm-offsets.c b/arch/mips/kernel/asm-offsets.c > index 5735b2cd6f2a..2dc1ecb12c00 100644 > --- a/arch/mips/kernel/asm-offsets.c > +++ b/arch/mips/kernel/asm-offsets.c > @@ -23,7 +23,7 @@ > > #include > > -void output_ptreg_defines(void) > +static void output_ptreg_defines(void) > { > COMMENT("MIPS pt_regs offsets."); > OFFSET(PT_R0, pt_regs, regs[0]); > @@ -75,7 +75,7 @@ void output_ptreg_defines(void) > BLANK(); > } > > -void output_task_defines(void) > +static void output_task_defines(void) > { > COMMENT("MIPS task_struct offsets."); > OFFSET(TASK_STATE, task_struct, state); > @@ -90,7 +90,7 @@ void output_task_defines(void) > BLANK(); > } > > -void output_thread_info_defines(void) > +static void output_thread_info_defines(void) > { > COMMENT("MIPS thread_info offsets."); > OFFSET(TI_TASK, thread_info, task); > @@ -106,7 +106,7 @@ void output_thread_info_defines(void) > BLANK(); > } > > -void output_thread_defines(void) > +static void output_thread_defines(void) > { > COMMENT("MIPS specific thread_struct offsets."); > OFFSET(THREAD_REG16, task_struct, thread.reg16); > @@ -134,7 +134,7 @@ void output_thread_defines(void) > } > > #ifdef CONFIG_MIPS_FP_SUPPORT > -void output_thread_fpu_defines(void) > +static void output_thread_fpu_defines(void) > { > OFFSET(THREAD_FPU, task_struct, thread.fpu); > > @@ -177,7 +177,7 @@ void output_thread_fpu_defines(void) > } > #endif > > -void output_mm_defines(void) > +static void output_mm_defines(void) > { > COMMENT("Size of struct page"); > DEFINE(STRUCT_PAGE_SIZE, sizeof(struct page)); > @@ -216,7 +216,7 @@ void output_mm_defines(void) > } > > #ifdef CONFIG_32BIT > -void output_sc_defines(void) > +static void output_sc_defines(void) > { > COMMENT("Linux sigcontext offsets."); > OFFSET(SC_REGS, sigcontext, sc_regs); > @@ -238,7 +238,7 @@ void output_sc_defines(void) > #endif > > #ifdef CONFIG_64BIT > -void output_sc_defines(void) > +static void output_sc_defines(void) > { > COMMENT("Linux sigcontext offsets."); > OFFSET(SC_REGS, sigcontext, sc_regs); > @@ -251,7 +251,7 @@ void output_sc_defines(void) > } > #endif > > -void output_signal_defined(void) > +static void output_signal_defined(void) > { > COMMENT("Linux signal numbers."); > DEFINE(_SIGHUP, SIGHUP); > @@ -344,7 +344,7 @@ void output_pm_defines(void) > #endif > > #ifdef CONFIG_MIPS_FP_SUPPORT > -void output_kvm_defines(void) > +static void output_kvm_defines(void) > { > COMMENT(" KVM/MIPS Specific offsets. "); >