[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4BFADDA3.2090307@hp.com>
Date: Mon, 24 May 2010 16:12:19 -0400
From: Vlad Yasevich <vladislav.yasevich@...com>
To: Dan Carpenter <error27@...il.com>
CC: Sridhar Samudrala <sri@...ibm.com>,
"David S. Miller" <davem@...emloft.net>,
Wei Yongjun <yjwei@...fujitsu.com>, linux-sctp@...r.kernel.org,
netdev@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] sctp: dubious bitfields in sctp_transport
Dan Carpenter wrote:
> Sparse complains because these one-bit bitfields are signed.
> include/net/sctp/structs.h:879:24: error: dubious one-bit signed bitfield
> include/net/sctp/structs.h:889:31: error: dubious one-bit signed bitfield
> include/net/sctp/structs.h:895:26: error: dubious one-bit signed bitfield
> include/net/sctp/structs.h:898:31: error: dubious one-bit signed bitfield
> include/net/sctp/structs.h:901:27: error: dubious one-bit signed bitfield
>
> It doesn't cause a problem in the current code, but it would be better
> to clean it up. This was introduced by c0058a35aacc7: "sctp: Save some
> room in the sctp_transport by using bitfields".
>
> Signed-off-by: Dan Carpenter <error27@...il.com>
> ---
> It looks like this header is exported to user space. I don't know if
> that makes a difference.
That shouldn't make a difference.
-vlad
>
> diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
> index 6173c61..4b86011 100644
> --- a/include/net/sctp/structs.h
> +++ b/include/net/sctp/structs.h
> @@ -876,7 +876,7 @@ struct sctp_transport {
>
> /* Reference counting. */
> atomic_t refcnt;
> - int dead:1,
> + __u32 dead:1,
> /* RTO-Pending : A flag used to track if one of the DATA
> * chunks sent to this address is currently being
> * used to compute a RTT. If this flag is 0,
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists