Re: [PATCH] can: kvaser_usb: kvaser_usb_hydra: Use kzalloc for allocating only one element

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

 



On 06.08.2022 22:16:56, Kenneth Lee wrote:
> Use kzalloc(...) rather than kcalloc(1, ...) since because the number of
> elements we are specifying in this case is 1, kzalloc would accomplish the
> same thing and we can simplify. Also refactor how we calculate the sizeof()
> as checkstyle for kzalloc() prefers using the variable we are assigning
> to versus the type of that variable for calculating the size to allocate.
> 
> Signed-off-by: Kenneth Lee <klee33@xxxxxx>

Added to can-next/testing.

Thanks,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde           |
Embedded Linux                   | https://www.pengutronix.de  |
Vertretung West/Dortmund         | Phone: +49-231-2826-924     |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-5555 |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux