Content-Type: multipart/mixed; boundary="===============5430526341673641005==" MIME-Version: 1.0 From: dust.li To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next] net/smc: fix compile warning for smc_sysctl Date: Thu, 03 Mar 2022 10:35:19 +0800 Message-ID: <20220303023519.GA35207@linux.alibaba.com> In-Reply-To: <20220302114503.47d64a55@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> List-Id: --===============5430526341673641005== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Wed, Mar 02, 2022 at 11:45:03AM -0800, Jakub Kicinski wrote: >On Wed, 2 Mar 2022 23:02:23 +0800 kernel test robot wrote: >> In file included from net/smc/smc_sysctl.c:18: >> net/smc/smc_sysctl.h:23:19: note: previous definition of 'smc_sysctl_= init' with type 'int(void)' >> 23 | static inline int smc_sysctl_init(void) >> | ^~~~~~~~~~~~~~~ >> >> net/smc/smc_sysctl.c:78:1: warning: ignoring attribute 'noinline' bec= ause it conflicts with attribute 'gnu_inline' [-Wattributes] = >> 78 | { >> | ^ > >The __net_init / __net_exit attr has to go on the prototype as well. Thanks a lot for pointing out ! > >This doesn't look right, tho, why __net_* attrs? You call those >functions from the module init/exit. __net_ is for namespace code. Yes, I made the mistake and mixes up smc_sysctl_{init|exit}() with smc_sysctl_{init|exit}_net when doing the quick fix... And my check script with neither allyesconfig/allnoconfig nor defconfig reproduced this. This happens when CONFIG_SMC=3Dy|m and CONFIG_SYSCTL is not set. I will send a v2. Thanks. --===============5430526341673641005==--