Re: [PATCH] staging: fluke_gpib: use kzalloc instead of kmalloc + memset

From: Dan Carpenter

Date: Wed Nov 26 2025 - 11:52:34 EST


On Wed, Nov 26, 2025 at 04:48:52PM +0100, Tomasz Sadowski wrote:
> > You did not specify a description of why the patch is needed, or
> > possibly, any description at all, in the email body. [...]
>
> Thanks, the commit message now includes a proper description.
> The patch itself has not changed.
>
> I also realized that the previous subject line might have been incorrect.
> The correct subject should be:
>
> staging: gpib: eastwood: use kzalloc instead of kmalloc + memset
>

All this is weird commentary to put into a patch...


> Use kzalloc() instead of kmalloc() + memset() to simplify memory allocation.
>
> Also use sizeof(*board->private_data) instead of repeating the struct name.
> This avoids duplication and keeps the code correct if the struct name
> changes in the future.
>
> Signed-off-by: Tomasz Sadowski <tsdwski@xxxxxxxxx>
> ---

This isn't how to send a v2 patch.

https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/

regards,
dan carpenter