From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DD65C4338F for ; Fri, 23 Jul 2021 11:19:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F218460E8E for ; Fri, 23 Jul 2021 11:19:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233772AbhGWKjS (ORCPT ); Fri, 23 Jul 2021 06:39:18 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:38632 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231428AbhGWKjR (ORCPT ); Fri, 23 Jul 2021 06:39:17 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id D1A011FF90; Fri, 23 Jul 2021 11:19:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1627039187; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Arv4Hp0COxx9RgZDgDqkTwLibLcxCsrEdDofvNkmD64=; b=ebtz1+nD3tgcwsqtrdvwVwBMKFVDnIa9VkCHnNBNi4LmK/JgCsKqyqMnKcjQE4H9C3v5iD cY1fLTn3oovevIckkz20fi8kFL4NcjQDFFXwbdo/7JxS6ztEHQdTsGOFHi3Pn4Uwl8QQFs wfjtYuufBIYCqKQ7kgxKfLsK2oyk2GI= Received: from suse.cz (unknown [10.100.224.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 3E1FDA3B84; Fri, 23 Jul 2021 11:19:47 +0000 (UTC) Date: Fri, 23 Jul 2021 13:19:47 +0200 From: Petr Mladek To: Chris Down Cc: kernel test robot , kbuild-all@lists.01.org, linux-kernel@vger.kernel.org Subject: Re: [printk:for-5.15-printk-index 4/5] kernel/printk/index.c:140:6: warning: no previous prototype for 'pi_create_file' Message-ID: References: <202107192303.qeABbFBe-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 2021-07-20 13:02:33, Chris Down wrote: > kernel test robot writes: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git for-5.15-printk-index > > head: ad7d61f159db73974f1b0352f21afe04b0bbd920 > > commit: 337015573718b161891a3473d25f59273f2e626b [4/5] printk: Userspace format indexing support > > config: arc-allyesconfig (attached as .config) > > compiler: arceb-elf-gcc (GCC) 10.3.0 > > reproduce (this is a W=1 build): > > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/commit/?id=337015573718b161891a3473d25f59273f2e626b > > git remote add printk https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git > > git fetch --no-tags printk for-5.15-printk-index > > git checkout 337015573718b161891a3473d25f59273f2e626b > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross ARCH=arc > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>): > > > > > > kernel/printk/index.c:140:6: warning: no previous prototype for 'pi_create_file' [-Wmissing-prototypes] > > 140 | void pi_create_file(struct module *mod) > > | ^~~~~~~~~~~~~~ > > > > kernel/printk/index.c:146:6: warning: no previous prototype for 'pi_remove_file' [-Wmissing-prototypes] > > 146 | void pi_remove_file(struct module *mod) > > | ^~~~~~~~~~~~~~ > > Ah, I missed `static inline', which causes the compiler to think we want to > export it even though we don't. > > diff --git kernel/printk/index.c kernel/printk/index.c > index ca062f5e1779..e340e0a8b847 100644 > --- kernel/printk/index.c > +++ kernel/printk/index.c > @@ -137,13 +137,13 @@ static const char *pi_get_module_name(struct module *mod) > } > #endif > -void pi_create_file(struct module *mod) > +static inline void pi_create_file(struct module *mod) > { > debugfs_create_file(pi_get_module_name(mod), 0444, dfs_index, > mod, &dfs_index_fops); > } > -void pi_remove_file(struct module *mod) > +static inline void pi_remove_file(struct module *mod) > { > debugfs_remove(debugfs_lookup(pi_get_module_name(mod), dfs_index)); > } I have just pushed this fix into printk/linux.git, branch for-5.15-printk-index. Well, I just added the "static" keyword. Let the compiler decide about inlining. There is no need to enforce it. Best Regards, Petr