public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Salah Triki <salah.triki@gmail.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: Felix Kuehling <felix.kuehling@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: amdkfd: Replace (un)register_chrdev() by (unregister/alloc)_chrdev_region()
Date: Mon, 10 Mar 2025 16:19:09 +0100	[thread overview]
Message-ID: <Z88C7ZzM88skw+qr@pc> (raw)
In-Reply-To: <b2068f4f-c832-4cd5-b9bb-e175217d7647@amd.com>

> > register_chrdev() registers 256 minor numbers, calling it will result in
> > calling kmalloc_array(256, sizeof(struct probe), GFP_KERNEL) whereas
> > calling alloc_chrdev_region() with count parameter equals to 1, which is
> > the number of minor numbers requested, will result in calling
> > kmalloc_array(1, sizeof(stuct probe), GFP_KERNEL). 
> >

Is it worth replacing register_chrdev() by alloc_chrdev_region() for
this ? If so I will change the patch description.

Best Regards,
Salah Triki

      reply	other threads:[~2025-03-10 15:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 21:08 [PATCH] drm: amdkfd: Replace (un)register_chrdev() by (unregister/alloc)_chrdev_region() Salah Triki
2025-03-06  0:18 ` Felix Kuehling
2025-03-07 19:10   ` Salah Triki
2025-03-10 12:11     ` Christian König
2025-03-10 15:19       ` Salah Triki [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=Z88C7ZzM88skw+qr@pc \
    --to=salah.triki@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=felix.kuehling@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simona@ffwll.ch \
    /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