hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/gpu/drm/msm/msm_fence.c
....@@ -1,18 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 2013-2016 Red Hat
34 * Author: Rob Clark <robdclark@gmail.com>
4
- *
5
- * This program is free software; you can redistribute it and/or modify it
6
- * under the terms of the GNU General Public License version 2 as published by
7
- * the Free Software Foundation.
8
- *
9
- * This program is distributed in the hope that it will be useful, but WITHOUT
10
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
- * more details.
13
- *
14
- * You should have received a copy of the GNU General Public License along with
15
- * this program. If not, see <http://www.gnu.org/licenses/>.
165 */
176
187 #include <linux/dma-fence.h>
....@@ -31,7 +20,7 @@
3120 return ERR_PTR(-ENOMEM);
3221
3322 fctx->dev = dev;
34
- strncpy(fctx->name, name, sizeof(fctx->name));
23
+ strscpy(fctx->name, name, sizeof(fctx->name));
3524 fctx->context = dma_fence_context_alloc(1);
3625 init_waitqueue_head(&fctx->event);
3726 spin_lock_init(&fctx->spinlock);
....@@ -119,11 +108,6 @@
119108 return f->fctx->name;
120109 }
121110
122
-static bool msm_fence_enable_signaling(struct dma_fence *fence)
123
-{
124
- return true;
125
-}
126
-
127111 static bool msm_fence_signaled(struct dma_fence *fence)
128112 {
129113 struct msm_fence *f = to_msm_fence(fence);
....@@ -133,10 +117,7 @@
133117 static const struct dma_fence_ops msm_fence_ops = {
134118 .get_driver_name = msm_fence_get_driver_name,
135119 .get_timeline_name = msm_fence_get_timeline_name,
136
- .enable_signaling = msm_fence_enable_signaling,
137120 .signaled = msm_fence_signaled,
138
- .wait = dma_fence_default_wait,
139
- .release = dma_fence_free,
140121 };
141122
142123 struct dma_fence *