[ovs-dev] [PATCH 01/12] datapath: Add compatibility code for sparse annotations.

Ben Pfaff blp at nicira.com
Mon Dec 13 21:40:46 UTC 2010


On Mon, Dec 13, 2010 at 01:37:08PM -0800, Jesse Gross wrote:
> On Mon, Dec 13, 2010 at 10:36 AM, Ben Pfaff <blp at nicira.com> wrote:
> > On Sun, Dec 12, 2010 at 12:52:56PM -0800, Jesse Gross wrote:
> >> The __percpu and __rcu annotations for sparse are relatively
> >> recent additions, so provide no-op definitions on older kernels.
> >>
> >> Signed-off-by: Jesse Gross <jesse at nicira.com>
> >
> > Acked-by: Ben Pfaff <blp at nicira.com>
> >
> > Would it make sense to provide the upstream definition of __percpu if
> > __CHECKER__ is defined?
> 
> That was my initial thought as well.  However, on kernels where
> __percpu is not defined, the kernel headers won't be annotated with
> it.  So, for example, assigning the result of alloc_percpu() to a
> __percpu variable would cause a warning on those kernels because
> alloc_percpu() doesn't know to return a pointer of type __percpu.

That's a good reason, thanks.




More information about the dev mailing list