From: "Ethan Tidmore" <ethantidmore06@gmail.com>
To: "Mariyam Shahid" <mariyam.shahid135@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>
Cc: "Michael Straube" <straube.linux@gmail.com>,
<linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] staging: rtl8723bs: use kzalloc_obj() instead of kzalloc()
Date: Mon, 16 Feb 2026 19:07:30 -0600 [thread overview]
Message-ID: <DGGU27CBNB16.1JYT2P1QGHQP7@gmail.com> (raw)
In-Reply-To: <20260216161733.7704-1-mariyam.shahid135@gmail.com>
On Mon Feb 16, 2026 at 10:17 AM CST, Mariyam Shahid wrote:
> Replace kzalloc() using sizeof(*ptr) with kzalloc_obj() to improve
> type safety. kzalloc_obj() ensures that the size allocated matches
> the type of the pointer automatically, which prevents potential
> mismatches if the pointer type is ever refactored.
>
> This change cleans up a checkpatch.pl warning:
> "Prefer kzalloc_obj over kzalloc with sizeof"
>
> Signed-off-by: Mariyam Shahid <mariyam.shahid135@gmail.com>
> ---
Hi,
The macro kzalloc_obj() is not in staging-next yet, so you'll likely get
a kernel test robot email. So, wait until this macro is in this branch
and then send this patch.
Thanks,
ET
next prev parent reply other threads:[~2026-02-17 1:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-16 16:17 [PATCH] staging: rtl8723bs: use kzalloc_obj() instead of kzalloc() Mariyam Shahid
2026-02-17 1:07 ` Ethan Tidmore [this message]
2026-02-17 9:12 ` Mariyam Shahid
2026-02-19 8:15 ` Dan Carpenter
2026-02-20 7:03 ` Mariyam Shahid
2026-02-21 11:10 ` [PATCH v3] staging: rtl8723bs: Replace kzalloc with kzalloc_obj Mariyam Shahid
2026-02-21 18:29 ` Ethan Tidmore
2026-02-22 16:20 ` [PATCH v4] " Mariyam Shahid
2026-02-22 16:42 ` Greg KH
2026-02-23 16:37 ` Mariyam Shahid
2026-02-23 5:35 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DGGU27CBNB16.1JYT2P1QGHQP7@gmail.com \
--to=ethantidmore06@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mariyam.shahid135@gmail.com \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox