[josef-btrfs:inet-rework 1/6] net/ipv4/inet_hashtables.c:461:5: error: conflicting types for '__inet_hash'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-next.git inet-rework
head:   749825bc60f7224225ced1dbed77d3cc2b0bd72f
commit: a36b30653769d1e20ff0df41533a2766453ced1a [1/6] inet: collapse ipv4/v6 rcv_saddr_equal functions into one
config: i386-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        git checkout a36b30653769d1e20ff0df41533a2766453ced1a
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

>> net/ipv4/inet_hashtables.c:461:5: error: conflicting types for '__inet_hash'
    int __inet_hash(struct sock *sk, struct sock *osk)
        ^~~~~~~~~~~
   In file included from net/ipv4/inet_hashtables.c:25:0:
   include/net/inet_hashtables.h:206:5: note: previous declaration of '__inet_hash' was here
    int __inet_hash(struct sock *sk, struct sock *osk,
        ^~~~~~~~~~~
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from include/linux/list.h:8,
                    from include/linux/module.h:9,
                    from net/ipv4/inet_hashtables.c:16:
   net/ipv4/inet_hashtables.c:492:15: error: conflicting types for '__inet_hash'
    EXPORT_SYMBOL(__inet_hash);
                  ^
   include/linux/export.h:58:21: note: in definition of macro '___EXPORT_SYMBOL'
     extern typeof(sym) sym;      \
                        ^~~
>> net/ipv4/inet_hashtables.c:492:1: note: in expansion of macro 'EXPORT_SYMBOL'
    EXPORT_SYMBOL(__inet_hash);
    ^~~~~~~~~~~~~
   In file included from net/ipv4/inet_hashtables.c:25:0:
   include/net/inet_hashtables.h:206:5: note: previous declaration of '__inet_hash' was here
    int __inet_hash(struct sock *sk, struct sock *osk,
        ^~~~~~~~~~~
--
>> net/ipv4/udp.c:229:5: error: conflicting types for 'udp_lib_get_port'
    int udp_lib_get_port(struct sock *sk, unsigned short snum,
        ^~~~~~~~~~~~~~~~
   In file included from net/ipv4/udp_impl.h:3:0,
                    from net/ipv4/udp.c:115:
   include/net/udp.h:206:5: note: previous declaration of 'udp_lib_get_port' was here
    int udp_lib_get_port(struct sock *sk, unsigned short snum,
        ^~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:6:0,
                    from include/linux/kernel.h:6,
                    from include/asm-generic/bug.h:13,
                    from arch/x86/include/asm/bug.h:35,
                    from include/linux/bug.h:4,
                    from include/linux/thread_info.h:11,
                    from arch/x86/include/asm/uaccess.h:9,
                    from net/ipv4/udp.c:82:
   net/ipv4/udp.c:341:15: error: conflicting types for 'udp_lib_get_port'
    EXPORT_SYMBOL(udp_lib_get_port);
                  ^
   include/linux/export.h:58:21: note: in definition of macro '___EXPORT_SYMBOL'
     extern typeof(sym) sym;      \
                        ^~~
>> net/ipv4/udp.c:341:1: note: in expansion of macro 'EXPORT_SYMBOL'
    EXPORT_SYMBOL(udp_lib_get_port);
    ^~~~~~~~~~~~~
   In file included from net/ipv4/udp_impl.h:3:0,
                    from net/ipv4/udp.c:115:
   include/net/udp.h:206:5: note: previous declaration of 'udp_lib_get_port' was here
    int udp_lib_get_port(struct sock *sk, unsigned short snum,
        ^~~~~~~~~~~~~~~~
--
   net/ipv6/inet6_hashtables.c: In function 'inet6_hash':
>> net/ipv6/inet6_hashtables.c:271:9: error: too few arguments to function '__inet_hash'
      err = __inet_hash(sk, NULL);
            ^~~~~~~~~~~
   In file included from net/ipv6/inet6_hashtables.c:22:0:
   include/net/inet_hashtables.h:206:5: note: declared here
    int __inet_hash(struct sock *sk, struct sock *osk,
        ^~~~~~~~~~~
--
   net/ipv6/udp.c: In function 'udp_v6_get_port':
>> net/ipv6/udp.c:106:36: warning: passing argument 3 of 'udp_lib_get_port' makes pointer from integer without a cast [-Wint-conversion]
     return udp_lib_get_port(sk, snum, hash2_nulladdr);
                                       ^~~~~~~~~~~~~~
   In file included from net/ipv6/udp_impl.h:3:0,
                    from net/ipv6/udp.c:56:
   include/net/udp.h:206:5: note: expected 'int (*)(const struct sock *, const struct sock *, bool) {aka int (*)(const struct sock *, const struct sock *, _Bool)}' but argument is of type 'unsigned int'
    int udp_lib_get_port(struct sock *sk, unsigned short snum,
        ^~~~~~~~~~~~~~~~
>> net/ipv6/udp.c:106:9: error: too few arguments to function 'udp_lib_get_port'
     return udp_lib_get_port(sk, snum, hash2_nulladdr);
            ^~~~~~~~~~~~~~~~
   In file included from net/ipv6/udp_impl.h:3:0,
                    from net/ipv6/udp.c:56:
   include/net/udp.h:206:5: note: declared here
    int udp_lib_get_port(struct sock *sk, unsigned short snum,
        ^~~~~~~~~~~~~~~~
>> net/ipv6/udp.c:107:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^

vim +/__inet_hash +461 net/ipv4/inet_hashtables.c

   455		/* Initial allocation may have already happened via setsockopt */
   456		if (!rcu_access_pointer(sk->sk_reuseport_cb))
   457			return reuseport_alloc(sk);
   458		return 0;
   459	}
   460	
 > 461	int __inet_hash(struct sock *sk, struct sock *osk)
   462	{
   463		struct inet_hashinfo *hashinfo = sk->sk_prot->h.hashinfo;
   464		struct inet_listen_hashbucket *ilb;
   465		int err = 0;
   466	
   467		if (sk->sk_state != TCP_LISTEN) {
   468			inet_ehash_nolisten(sk, osk);
   469			return 0;
   470		}
   471		WARN_ON(!sk_unhashed(sk));
   472		ilb = &hashinfo->listening_hash[inet_sk_listen_hashfn(sk)];
   473	
   474		spin_lock(&ilb->lock);
   475		if (sk->sk_reuseport) {
   476			err = inet_reuseport_add_sock(sk, ilb);
   477			if (err)
   478				goto unlock;
   479		}
   480		if (IS_ENABLED(CONFIG_IPV6) && sk->sk_reuseport &&
   481			sk->sk_family == AF_INET6)
   482			hlist_add_tail_rcu(&sk->sk_node, &ilb->head);
   483		else
   484			hlist_add_head_rcu(&sk->sk_node, &ilb->head);
   485		sock_set_flag(sk, SOCK_RCU_FREE);
   486		sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
   487	unlock:
   488		spin_unlock(&ilb->lock);
   489	
   490		return err;
   491	}
 > 492	EXPORT_SYMBOL(__inet_hash);
   493	
   494	int inet_hash(struct sock *sk)
   495	{

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux