This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [PATCH] Adding kerneldoc and fixing bare pointers
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