Re: Is casting a void ptr to something else considered bad kernel coding style

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

 



On Thu, Jul 14, 2022 at 05:00:19PM -0500, Steve French wrote:
> For examples like this where a pointer which is (void *) is cast to
> something else, is this considered bad coding style in kernel C
> programming?
> 
> It may be that leaving the (unnecessary) cast in, although it is not
> required for C, makes the code clearer in some cases.
> 
> Any opinions on changes to remove casts of void pointers for kernel
> code (which I have recently seen suggested)?
> 

Pointless casts are bad, but the churn is bad too...

regards,
dan carpenter




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux