diff mbox series

[v3,1/4] drm/msm/adreno: Remove dead code

Message ID 20220528160353.157870-1-konrad.dybcio@somainline.org
State Accepted
Commit 0165e9c119c92fae4366c92ea459edde0224bfa7
Headers show
Series [v3,1/4] drm/msm/adreno: Remove dead code | expand

Commit Message

Konrad Dybcio May 28, 2022, 4:03 p.m. UTC
This BUG_ON will never be reached, and there is a comment 20 above
explaining why.

Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
---
 drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Joe Perches May 28, 2022, 4:52 p.m. UTC | #1
On Sat, 2022-05-28 at 18:03 +0200, Konrad Dybcio wrote:
> Leading spaces are not something checkpatch likes, and it says so when
> they are present. Use tabs consistently to indent function body and
> unwrap a 83-char-long line, as 100 is cool nowadays.

unassociated trivia:

> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
[]
> @@ -199,7 +199,7 @@ static inline int adreno_is_a420(struct adreno_gpu *gpu)
>  
>  static inline int adreno_is_a430(struct adreno_gpu *gpu)
>  {
> -       return gpu->revn == 430;
> +	return gpu->revn == 430;
>  }

looks like these could/should return bool

>  static inline int adreno_is_a506(struct adreno_gpu *gpu)
> @@ -239,7 +239,7 @@ static inline int adreno_is_a540(struct adreno_gpu *gpu)
>  
>  static inline int adreno_is_a618(struct adreno_gpu *gpu)
>  {
> -       return gpu->revn == 618;
> +	return gpu->revn == 618;
>  }

etc...
Akhil P Oommen June 30, 2022, 2:59 p.m. UTC | #2
On 5/28/2022 9:33 PM, Konrad Dybcio wrote:
> This BUG_ON will never be reached, and there is a comment 20 above
> explaining why.
>
> Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
> ---
>   drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 2 --
>   1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> index 3e325e2a2b1b..b1c876c339d0 100644
> --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
> @@ -1548,8 +1548,6 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
>   		if (ret)
>   			goto err_memory;
>   	} else {
> -		BUG_ON(adreno_is_a660_family(adreno_gpu));
> -
>   		/* HFI v1, has sptprac */
>   		gmu->legacy = true;
>   

Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>


-Akhil
Akhil P Oommen June 30, 2022, 3:17 p.m. UTC | #3
On 5/28/2022 10:22 PM, Joe Perches wrote:
> On Sat, 2022-05-28 at 18:03 +0200, Konrad Dybcio wrote:
>> Leading spaces are not something checkpatch likes, and it says so when
>> they are present. Use tabs consistently to indent function body and
>> unwrap a 83-char-long line, as 100 is cool nowadays.
> unassociated trivia:
>
>> diff --git a/drivers/gpu/drm/msm/adreno/adreno_gpu.h b/drivers/gpu/drm/msm/adreno/adreno_gpu.h
> []
>> @@ -199,7 +199,7 @@ static inline int adreno_is_a420(struct adreno_gpu *gpu)
>>   
>>   static inline int adreno_is_a430(struct adreno_gpu *gpu)
>>   {
>> -       return gpu->revn == 430;
>> +	return gpu->revn == 430;
>>   }
> looks like these could/should return bool
But this is just a format fix.

>
>>   static inline int adreno_is_a506(struct adreno_gpu *gpu)
>> @@ -239,7 +239,7 @@ static inline int adreno_is_a540(struct adreno_gpu *gpu)
>>   
>>   static inline int adreno_is_a618(struct adreno_gpu *gpu)
>>   {
>> -       return gpu->revn == 618;
>> +	return gpu->revn == 618;
>>   }
> etc...

Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com>


-Akhil.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 3e325e2a2b1b..b1c876c339d0 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -1548,8 +1548,6 @@  int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
 		if (ret)
 			goto err_memory;
 	} else {
-		BUG_ON(adreno_is_a660_family(adreno_gpu));
-
 		/* HFI v1, has sptprac */
 		gmu->legacy = true;