On Tuesday, May 28, 2013 23:40:54 Simon Wunderlich wrote:
> You can safe an indendation below if you return -1 immediately here
> if the statement above is false. Also multiple statements might be better
> for readability and later changes, e.g.
> 
> if (!atomic_read(&bat_priv->mcast_group_awareness))
>         return 1;
> 
> if (atomic_read(&bat_priv->mcast.num_non_aware))
>         return 1;
> 
> if (ntohs(ethhdr->h_proto) != ETH_P_IPV6)
>         return 1;

A quick hint from my end: The kernel maintainer don't like code that returns 
"random" values like 1/0/-1. Either use bool or meaningful defines instead of 
raw numbers.

Cheers,
Marek

Reply via email to