Messages in this thread | | | Date | Fri, 15 Jul 2022 11:15:20 +0300 | From | Dan Carpenter <> | Subject | Re: Is casting a void ptr to something else considered bad kernel coding style |
| |
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
| |