1. 16 3月, 2012 4 次提交
  2. 14 3月, 2012 7 次提交
  3. 13 3月, 2012 26 次提交
  4. 12 3月, 2012 3 次提交
    • J
      net: Convert printks to pr_<level> · 058bd4d2
      Joe Perches 提交于
      Use a more current kernel messaging style.
      
      Convert a printk block to print_hex_dump.
      Coalesce formats, align arguments.
      Use %s, __func__ instead of embedding function names.
      
      Some messages that were prefixed with <foo>_close are
      now prefixed with <foo>_fini.  Some ah4 and esp messages
      are now not prefixed with "ip ".
      
      The intent of this patch is to later add something like
        #define pr_fmt(fmt) "IPv4: " fmt.
      to standardize the output messages.
      
      Text size is trivially reduced. (x86-32 allyesconfig)
      
      $ size net/ipv4/built-in.o*
         text	   data	    bss	    dec	    hex	filename
       887888	  31558	 249696	1169142	 11d6f6	net/ipv4/built-in.o.new
       887934	  31558	 249800	1169292	 11d78c	net/ipv4/built-in.o.old
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      058bd4d2
    • M
      net: get rid of some pointless casts to sockaddr · 43db362d
      Maciej Żenczykowski 提交于
      The following 4 functions:
        move_addr_to_kernel
        move_addr_to_user
        verify_iovec
        verify_compat_iovec
      are always effectively called with a sockaddr_storage.
      
      Make this explicit by changing their signature.
      
      This removes a large number of casts from sockaddr_storage to sockaddr.
      Signed-off-by: NMaciej Żenczykowski <maze@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      43db362d
    • L
      ipv6: Fix Smatch warning. · 8b2aaede
      Li Wei 提交于
      With commit d6ddef9e(IPv6: Fix not join all-router mcast group
      when forwarding set.) I check 'dev' after it's dereference that
      leads to a Smatch complaint:
      
      net/ipv6/addrconf.c:438 ipv6_add_dev()
      	 warn: variable dereferenced before check 'dev' (see line 432)
      
      net/ipv6/addrconf.c
         431		/* protected by rtnl_lock */
         432		rcu_assign_pointer(dev->ip6_ptr, ndev);
                                         ^^^^^^^^^^^^
      Old dereference.
      
         433
         434		/* Join all-node multicast group */
         435		ipv6_dev_mc_inc(dev, &in6addr_linklocal_allnodes);
         436
         437		/* Join all-router multicast group if forwarding is set
      */
         438		if (ndev->cnf.forwarding && dev && (dev->flags &
      IFF_MULTICAST))
                                                  ^^^
      
      Remove the check to avoid the complaint as 'dev' can't be NULL.
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NLi Wei <lw@cn.fujitsu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8b2aaede