* [PATCH] fix drm-get-put.cocci warnings
@ 2018-01-15 12:47 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2018-01-15 12:47 UTC (permalink / raw)
To: Thierry Reding
Cc: David Airlie, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
kbuild-all-JC7UmRfGjtg, Ben Skeggs
From: Fengguang Wu <fengguang.wu@intel.com>
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
drm_*_unreference() helpers.
Generated by: scripts/coccinelle/api/drm-get-put.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
tree: https://github.com/thierryreding/linux for-4.16/work
head: 6c86494bb2f670293f6137b0a4b3c53c8886eba4
commit: 34f022b2d11f91a323d3e7d15893d480646f3fad [149/161] WIP
nouveau_gem.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -296,7 +296,7 @@ nouveau_gem_ioctl_new(struct drm_device
}
/* drop reference from allocate - handle holds it now */
- drm_gem_object_unreference_unlocked(&nvbo->gem);
+ drm_gem_object_put_unlocked(&nvbo->gem);
return ret;
}
@@ -365,7 +365,7 @@ validate_fini_no_ticket(struct validate_
list_del(&nvbo->entry);
nvbo->reserved_by = NULL;
ttm_bo_unreserve(&nvbo->bo);
- drm_gem_object_unreference_unlocked(&nvbo->gem);
+ drm_gem_object_put_unlocked(&nvbo->gem);
}
}
@@ -411,14 +411,14 @@ retry:
nvbo = nouveau_gem_object(gem);
if (nvbo == res_bo) {
res_bo = NULL;
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
continue;
}
if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
NV_PRINTK(err, cli, "multiple instances of buffer %d on "
"validation list\n", b->handle);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
ret = -EINVAL;
break;
}
@@ -969,7 +969,7 @@ nouveau_gem_ioctl_cpu_prep(struct drm_de
ret = lret;
nouveau_bo_sync_for_cpu(nvbo);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return ret;
}
@@ -988,7 +988,7 @@ nouveau_gem_ioctl_cpu_fini(struct drm_de
nvbo = nouveau_gem_object(gem);
nouveau_bo_sync_for_device(nvbo);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return 0;
}
@@ -1005,7 +1005,7 @@ nouveau_gem_ioctl_info(struct drm_device
return -ENOENT;
ret = nouveau_gem_info(file_priv, gem, req);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return ret;
}
@@ -1153,7 +1153,7 @@ out:
return err;
unref:
- drm_gem_object_unreference(&nvbo->gem);
+ drm_gem_object_put(&nvbo->gem);
unref_bo:
nouveau_bo_ref(NULL, &nvbo);
free_sgt:
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] fix drm-get-put.cocci warnings
@ 2018-01-15 12:47 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2018-01-15 12:47 UTC (permalink / raw)
To: Thierry Reding
Cc: Ben Skeggs, David Airlie, dri-devel, nouveau, linux-kernel,
kbuild-all
From: Fengguang Wu <fengguang.wu@intel.com>
Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
drm_*_unreference() helpers.
Generated by: scripts/coccinelle/api/drm-get-put.cocci
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
---
tree: https://github.com/thierryreding/linux for-4.16/work
head: 6c86494bb2f670293f6137b0a4b3c53c8886eba4
commit: 34f022b2d11f91a323d3e7d15893d480646f3fad [149/161] WIP
nouveau_gem.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -296,7 +296,7 @@ nouveau_gem_ioctl_new(struct drm_device
}
/* drop reference from allocate - handle holds it now */
- drm_gem_object_unreference_unlocked(&nvbo->gem);
+ drm_gem_object_put_unlocked(&nvbo->gem);
return ret;
}
@@ -365,7 +365,7 @@ validate_fini_no_ticket(struct validate_
list_del(&nvbo->entry);
nvbo->reserved_by = NULL;
ttm_bo_unreserve(&nvbo->bo);
- drm_gem_object_unreference_unlocked(&nvbo->gem);
+ drm_gem_object_put_unlocked(&nvbo->gem);
}
}
@@ -411,14 +411,14 @@ retry:
nvbo = nouveau_gem_object(gem);
if (nvbo == res_bo) {
res_bo = NULL;
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
continue;
}
if (nvbo->reserved_by && nvbo->reserved_by == file_priv) {
NV_PRINTK(err, cli, "multiple instances of buffer %d on "
"validation list\n", b->handle);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
ret = -EINVAL;
break;
}
@@ -969,7 +969,7 @@ nouveau_gem_ioctl_cpu_prep(struct drm_de
ret = lret;
nouveau_bo_sync_for_cpu(nvbo);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return ret;
}
@@ -988,7 +988,7 @@ nouveau_gem_ioctl_cpu_fini(struct drm_de
nvbo = nouveau_gem_object(gem);
nouveau_bo_sync_for_device(nvbo);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return 0;
}
@@ -1005,7 +1005,7 @@ nouveau_gem_ioctl_info(struct drm_device
return -ENOENT;
ret = nouveau_gem_info(file_priv, gem, req);
- drm_gem_object_unreference_unlocked(gem);
+ drm_gem_object_put_unlocked(gem);
return ret;
}
@@ -1153,7 +1153,7 @@ out:
return err;
unref:
- drm_gem_object_unreference(&nvbo->gem);
+ drm_gem_object_put(&nvbo->gem);
unref_bo:
nouveau_bo_ref(NULL, &nvbo);
free_sgt:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Nouveau] [PATCH] fix drm-get-put.cocci warnings
2018-01-15 12:47 ` Julia Lawall
@ 2018-01-15 13:51 ` Thierry Reding
-1 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2018-01-15 13:51 UTC (permalink / raw)
To: Julia Lawall
Cc: David Airlie, nouveau, linux-kernel, dri-devel, kbuild-all,
Thierry Reding, Ben Skeggs
[-- Attachment #1.1: Type: text/plain, Size: 1532 bytes --]
On Mon, Jan 15, 2018 at 01:47:07PM +0100, Julia Lawall wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
>
> Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
> drm_*_unreference() helpers.
>
> Generated by: scripts/coccinelle/api/drm-get-put.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
>
> tree: https://github.com/thierryreding/linux for-4.16/work
> head: 6c86494bb2f670293f6137b0a4b3c53c8886eba4
> commit: 34f022b2d11f91a323d3e7d15893d480646f3fad [149/161] WIP
>
> nouveau_gem.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
Hi Julia,
thanks for the patch. However, the tree that you generated it against is
a personal development tree and it happens to have a bunch of commits in
it that are very experimental and some of which are very unlikely to go
upstream. There's an IOCTL addition patch (touched by hunk 7 in this
patch) that is used only for testing purposes. All of the other hunks do
pply properly to linux-next, so I think those can be posted. Nouveau is
maintained by Ben Skeggs, though, so they should be addressed to him.
I don't personally mind getting these patches, and I don't mind people
seeing the personal development tree (it's publicly available, after
all) but I think patches against this tree will be confusing to anyone
but me because they are likely not going to apply anywhere other than
that tree.
Thanks,
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Nouveau] [PATCH] fix drm-get-put.cocci warnings
@ 2018-01-15 13:51 ` Thierry Reding
0 siblings, 0 replies; 6+ messages in thread
From: Thierry Reding @ 2018-01-15 13:51 UTC (permalink / raw)
To: Julia Lawall
Cc: Thierry Reding, David Airlie, nouveau, linux-kernel, dri-devel,
kbuild-all, Ben Skeggs
[-- Attachment #1: Type: text/plain, Size: 1532 bytes --]
On Mon, Jan 15, 2018 at 01:47:07PM +0100, Julia Lawall wrote:
> From: Fengguang Wu <fengguang.wu@intel.com>
>
> Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
> drm_*_unreference() helpers.
>
> Generated by: scripts/coccinelle/api/drm-get-put.cocci
>
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
>
> tree: https://github.com/thierryreding/linux for-4.16/work
> head: 6c86494bb2f670293f6137b0a4b3c53c8886eba4
> commit: 34f022b2d11f91a323d3e7d15893d480646f3fad [149/161] WIP
>
> nouveau_gem.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
Hi Julia,
thanks for the patch. However, the tree that you generated it against is
a personal development tree and it happens to have a bunch of commits in
it that are very experimental and some of which are very unlikely to go
upstream. There's an IOCTL addition patch (touched by hunk 7 in this
patch) that is used only for testing purposes. All of the other hunks do
pply properly to linux-next, so I think those can be posted. Nouveau is
maintained by Ben Skeggs, though, so they should be addressed to him.
I don't personally mind getting these patches, and I don't mind people
seeing the personal development tree (it's publicly available, after
all) but I think patches against this tree will be confusing to anyone
but me because they are likely not going to apply anywhere other than
that tree.
Thanks,
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] fix drm-get-put.cocci warnings
2018-01-15 13:51 ` Thierry Reding
@ 2018-01-15 13:58 ` Julia Lawall
-1 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2018-01-15 13:58 UTC (permalink / raw)
To: Thierry Reding
Cc: David Airlie, nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
kbuild-all-JC7UmRfGjtg, Thierry Reding, Ben Skeggs
On Mon, 15 Jan 2018, Thierry Reding wrote:
> On Mon, Jan 15, 2018 at 01:47:07PM +0100, Julia Lawall wrote:
> > From: Fengguang Wu <fengguang.wu@intel.com>
> >
> > Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
> > drm_*_unreference() helpers.
> >
> > Generated by: scripts/coccinelle/api/drm-get-put.cocci
> >
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> > ---
> >
> > tree: https://github.com/thierryreding/linux for-4.16/work
> > head: 6c86494bb2f670293f6137b0a4b3c53c8886eba4
> > commit: 34f022b2d11f91a323d3e7d15893d480646f3fad [149/161] WIP
> >
> > nouveau_gem.c | 16 ++++++++--------
> > 1 file changed, 8 insertions(+), 8 deletions(-)
>
> Hi Julia,
>
> thanks for the patch. However, the tree that you generated it against is
> a personal development tree and it happens to have a bunch of commits in
> it that are very experimental and some of which are very unlikely to go
> upstream. There's an IOCTL addition patch (touched by hunk 7 in this
> patch) that is used only for testing purposes. All of the other hunks do
> pply properly to linux-next, so I think those can be posted. Nouveau is
> maintained by Ben Skeggs, though, so they should be addressed to him.
>
> I don't personally mind getting these patches, and I don't mind people
> seeing the personal development tree (it's publicly available, after
> all) but I think patches against this tree will be confusing to anyone
> but me because they are likely not going to apply anywhere other than
> that tree.
OK, I'm just forwarding what kbuild sends me for approval. No problem if
you toss it, apply it, or do whatever seems reasonable :)
julia
>
> Thanks,
> Thierry
>
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Nouveau] [PATCH] fix drm-get-put.cocci warnings
@ 2018-01-15 13:58 ` Julia Lawall
0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2018-01-15 13:58 UTC (permalink / raw)
To: Thierry Reding
Cc: Thierry Reding, David Airlie, nouveau, linux-kernel, dri-devel,
kbuild-all, Ben Skeggs
On Mon, 15 Jan 2018, Thierry Reding wrote:
> On Mon, Jan 15, 2018 at 01:47:07PM +0100, Julia Lawall wrote:
> > From: Fengguang Wu <fengguang.wu@intel.com>
> >
> > Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
> > drm_*_unreference() helpers.
> >
> > Generated by: scripts/coccinelle/api/drm-get-put.cocci
> >
> > Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
> > Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
> > ---
> >
> > tree: https://github.com/thierryreding/linux for-4.16/work
> > head: 6c86494bb2f670293f6137b0a4b3c53c8886eba4
> > commit: 34f022b2d11f91a323d3e7d15893d480646f3fad [149/161] WIP
> >
> > nouveau_gem.c | 16 ++++++++--------
> > 1 file changed, 8 insertions(+), 8 deletions(-)
>
> Hi Julia,
>
> thanks for the patch. However, the tree that you generated it against is
> a personal development tree and it happens to have a bunch of commits in
> it that are very experimental and some of which are very unlikely to go
> upstream. There's an IOCTL addition patch (touched by hunk 7 in this
> patch) that is used only for testing purposes. All of the other hunks do
> pply properly to linux-next, so I think those can be posted. Nouveau is
> maintained by Ben Skeggs, though, so they should be addressed to him.
>
> I don't personally mind getting these patches, and I don't mind people
> seeing the personal development tree (it's publicly available, after
> all) but I think patches against this tree will be confusing to anyone
> but me because they are likely not going to apply anywhere other than
> that tree.
OK, I'm just forwarding what kbuild sends me for approval. No problem if
you toss it, apply it, or do whatever seems reasonable :)
julia
>
> Thanks,
> Thierry
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-15 13:58 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-15 12:47 [PATCH] fix drm-get-put.cocci warnings Julia Lawall
2018-01-15 12:47 ` Julia Lawall
2018-01-15 13:51 ` [Nouveau] " Thierry Reding
2018-01-15 13:51 ` Thierry Reding
2018-01-15 13:58 ` Julia Lawall
2018-01-15 13:58 ` [Nouveau] " Julia Lawall
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.