Thread (1 message) 1 message, 1 author, 2013-01-14

[net-next:master 126/134] include/net/ipv6.h:555:26: sparse: cast to restricted __be32

From: Fengguang Wu <hidden>
Date: 2013-01-14 02:56:04

Hi YOSHIFUJI,

FYI, there are new sparse warnings show up in

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git master
head:   25d46f43a911b08c5aa8c8fd4fe7fa9b36445068
commit: 3e4e4c1f2da66b29ee9379ca29f8dd620c2b5a1f [126/134] ipv6: Introduce ip6_flow_hdr() to fill version, tclass and flowlabel.
quoted
include/net/ipv6.h:555:26: sparse: cast to restricted __be32
include/net/ipv6.h:555:63: sparse: restricted __be32 degrades to integer
include/net/ipv6.h:555:24: sparse: incorrect type in assignment (different base types)
   include/net/ipv6.h:555:24:    expected restricted __be32 [usertype] <noident>
   include/net/ipv6.h:555:24:    got unsigned int

vim +555 include/net/ipv6.h

971f359d YOSHIFUJI Hideaki            2005-11-08  549  /*
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  550   *	Header manipulation
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  551   */
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  552  static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  553  				__be32 flowlabel)
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  554  {
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13 @555  	*(__be32 *)hdr = ntohl(0x60000000 | (tclass << 20)) | flowlabel;
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  556  }
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  557  
3e4e4c1f YOSHIFUJI Hideaki / 吉藤英明 2013-01-13  558  /*

---
0-DAY kernel build testing backend         Open Source Technology Center
Fengguang Wu, Yuanhan Liu                              Intel Corporation
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help