Hi Holger,

> good point. I thought we have a void* in our hands but we do have the
> llist_head here. The container_of macro in linux 2.6.12-rc2 (initial git
> commit) didn’t cast either so we should definitely take your commit.

Great!  I subsequently checked too, and couldn't find a version of Linux with 
the cast. 

The other change to perhaps consider is what happens when the passed ptr is 
null.  In my projects I tend to use a version of containerof that will return 
NULL in that case.  This is both convenient for NULL checks and ensures we 
don't end up with a pointer to the top of memory (which will _probably_ 
segfault so would have been detected). 

> Our jenkins only submits HEAD as build to coverity. 

Cool!  I just found the Jenkins pages... that's nice to know, thanks.
        
Kind Regards,

Mike

Reply via email to