public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Geliang Tang <geliang.tang@suse.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Martin KaFai Lau <martin.lau@kernel.org>
Subject: net/socket.c:1676:21: error: no previous declaration for 'update_socket_protocol'
Date: Sat, 23 Sep 2023 18:01:07 +0800	[thread overview]
Message-ID: <202309231748.AETjbleh-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d90b0276af8f25a0b8ae081a30d1b2a61263393b
commit: 0dd061a6a115f25132989cbd591a25afb2dee086 bpf: Add update_socket_protocol hook
date:   5 weeks ago
config: x86_64-sof-customedconfig-avs-defconfig (https://download.01.org/0day-ci/archive/20230923/202309231748.AETjbleh-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230923/202309231748.AETjbleh-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309231748.AETjbleh-lkp@intel.com/

All errors (new ones prefixed by >>):

>> net/socket.c:1676:21: error: no previous declaration for 'update_socket_protocol' [-Werror=missing-declarations]
    __weak noinline int update_socket_protocol(int family, int type, int protocol)
                        ^~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors


vim +/update_socket_protocol +1676 net/socket.c

  1659	
  1660	/*	A hook for bpf progs to attach to and update socket protocol.
  1661	 *
  1662	 *	A static noinline declaration here could cause the compiler to
  1663	 *	optimize away the function. A global noinline declaration will
  1664	 *	keep the definition, but may optimize away the callsite.
  1665	 *	Therefore, __weak is needed to ensure that the call is still
  1666	 *	emitted, by telling the compiler that we don't know what the
  1667	 *	function might eventually be.
  1668	 *
  1669	 *	__diag_* below are needed to dismiss the missing prototype warning.
  1670	 */
  1671	
  1672	__diag_push();
  1673	__diag_ignore_all("-Wmissing-prototypes",
  1674			  "A fmod_ret entry point for BPF programs");
  1675	
> 1676	__weak noinline int update_socket_protocol(int family, int type, int protocol)
  1677	{
  1678		return protocol;
  1679	}
  1680	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

                 reply	other threads:[~2023-09-23 10:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202309231748.AETjbleh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=geliang.tang@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox