Subject: Re: [PATCH] phonet: sparse annotations of protocol, remove forward declaration

From: Harvey Harrison <[email-masked]>
Date: Fri, 07 Nov 2008 12:02:01 -0800

On Fri, 2008-11-07 at 10:41 +0200, Rémi Denis-Courmont wrote:
> On Friday 07 November 2008 03:53:13 ext Harvey Harrison, you wrote:
> > net/phonet/af_phonet.c:38:36: error: marked inline, but without a
> > definition
> > net/phonet/pep-gprs.c:63:10: warning: incorrect type in return 
> > expression (different base types)
> > net/phonet/pep-gprs.c:63:10:    expected int
> > net/phonet/pep-gprs.c:63:10:    got restricted __be16 [usertype]
> > <noident> 
> > net/phonet/pep-gprs.c:65:10: warning: incorrect type in return
> > expression 
> > (different base types)
> > net/phonet/pep-gprs.c:65:10:    expected int 
> > net/phonet/pep-gprs.c:65:10:    got restricted __be16 [usertype]
> > <noident> 
> > net/phonet/pep-gprs.c:124:16: warning: incorrect type in assignment
> > (different base types)
> > net/phonet/pep-gprs.c:124:16:    expected restricted 
> > __be16 [usertype] protocol
> > net/phonet/pep-gprs.c:124:16:    got unsigned short [unsigned]
> > [usertype] protocol 
> 
> Thanks. May I ask where the documentation to run these checks is?
> 

You need to add the -D__CHECK_ENDIAN__ flag to sparse to enable these
checks.

make C=1 CF=-D__CHECK_ENDIAN__

should do the trick if you have sparse already.

Harvey