* [PATCH] drm/ttm: Remove unnecessary '0' values from ret
@ 2022-09-07 3:29 Li zeming
2022-09-07 7:44 ` Christian König
0 siblings, 1 reply; 2+ messages in thread
From: Li zeming @ 2022-09-07 3:29 UTC (permalink / raw)
To: christian.koenig, ray.huang, airlied, daniel
Cc: Li zeming, linux-kernel, dri-devel
The variable ret is assigned in the judgment branch statement, he does
not need to initialize the assignment.
Signed-off-by: Li zeming <zeming@nfschina.com>
---
include/drm/ttm/ttm_bo_driver.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 897b88f0bd59..1afa891f488a 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -106,7 +106,7 @@ static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
bool interruptible, bool no_wait,
struct ww_acquire_ctx *ticket)
{
- int ret = 0;
+ int ret;
if (no_wait) {
bool success;
--
2.18.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/ttm: Remove unnecessary '0' values from ret
2022-09-07 3:29 [PATCH] drm/ttm: Remove unnecessary '0' values from ret Li zeming
@ 2022-09-07 7:44 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2022-09-07 7:44 UTC (permalink / raw)
To: Li zeming, ray.huang, airlied, daniel; +Cc: linux-kernel, dri-devel
Am 07.09.22 um 05:29 schrieb Li zeming:
> The variable ret is assigned in the judgment branch statement, he does
> not need to initialize the assignment.
>
> Signed-off-by: Li zeming <zeming@nfschina.com>
Reviewed and pushed to drm-misc-next.
Thanks,
Christian.
> ---
> include/drm/ttm/ttm_bo_driver.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
> index 897b88f0bd59..1afa891f488a 100644
> --- a/include/drm/ttm/ttm_bo_driver.h
> +++ b/include/drm/ttm/ttm_bo_driver.h
> @@ -106,7 +106,7 @@ static inline int ttm_bo_reserve(struct ttm_buffer_object *bo,
> bool interruptible, bool no_wait,
> struct ww_acquire_ctx *ticket)
> {
> - int ret = 0;
> + int ret;
>
> if (no_wait) {
> bool success;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-09-07 7:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-07 3:29 [PATCH] drm/ttm: Remove unnecessary '0' values from ret Li zeming
2022-09-07 7:44 ` Christian König
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).