[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20220623070519.GP16517@kadam>
Date: Thu, 23 Jun 2022 10:05:19 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Felix Schlepper <f3sch.git@...look.com>
Cc: gregkh@...uxfoundation.org, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/3] Staging: rtl8192e: Using kzalloc and delete memset
On Wed, Jun 22, 2022 at 05:12:45PM +0200, Felix Schlepper wrote:
> By using kzalloc, we can delete a memset and avoid
> memory initialization defects.
>
This commit message is slightly confusing. The "avoid memory
initialization defects" bit is very vague.
The difference between the original code and patched code is that the
patched code zeroes out the txb->fragments[] array. The original code
worked. The new code is slightly cleaner, but also slower. Whatever,
either way is fine.
But just state it clearly in the commit message.
"By using kzalloc, we can delete a memset. The practical difference
is that using kzalloc() will zero out the txb->fragments[] array.
The original code worked fine, but zeroing everything seems nicer."
regards,
dan carpenter
Powered by blists - more mailing lists