[PATCH] Adding kerneldoc and fixing bare pointers

Josh Stone jistone@redhat.com
Wed Mar 18 18:13:00 GMT 2009


Breno Leitao wrote:
> This patch create a kerneldoc comments for the main functions used by
> these tapsets. 
> Also some kread() are used instead of bare pointers

>  static inline void *ccid_priv(const struct ccid *ccid)
> -{
> -	return (void *)ccid->ccid_priv;
> +%{
> +	return (void *)kread(&(ccid))->ccid_priv;
>  }
>  %}

Surely, this brace change is not intended...

Also, the kread as you've written it is not actually protecting
anything.  It needs to be more like "kread(&(ccid->ccid_priv))".

>  static inline struct iphdr *ip_hdr(struct sk_buff *skb)
>  {
> -	return (struct iphdr *)skb->nh.raw;
> +	return (struct iphdr *) kread(&(skb))->nh.raw;
>  }

Again, the kread parentheses need adjustment.

I saw other places in these tapsets that are also using bare pointers --
are you preparing more patches?


Josh



More information about the Systemtap mailing list