Skip to contentSkip to conversation

drm/amdgpu/soc15: Fix static checker warnings

PATCH In review Alex Deucher 3 participants 3 messages Apr 3, 2017 – Apr 5, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu/soc15: Fix static checker warnings

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)"
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +4 -0
index bb14a45..758facd 100644
@@ -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;
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1491253121-28851-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw
Quoted 25 lines · 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)"
---
  drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -0
index bb14a45..758facd 100644
@@ -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;

drivers/gpu/drm/amd/amdgpu/soc15.c static void soc15_pcie_wreg(struct amdgpu_device *adev, u32 reg, u32 v) · line 134

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +2 -0
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 48fb0a7d-9349-f9ae-d281-50ff3015e834-5C7GfCeVMHo@public.gmane.org

Reviewed-by Junwei Zhang
#4 lore raw
Quoted 1 line · Harry Wentland
Quoted 31 lines · Alex Deucher
Quoted 29 lines

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)"
---
  drivers/gpu/drm/amd/amdgpu/soc15.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/soc15.c +3 -0
index bb14a45..758facd 100644
@@ -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
Quoted 8 lines

drivers/gpu/drm/amd/amdgpu/soc15.c static u32 soc15_pcie_rreg(struct amdgpu_device *adev, u32 reg) · line 113

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/soc15.c +1 -0
+        BUG();
      address = nbio_pcie_id->index_offset;
      data = nbio_pcie_id->data_offset;

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx