All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: kernel test robot <lkp@intel.com>
Cc: Dust Li <dust.li@linux.alibaba.com>,
	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: Wed, 2 Mar 2022 11:45:03 -0800	[thread overview]
Message-ID: <20220302114503.47d64a55@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> (raw)
In-Reply-To: <202203022234.AMB3WcyJ-lkp@intel.com>

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.

This doesn't look right, tho, why __net_* attrs?  You call those
functions from the module init/exit. __net_ is for namespace code.

WARNING: multiple messages have this Message-ID (diff)
From: Jakub Kicinski <kuba@kernel.org>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH net-next] net/smc: fix compile warning for smc_sysctl
Date: Wed, 02 Mar 2022 11:45:03 -0800	[thread overview]
Message-ID: <20220302114503.47d64a55@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net> (raw)
In-Reply-To: <202203022234.AMB3WcyJ-lkp@intel.com>

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

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.

This doesn't look right, tho, why __net_* attrs?  You call those
functions from the module init/exit. __net_ is for namespace code.

  reply	other threads:[~2022-03-02 19:45 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 [this message]
2022-03-02 19:45     ` Jakub Kicinski
2022-03-03  2:35     ` dust.li
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=20220302114503.47d64a55@kicinski-fedora-PC1C0HJN.hsd1.ca.comcast.net \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=kbuild-all@lists.01.org \
    --cc=kgraul@linux.ibm.com \
    --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.