All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu/soc15: Fix static checker warnings
@ 2017-04-03 20:58 Alex Deucher
       [not found] ` <1491253121-28851-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2017-04-03 20:58 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

vega10 is the only soc15 asic at the moment so these
warnings are invalid, but add a default case to silence
the warnings.

Fixes: 220ab9bd1ccf: "drm/amdgpu: soc15 enable (v3)"
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index bb14a45..758facd 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -106,6 +106,8 @@ static u32 soc15_pcie_rreg(struct amdgpu_device *adev, u32 reg)
 
 	if (adev->asic_type == CHIP_VEGA10)
 		nbio_pcie_id = &nbio_v6_1_pcie_index_data;
+	else
+		BUG();
 
 	address = nbio_pcie_id->index_offset;
 	data = nbio_pcie_id->data_offset;
@@ -125,6 +127,8 @@ static void soc15_pcie_wreg(struct amdgpu_device *adev, u32 reg, u32 v)
 
 	if (adev->asic_type == CHIP_VEGA10)
 		nbio_pcie_id = &nbio_v6_1_pcie_index_data;
+	else
+		BUG();
 
 	address = nbio_pcie_id->index_offset;
 	data = nbio_pcie_id->data_offset;
-- 
2.5.5

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu/soc15: Fix static checker warnings
       [not found] ` <1491253121-28851-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-03 23:02   ` Harry Wentland
       [not found]     ` <48fb0a7d-9349-f9ae-d281-50ff3015e834-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Harry Wentland @ 2017-04-03 23:02 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher

Reviewed-by: Harry Wentland <harry.wentland@amd.com>

On 2017-04-03 04:58 PM, Alex Deucher wrote:
> vega10 is the only soc15 asic at the moment so these
> warnings are invalid, but add a default case to silence
> the warnings.
>
> Fixes: 220ab9bd1ccf: "drm/amdgpu: soc15 enable (v3)"
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
> index bb14a45..758facd 100644
> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
> @@ -106,6 +106,8 @@ static u32 soc15_pcie_rreg(struct amdgpu_device *adev, u32 reg)
>   
>   	if (adev->asic_type == CHIP_VEGA10)
>   		nbio_pcie_id = &nbio_v6_1_pcie_index_data;
> +	else
> +		BUG();
>   
>   	address = nbio_pcie_id->index_offset;
>   	data = nbio_pcie_id->data_offset;
> @@ -125,6 +127,8 @@ static void soc15_pcie_wreg(struct amdgpu_device *adev, u32 reg, u32 v)
>   
>   	if (adev->asic_type == CHIP_VEGA10)
>   		nbio_pcie_id = &nbio_v6_1_pcie_index_data;
> +	else
> +		BUG();
>   
>   	address = nbio_pcie_id->index_offset;
>   	data = nbio_pcie_id->data_offset;

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/amdgpu/soc15: Fix static checker warnings
       [not found]     ` <48fb0a7d-9349-f9ae-d281-50ff3015e834-5C7GfCeVMHo@public.gmane.org>
@ 2017-04-05  1:41       ` Zhang, Jerry (Junwei)
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Jerry (Junwei) @ 2017-04-05  1:41 UTC (permalink / raw)
  To: Harry Wentland, Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alex Deucher


On 04/04/2017 07:02 AM, Harry Wentland wrote:
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>

>
> On 2017-04-03 04:58 PM, Alex Deucher wrote:
>> vega10 is the only soc15 asic at the moment so these
>> warnings are invalid, but add a default case to silence
>> the warnings.
>>
>> Fixes: 220ab9bd1ccf: "drm/amdgpu: soc15 enable (v3)"
>> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
>> b/drivers/gpu/drm/amd/amdgpu/soc15.c
>> index bb14a45..758facd 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
>> @@ -106,6 +106,8 @@ static u32 soc15_pcie_rreg(struct amdgpu_device *adev,
>> u32 reg)
>>       if (adev->asic_type == CHIP_VEGA10)
>>           nbio_pcie_id = &nbio_v6_1_pcie_index_data;
>> +    else
>> +        BUG();
>>       address = nbio_pcie_id->index_offset;
>>       data = nbio_pcie_id->data_offset;
>> @@ -125,6 +127,8 @@ static void soc15_pcie_wreg(struct amdgpu_device *adev,
>> u32 reg, u32 v)
>>       if (adev->asic_type == CHIP_VEGA10)
>>           nbio_pcie_id = &nbio_v6_1_pcie_index_data;
>> +    else
>> +        BUG();
>>       address = nbio_pcie_id->index_offset;
>>       data = nbio_pcie_id->data_offset;
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-05  1:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 20:58 [PATCH] drm/amdgpu/soc15: Fix static checker warnings Alex Deucher
     [not found] ` <1491253121-28851-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-04-03 23:02   ` Harry Wentland
     [not found]     ` <48fb0a7d-9349-f9ae-d281-50ff3015e834-5C7GfCeVMHo@public.gmane.org>
2017-04-05  1:41       ` Zhang, Jerry (Junwei)

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.