From: cuitao <cuitao@kylinos.cn>
To: yuq825@gmail.com, dri-devel@lists.freedesktop.org
Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch,
linux-kernel@vger.kernel.org, cuitao <cuitao@kylinos.cn>
Subject: [PATCH] drm/lima: implify the allocation of sync slab caches
Date: Tue, 14 May 2024 11:05:32 +0800 [thread overview]
Message-ID: <20240514030532.15065-1-cuitao@kylinos.cn> (raw)
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: cuitao <cuitao@kylinos.cn>
---
drivers/gpu/drm/lima/lima_sched.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/lima/lima_sched.c b/drivers/gpu/drm/lima/lima_sched.c
index 00b19adfc888..414a45082b86 100644
--- a/drivers/gpu/drm/lima/lima_sched.c
+++ b/drivers/gpu/drm/lima/lima_sched.c
@@ -28,9 +28,7 @@ static int lima_fence_slab_refcnt;
int lima_sched_slab_init(void)
{
if (!lima_fence_slab) {
- lima_fence_slab = kmem_cache_create(
- "lima_fence", sizeof(struct lima_fence), 0,
- SLAB_HWCACHE_ALIGN, NULL);
+ lima_fence_slab = KMEM_CACHE(lima_fence, SLAB_HWCACHE_ALIGN);
if (!lima_fence_slab)
return -ENOMEM;
}
--
2.25.1
reply other threads:[~2024-05-14 3:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20240514030532.15065-1-cuitao@kylinos.cn \
--to=cuitao@kylinos.cn \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=tzimmermann@suse.de \
--cc=yuq825@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.