All of lore.kernel.org
 help / color / mirror / Atom feed
From: "dust.li" <dust.li@linux.alibaba.com>
To: Jakub Kicinski <kuba@kernel.org>, kernel test robot <lkp@intel.com>
Cc: Karsten Graul <kgraul@linux.ibm.com>,
	Tony Lu <tonylu@linux.alibaba.com>,
	davem@davemloft.net, kbuild-all@lists.01.org,
	netdev@vger.kernel.org, linux-s390@vger.kernel.org,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH net-next] net/smc: fix compile warning for smc_sysctl
Date: Thu, 3 Mar 2022 10:35:19 +0800	[thread overview]
Message-ID: <20220303023519.GA35207@linux.alibaba.com> (raw)
In-Reply-To: <20220302114503.47d64a55@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>

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' because 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=y|m and CONFIG_SYSCTL is not set.

I will send a v2.

Thanks.

WARNING: multiple messages have this Message-ID (diff)
From: dust.li <dust.li@linux.alibaba.com>
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	[thread overview]
Message-ID: <20220303023519.GA35207@linux.alibaba.com> (raw)
In-Reply-To: <20220302114503.47d64a55@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net>

[-- Attachment #1: Type: text/plain, Size: 1124 bytes --]

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' because 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=y|m and CONFIG_SYSCTL is not set.

I will send a v2.

Thanks.

  reply	other threads:[~2022-03-03  2:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02  3:43 [PATCH net-next] net/smc: fix compile warning for smc_sysctl Dust Li
2022-03-02  5:49 ` Tony Lu
2022-03-02 15:02 ` kernel test robot
2022-03-02 19:45   ` Jakub Kicinski
2022-03-02 19:45     ` Jakub Kicinski
2022-03-03  2:35     ` dust.li [this message]
2022-03-03  2:35       ` dust.li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220303023519.GA35207@linux.alibaba.com \
    --to=dust.li@linux.alibaba.com \
    --cc=davem@davemloft.net \
    --cc=kbuild-all@lists.01.org \
    --cc=kgraul@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=tonylu@linux.alibaba.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.