public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Samyak <samyak.bambole07@gmail.com>
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] staging: vme_user: use kmalloc_obj instead of kmalloc
Date: Mon, 23 Feb 2026 14:51:26 +0100	[thread overview]
Message-ID: <2026022345-essay-pedometer-cce8@gregkh> (raw)
In-Reply-To: <20260214164519.678428-1-samyak.bambole07@gmail.com>

On Sat, Feb 14, 2026 at 10:15:19PM +0530, Samyak wrote:
> From: Samyak Bambole <samyak.bambole07@gmail.com>
> 
> Replace kmalloc(sizeof(*ptr), GFP_KERNEL) calls with kmalloc_obj(*ptr,
> GFP_KERNEL)
> 
> This addresses scripts/checkpatch.pl warnings and follows the preferred
> allocation pattern.
> 
> Signed-off-by: Samyak Bambole <samyak.bambole07@gmail.com>
> ---
> v2 -> v3 : fix spelling: preferred (not preffered)
> v1 -> v2 : remove changelog details as suggested by gregkh
> 
> v2: https://lore.kernel.org/linux-staging/20260214161321.669459-1-samyak.bambole07@gmail.com/
> v1: https://lore.kernel.org/linux-staging/20260214155157.663800-1-samyak.bambole07@gmail.com/
> 
>  drivers/staging/vme_user/vme.c        | 24 ++++++++++++------------
>  drivers/staging/vme_user/vme_fake.c   |  6 +++---
>  drivers/staging/vme_user/vme_tsi148.c | 14 +++++++-------
>  3 files changed, 22 insertions(+), 22 deletions(-)
> 
> diff --git a/drivers/staging/vme_user/vme.c b/drivers/staging/vme_user/vme.c
> index 2095de725..8496c722a 100644
> --- a/drivers/staging/vme_user/vme.c
> +++ b/drivers/staging/vme_user/vme.c
> @@ -287,7 +287,7 @@ struct vme_resource *vme_slave_request(struct vme_dev *vdev, u32 address,
>  	if (!allocated_image)
>  		goto err_image;
>  
> -	resource = kmalloc(sizeof(*resource), GFP_KERNEL);
> +	resource = kmalloc_obj(*resource, GFP_KERNEL);

If you look at 7.0-rc1, this should just be:
	kmalloc_obj(*resource);
right?

thanks,

greg k-h

      reply	other threads:[~2026-02-23 13:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-14 16:45 [PATCH v3] staging: vme_user: use kmalloc_obj instead of kmalloc Samyak
2026-02-23 13:51 ` Greg KH [this message]

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=2026022345-essay-pedometer-cce8@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=samyak.bambole07@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