Message ID | 20181031120710.21582-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/syncobj: Mark local add/remove callback functions as static | expand |
On 2018年10月31日 20:07, Chris Wilson wrote: > drivers/gpu/drm/drm_syncobj.c:181:6: warning: no previous prototype for ‘drm_syncobj_add_callback’ [-Wmissing-prototypes] > drivers/gpu/drm/drm_syncobj.c:190:6: warning: no previous prototype for ‘drm_syncobj_remove_callback’ [-Wmissing-prototypes] > > Fixing that leads to > > drivers/gpu/drm/drm_syncobj.c:181:13: warning: ‘drm_syncobj_add_callback’ defined but not used [-Wunused-function] > > so remove the unused drm_syncobj_add_callback() entirely. > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> > --- > drivers/gpu/drm/drm_syncobj.c | 19 +++++-------------- > 1 file changed, 5 insertions(+), 14 deletions(-) > > diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c > index d3e2335b88f9..4dca5f7e8c4b 100644 > --- a/drivers/gpu/drm/drm_syncobj.c > +++ b/drivers/gpu/drm/drm_syncobj.c > @@ -123,9 +123,9 @@ struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, > } > EXPORT_SYMBOL(drm_syncobj_find); > > -static struct dma_fence > -*drm_syncobj_find_signal_pt_for_point(struct drm_syncobj *syncobj, > - uint64_t point) > +static struct dma_fence * > +drm_syncobj_find_signal_pt_for_point(struct drm_syncobj *syncobj, > + uint64_t point) > { > struct drm_syncobj_signal_pt *signal_pt; > > @@ -178,17 +178,8 @@ static void drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj, > mutex_unlock(&syncobj->cb_mutex); > } > > -void drm_syncobj_add_callback(struct drm_syncobj *syncobj, > - struct drm_syncobj_cb *cb, > - drm_syncobj_func_t func) > -{ > - mutex_lock(&syncobj->cb_mutex); > - drm_syncobj_add_callback_locked(syncobj, cb, func); > - mutex_unlock(&syncobj->cb_mutex); > -} > - > -void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, > - struct drm_syncobj_cb *cb) > +static void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, > + struct drm_syncobj_cb *cb) > { > mutex_lock(&syncobj->cb_mutex); > list_del_init(&cb->node);
Quoting zhoucm1 (2018-11-01 08:53:02) > > > On 2018年10月31日 20:07, Chris Wilson wrote: > > drivers/gpu/drm/drm_syncobj.c:181:6: warning: no previous prototype for ‘drm_syncobj_add_callback’ [-Wmissing-prototypes] > > drivers/gpu/drm/drm_syncobj.c:190:6: warning: no previous prototype for ‘drm_syncobj_remove_callback’ [-Wmissing-prototypes] > > > > Fixing that leads to > > > > drivers/gpu/drm/drm_syncobj.c:181:13: warning: ‘drm_syncobj_add_callback’ defined but not used [-Wunused-function] > > > > so remove the unused drm_syncobj_add_callback() entirely. > > > > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Thanks, pushed. -Chris
diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c index d3e2335b88f9..4dca5f7e8c4b 100644 --- a/drivers/gpu/drm/drm_syncobj.c +++ b/drivers/gpu/drm/drm_syncobj.c @@ -123,9 +123,9 @@ struct drm_syncobj *drm_syncobj_find(struct drm_file *file_private, } EXPORT_SYMBOL(drm_syncobj_find); -static struct dma_fence -*drm_syncobj_find_signal_pt_for_point(struct drm_syncobj *syncobj, - uint64_t point) +static struct dma_fence * +drm_syncobj_find_signal_pt_for_point(struct drm_syncobj *syncobj, + uint64_t point) { struct drm_syncobj_signal_pt *signal_pt; @@ -178,17 +178,8 @@ static void drm_syncobj_fence_get_or_add_callback(struct drm_syncobj *syncobj, mutex_unlock(&syncobj->cb_mutex); } -void drm_syncobj_add_callback(struct drm_syncobj *syncobj, - struct drm_syncobj_cb *cb, - drm_syncobj_func_t func) -{ - mutex_lock(&syncobj->cb_mutex); - drm_syncobj_add_callback_locked(syncobj, cb, func); - mutex_unlock(&syncobj->cb_mutex); -} - -void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, - struct drm_syncobj_cb *cb) +static void drm_syncobj_remove_callback(struct drm_syncobj *syncobj, + struct drm_syncobj_cb *cb) { mutex_lock(&syncobj->cb_mutex); list_del_init(&cb->node);
drivers/gpu/drm/drm_syncobj.c:181:6: warning: no previous prototype for ‘drm_syncobj_add_callback’ [-Wmissing-prototypes] drivers/gpu/drm/drm_syncobj.c:190:6: warning: no previous prototype for ‘drm_syncobj_remove_callback’ [-Wmissing-prototypes] Fixing that leads to drivers/gpu/drm/drm_syncobj.c:181:13: warning: ‘drm_syncobj_add_callback’ defined but not used [-Wunused-function] so remove the unused drm_syncobj_add_callback() entirely. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/drm_syncobj.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-)