Commit 3ad8173
drm/shmem: Cleanup drm_gem_shmem_create_with_handle()
Once we create the handle, the handle owns the reference. Currently
nothing was doing anything with the shmem ptr after the handle was
created, but let's change drm_gem_shmem_create_with_handle() to not
return the pointer, so-as to not encourage problematic use of this
function in the future. As a bonus, it makes the code a bit cleaner.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230123154831.3191821-1-robdclark@gmail.com
(cherry picked from commit d023d6f)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>1 parent 76b1d90 commit 3ad8173
1 file changed
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
418 | | - | |
| 418 | + | |
419 | 419 | | |
420 | 420 | | |
421 | 421 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
428 | | - | |
| 428 | + | |
429 | 429 | | |
430 | 430 | | |
431 | 431 | | |
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
438 | | - | |
439 | 437 | | |
440 | | - | |
| 438 | + | |
441 | 439 | | |
442 | 440 | | |
443 | 441 | | |
| |||
520 | 518 | | |
521 | 519 | | |
522 | 520 | | |
523 | | - | |
524 | 521 | | |
525 | 522 | | |
526 | 523 | | |
| |||
533 | 530 | | |
534 | 531 | | |
535 | 532 | | |
536 | | - | |
537 | | - | |
538 | | - | |
| 533 | + | |
539 | 534 | | |
540 | 535 | | |
541 | 536 | | |
| |||
0 commit comments