Function radeon_fence_driver_init always returns success,
the function type maybe coule be changed to void.
This patch series will first delete the check of the return
value of the function call radeon_fence_driver_init, then,
optimise the function declaration and function to void type.
Signed-off-by: Bernard Zhao <[email protected]>
Bernard Zhao (4):
drm/radeon: remove meaningless if(r) check code
drm/radeon: remove meaningless if(r) check code
drm/radeon: remove meaningless if(r) check code
drm/radeon: delete useless return values
drivers/gpu/drm/radeon/cik.c | 4 +---
drivers/gpu/drm/radeon/evergreen.c | 4 +---
drivers/gpu/drm/radeon/ni.c | 4 +---
drivers/gpu/drm/radeon/r100.c | 4 +---
drivers/gpu/drm/radeon/r300.c | 4 +---
drivers/gpu/drm/radeon/r420.c | 5 +----
drivers/gpu/drm/radeon/r520.c | 4 +---
drivers/gpu/drm/radeon/r600.c | 4 +---
drivers/gpu/drm/radeon/radeon.h | 2 +-
drivers/gpu/drm/radeon/radeon_fence.c | 5 +----
drivers/gpu/drm/radeon/rs400.c | 4 +---
drivers/gpu/drm/radeon/rs600.c | 4 +---
drivers/gpu/drm/radeon/rs690.c | 4 +---
drivers/gpu/drm/radeon/rv515.c | 4 +---
drivers/gpu/drm/radeon/rv770.c | 4 +---
drivers/gpu/drm/radeon/si.c | 4 +---
16 files changed, 16 insertions(+), 48 deletions(-)
--
2.31.0
Function radeon_fence_driver_init always returns success,
remove meaningless if(r) check code.
Signed-off-by: Bernard Zhao <[email protected]>
---
drivers/gpu/drm/radeon/rs400.c | 4 +---
drivers/gpu/drm/radeon/rs600.c | 4 +---
drivers/gpu/drm/radeon/rs690.c | 4 +---
drivers/gpu/drm/radeon/rv515.c | 4 +---
drivers/gpu/drm/radeon/rv770.c | 4 +---
5 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/radeon/rs400.c b/drivers/gpu/drm/radeon/rs400.c
index 8423bcc3302b..6383f7a34bd8 100644
--- a/drivers/gpu/drm/radeon/rs400.c
+++ b/drivers/gpu/drm/radeon/rs400.c
@@ -555,9 +555,7 @@ int rs400_init(struct radeon_device *rdev)
/* initialize memory controller */
rs400_mc_init(rdev);
/* Fence driver */
- r = radeon_fence_driver_init(rdev);
- if (r)
- return r;
+ radeon_fence_driver_init(rdev);
/* Memory manager */
r = radeon_bo_init(rdev);
if (r)
diff --git a/drivers/gpu/drm/radeon/rs600.c b/drivers/gpu/drm/radeon/rs600.c
index 5bf26058eec0..b2d22e25eee1 100644
--- a/drivers/gpu/drm/radeon/rs600.c
+++ b/drivers/gpu/drm/radeon/rs600.c
@@ -1132,9 +1132,7 @@ int rs600_init(struct radeon_device *rdev)
rs600_mc_init(rdev);
r100_debugfs_rbbm_init(rdev);
/* Fence driver */
- r = radeon_fence_driver_init(rdev);
- if (r)
- return r;
+ radeon_fence_driver_init(rdev);
/* Memory manager */
r = radeon_bo_init(rdev);
if (r)
diff --git a/drivers/gpu/drm/radeon/rs690.c b/drivers/gpu/drm/radeon/rs690.c
index 7bc302a89232..14fb0819b8c1 100644
--- a/drivers/gpu/drm/radeon/rs690.c
+++ b/drivers/gpu/drm/radeon/rs690.c
@@ -850,9 +850,7 @@ int rs690_init(struct radeon_device *rdev)
rs690_mc_init(rdev);
rv515_debugfs(rdev);
/* Fence driver */
- r = radeon_fence_driver_init(rdev);
- if (r)
- return r;
+ radeon_fence_driver_init(rdev);
/* Memory manager */
r = radeon_bo_init(rdev);
if (r)
diff --git a/drivers/gpu/drm/radeon/rv515.c b/drivers/gpu/drm/radeon/rv515.c
index 46a53dd38079..63fb06e8e2d7 100644
--- a/drivers/gpu/drm/radeon/rv515.c
+++ b/drivers/gpu/drm/radeon/rv515.c
@@ -648,9 +648,7 @@ int rv515_init(struct radeon_device *rdev)
rv515_mc_init(rdev);
rv515_debugfs(rdev);
/* Fence driver */
- r = radeon_fence_driver_init(rdev);
- if (r)
- return r;
+ radeon_fence_driver_init(rdev);
/* Memory manager */
r = radeon_bo_init(rdev);
if (r)
diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 88e29ebaad46..74499307285b 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -1941,9 +1941,7 @@ int rv770_init(struct radeon_device *rdev)
/* Initialize clocks */
radeon_get_clock_info(rdev->ddev);
/* Fence driver */
- r = radeon_fence_driver_init(rdev);
- if (r)
- return r;
+ radeon_fence_driver_init(rdev);
/* initialize AGP */
if (rdev->flags & RADEON_IS_AGP) {
r = radeon_agp_init(rdev);
--
2.31.0
Am 19.06.21 um 08:43 schrieb Bernard Zhao:
> Function radeon_fence_driver_init always returns success,
> the function type maybe coule be changed to void.
> This patch series will first delete the check of the return
> value of the function call radeon_fence_driver_init, then,
> optimise the function declaration and function to void type.
Please merge all of this into a single patch, I don't see any point
separating this.
Christian.
>
> Signed-off-by: Bernard Zhao <[email protected]>
>
> Bernard Zhao (4):
> drm/radeon: remove meaningless if(r) check code
> drm/radeon: remove meaningless if(r) check code
> drm/radeon: remove meaningless if(r) check code
> drm/radeon: delete useless return values
>
> drivers/gpu/drm/radeon/cik.c | 4 +---
> drivers/gpu/drm/radeon/evergreen.c | 4 +---
> drivers/gpu/drm/radeon/ni.c | 4 +---
> drivers/gpu/drm/radeon/r100.c | 4 +---
> drivers/gpu/drm/radeon/r300.c | 4 +---
> drivers/gpu/drm/radeon/r420.c | 5 +----
> drivers/gpu/drm/radeon/r520.c | 4 +---
> drivers/gpu/drm/radeon/r600.c | 4 +---
> drivers/gpu/drm/radeon/radeon.h | 2 +-
> drivers/gpu/drm/radeon/radeon_fence.c | 5 +----
> drivers/gpu/drm/radeon/rs400.c | 4 +---
> drivers/gpu/drm/radeon/rs600.c | 4 +---
> drivers/gpu/drm/radeon/rs690.c | 4 +---
> drivers/gpu/drm/radeon/rv515.c | 4 +---
> drivers/gpu/drm/radeon/rv770.c | 4 +---
> drivers/gpu/drm/radeon/si.c | 4 +---
> 16 files changed, 16 insertions(+), 48 deletions(-)
>
From: "Christian König" <[email protected]>
Date: 2021-06-21 00:59:27
To: Bernard Zhao <[email protected]>,Alex Deucher <[email protected]>,David Airlie <[email protected]>,Daniel Vetter <[email protected]>,[email protected],[email protected],[email protected]
Subject: Re: [PATCH 0/4] delete useless function return values & remove meaningless if(r) check code>Am 19.06.21 um 08:43 schrieb Bernard Zhao:
>> Function radeon_fence_driver_init always returns success,
>> the function type maybe coule be changed to void.
>> This patch series will first delete the check of the return
>> value of the function call radeon_fence_driver_init, then,
>> optimise the function declaration and function to void type.
>
>Please merge all of this into a single patch, I don't see any point
>separating this.
>
>Christian.
Hi
Sure, i will resubmit one new ptach, thanks!
BR//Bernard
>>
>> Signed-off-by: Bernard Zhao <[email protected]>
>>
>> Bernard Zhao (4):
>> drm/radeon: remove meaningless if(r) check code
>> drm/radeon: remove meaningless if(r) check code
>> drm/radeon: remove meaningless if(r) check code
>> drm/radeon: delete useless return values
>>
>> drivers/gpu/drm/radeon/cik.c | 4 +---
>> drivers/gpu/drm/radeon/evergreen.c | 4 +---
>> drivers/gpu/drm/radeon/ni.c | 4 +---
>> drivers/gpu/drm/radeon/r100.c | 4 +---
>> drivers/gpu/drm/radeon/r300.c | 4 +---
>> drivers/gpu/drm/radeon/r420.c | 5 +----
>> drivers/gpu/drm/radeon/r520.c | 4 +---
>> drivers/gpu/drm/radeon/r600.c | 4 +---
>> drivers/gpu/drm/radeon/radeon.h | 2 +-
>> drivers/gpu/drm/radeon/radeon_fence.c | 5 +----
>> drivers/gpu/drm/radeon/rs400.c | 4 +---
>> drivers/gpu/drm/radeon/rs600.c | 4 +---
>> drivers/gpu/drm/radeon/rs690.c | 4 +---
>> drivers/gpu/drm/radeon/rv515.c | 4 +---
>> drivers/gpu/drm/radeon/rv770.c | 4 +---
>> drivers/gpu/drm/radeon/si.c | 4 +---
>> 16 files changed, 16 insertions(+), 48 deletions(-)
>>
>