linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 9571/12208] net/socket.c:1676:21: warning: no previous declaration for 'update_socket_protocol'
@ 2023-08-24  3:37 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-08-24  3:37 UTC (permalink / raw)
  To: Geliang Tang
  Cc: oe-kbuild-all, Linux Memory Management List, Martin KaFai Lau

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   e3f80d3eae76c3557b3c9b5938ad01c0e6cf25ec
commit: 0dd061a6a115f25132989cbd591a25afb2dee086 [9571/12208] bpf: Add update_socket_protocol hook
config: i386-randconfig-r026-20230823 (https://download.01.org/0day-ci/archive/20230824/202308241150.LquDYwGT-lkp@intel.com/config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce: (https://download.01.org/0day-ci/archive/20230824/202308241150.LquDYwGT-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/202308241150.LquDYwGT-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/socket.c:1676:21: warning: no previous declaration for 'update_socket_protocol' [-Wmissing-declarations]
    __weak noinline int update_socket_protocol(int family, int type, int protocol)
                        ^~~~~~~~~~~~~~~~~~~~~~


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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-08-24  3:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-24  3:37 [linux-next:master 9571/12208] net/socket.c:1676:21: warning: no previous declaration for 'update_socket_protocol' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox