Re: p = kmalloc(sizeof(*p), )

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Russell King <[email protected]> wrote:
>
>  Since some of the other major contributors to the kernel appear to
>  also disagree with the statement, I think that the entry in
>  CodingStyle must be removed.

Nobody has put forward a decent reason for doing so.  "I want to grep for
initialisations" is pretty pointless because a) it won't catch everything
anyway and b) most structures are allocated and initialised at a single
place and many of those which aren't should probably be converted to do
that anyway.

The broader point is that you're trying to optimise for the wrong thing. 
We should optimise for those who read code, not for those who write it.

Every time I see such a type-unsafe allocation in a patch I have to go hunt
down the definition of the lhs.  Which is sometimes in a header file, often
one which hasn't been indexed yet.  Is a pita.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux