Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1268772pxv; Fri, 23 Jul 2021 04:21:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9mXmoRXq/pilpdDj+bgv9juXAQb0daQBu7RwKmhw2gADyxVS4m2vceirzip5YbngYzk9p X-Received: by 2002:a05:6638:538:: with SMTP id j24mr3697566jar.59.1627039317150; Fri, 23 Jul 2021 04:21:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627039317; cv=none; d=google.com; s=arc-20160816; b=fHfLdkXnTYC9njLMR1kwgpR2jwdrHcFRNr94lPu7lmqXaHWHP6cSuadAYmXCQTz8RX gTQeMjH/wc5ohuRoJ0qwkLBUWrkurlhtOzsQCXB0+ugG+E8lOFrCrc51Z7QThgcVZBy3 E85ZLpuuMjQ8hpupP3+/sYYMlgczvASsi+xNbxGTr93wXT4UbLpW6RncsrljBYQlHyg8 1M7LS/hVDuKsXZGicODR8k0ThtO6T79+pBFvOtuImgFnzRcB0bt4NLNjidp/Jd32A9b3 CxnBuFk4ClCzvBOHoBn0rZaVpMvHWMKhYRuc95t4eSpipHYHw14jBvtL4h6n4FwyZyY0 3EdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Arv4Hp0COxx9RgZDgDqkTwLibLcxCsrEdDofvNkmD64=; b=C20xmYe1i6eKiJhfiAHGoDoWGTRQIiKhrczxBwisvy6YXChZYe8C73JuvYFfi7aleh YagdpGLfPKIWaHry+lbjdV5QGs1PRUxvfzAx6c1/TASRo6PR/g7TeVUfJBOomBmclq/N adQ970BCCM3MjR62m2ozAtpuraOSdqRfWYOVX4YBald7xp5X/sQXGSmw2x+IDNVuVoRS aJUlwzowIDrFTPNLodabMxn6hBH9Txcf+5bxb2r4XWtU+jEuLfBo96NvCbPs6tvz0v2Y vXim7eCHPmckRrfE/lUI2oKecDdCzJ2/xMzvDa61JBL+PqHcedjdnMs+5Xm3ekCJsADk TZjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=ebtz1+nD; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v7si34343932ilg.121.2021.07.23.04.21.45; Fri, 23 Jul 2021 04:21:57 -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=@suse.com header.s=susede1 header.b=ebtz1+nD; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232681AbhGWKjR (ORCPT + 99 others); Fri, 23 Jul 2021 06:39:17 -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