dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: lyude@redhat.com
To: Rosen Penev <rosenp@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Danilo Krummrich <dakr@kernel.org>,
	Maarten Lankhorst	 <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	 Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	"open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS"	
	<nouveau@lists.freedesktop.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] nouveau/vmm: use kzalloc_flex
Date: Fri, 08 May 2026 14:29:42 -0400	[thread overview]
Message-ID: <3b324ccebe4ce6f49f6ff7c9558408b9484589a4.camel@redhat.com> (raw)
In-Reply-To: <20260312195529.13002-1-rosenp@gmail.com>

Sorry I didn't notice this patch until now!

Reviewed-by: Lyude Paul <lyude@redhat.com>

Will push it to drm-misc-next in just a moment

On Thu, 2026-03-12 at 12:55 -0700, Rosen Penev wrote:
> Use the proper macro do to these sizeof calculations.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
> b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
> index 958fd78080bd..b9648290dffb 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
> @@ -53,7 +53,7 @@ nvkm_vmm_pt_new(const struct nvkm_vmm_desc *desc,
> bool sparse,
>  		}
>  	}
>  
> -	if (!(pgt = kzalloc(sizeof(*pgt) + (sizeof(pgt->pte[0]) *
> lpte), GFP_KERNEL)))
> +	if (!(pgt = kzalloc_flex(*pgt, pte, lpte)))
>  		return NULL;
>  	pgt->page = page ? page->shift : 0;
>  	pgt->sparse = sparse;


      reply	other threads:[~2026-05-08 18:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12 19:55 [PATCH] nouveau/vmm: use kzalloc_flex Rosen Penev
2026-05-08 18:29 ` lyude [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=3b324ccebe4ce6f49f6ff7c9558408b9484589a4.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=airlied@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=rosenp@gmail.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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