Skip to contentSkip to conversation

drm/radeon: fix compilation error

PATCH In review Nirmoy Das 4 participants 4 messages Feb 16, 2021

Subsystems (2)
lore
Share & tools
lore

Nirmoy Das

author
#0 lore raw

PATCH 1/1 drm/radeon: fix compilation error

Fixes below compilation error:
conflicting types for ‘r100_debugfs_mc_info_init’

Fixes 6f8672d6523bfe38e ("drm/radeon: do not use drm middle layer for

debugfs")

---
Hi Alex,

Can you please squash this with the "Fixes" commit. I am not sure how I missed it.
I even tested the patch with my radeon card before pushing.

 drivers/gpu/drm/radeon/r300.c        | 6 +-----
 drivers/gpu/drm/radeon/radeon_asic.h | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/radeon/r300.c +1 -5
index 03b0d4a81f7a..92643dfdd8a8 100644
@@ -1326,12 +1326,8 @@ void r300_set_reg_safe(struct radeon_device *rdev)
 void r300_mc_program(struct radeon_device *rdev)
 {
 	struct r100_mc_save save;
-	int r;
 
-	r = r100_debugfs_mc_info_init(rdev);
-	if (r) {
-		dev_err(rdev->dev, "Failed to create r100_mc debugfs file.\n");
-	}
+	r100_debugfs_mc_info_init(rdev);
 
 	/* Stops all mc clients */
 	r100_mc_stop(rdev, &save);
drivers/gpu/drm/radeon/radeon_asic.h +1 -1
index 2c77f151ef62..1cf2a5e0d91d 100644
@@ -108,7 +108,7 @@ int r100_pci_gart_init(struct radeon_device *rdev);
 void r100_pci_gart_fini(struct radeon_device *rdev);
 int r100_pci_gart_enable(struct radeon_device *rdev);
 void r100_pci_gart_disable(struct radeon_device *rdev);
-int r100_debugfs_mc_info_init(struct radeon_device *rdev);
+void  r100_debugfs_mc_info_init(struct radeon_device *rdev);
 int r100_gui_wait_for_idle(struct radeon_device *rdev);
 int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
 void r100_irq_disable(struct radeon_device *rdev);

--
2.30.0

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

maintainer Reviewed-by on v1 1/1
#1 lore raw

Am 16.02.21 um 16:22 schrieb Nirmoy Das:

Quoted 7 lines

Fixes below compilation error:
conflicting types for ‘r100_debugfs_mc_info_init’

Fixes 6f8672d6523bfe38e ("drm/radeon: do not use drm middle layer for

debugfs")

Quoted 6 lines

---
Hi Alex,

Can you please squash this with the "Fixes" commit. I am not sure how I missed it.
I even tested the patch with my radeon card before pushing.

Strange I'm pretty sure I've seen those lines in the original patch.

Christian.

Quoted 37 lines
  drivers/gpu/drm/radeon/r300.c        | 6 +-----
  drivers/gpu/drm/radeon/radeon_asic.h | 2 +-
  2 files changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/radeon/r300.c +1 -5
index 03b0d4a81f7a..92643dfdd8a8 100644
@@ -1326,12 +1326,8 @@ void r300_set_reg_safe(struct radeon_device *rdev)
  void r300_mc_program(struct radeon_device *rdev)
  {
  	struct r100_mc_save save;
-	int r;
 
-	r = r100_debugfs_mc_info_init(rdev);
-	if (r) {
-		dev_err(rdev->dev, "Failed to create r100_mc debugfs file.\n");
-	}
+	r100_debugfs_mc_info_init(rdev);
 
  	/* Stops all mc clients */
  	r100_mc_stop(rdev, &save);
drivers/gpu/drm/radeon/radeon_asic.h +1 -2
index 2c77f151ef62..1cf2a5e0d91d 100644
@@ -108,7 +108,7 @@ int r100_pci_gart_init(struct radeon_device *rdev);
  void r100_pci_gart_fini(struct radeon_device *rdev);
  int r100_pci_gart_enable(struct radeon_device *rdev);
  void r100_pci_gart_disable(struct radeon_device *rdev);
-int r100_debugfs_mc_info_init(struct radeon_device *rdev);
+void  r100_debugfs_mc_info_init(struct radeon_device *rdev);
  int r100_gui_wait_for_idle(struct radeon_device *rdev);
  int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
  void r100_irq_disable(struct radeon_device *rdev);
--
Quoted 2 lines

2.30.0

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

#2 lore raw
Quoted 13 lines · Christian König

Am 16.02.21 um 16:22 schrieb Nirmoy Das:

Quoted 7 lines

Fixes below compilation error:
conflicting types for ‘r100_debugfs_mc_info_init’

Fixes 6f8672d6523bfe38e ("drm/radeon: do not use drm middle layer for

debugfs")

Quoted 8 lines
Quoted 6 lines

---
Hi Alex,

Can you please squash this with the "Fixes" commit. I am not sure how I missed it.
I even tested the patch with my radeon card before pushing.

Strange I'm pretty sure I've seen those lines in the original patch.

That hunk is actually missing from the original patch too but there

are multiple similar hunks.

I know what happened: I use "rsync -u .." to fast sync linux source with

the test machine. I think I accidentally fixed some compilation errors for

r100_debugfs_mc_info_init() in the test machine instead of the devel machine.

"rsync -u" wouldn't replace newer files in the dest machine leaving a correct/working

copy in the test machine but incorrect one in the devel machine from where I created the

patch.

Regards,

Nirmoy

Quoted 35 lines

Christian.

Quoted 32 lines

  drivers/gpu/drm/radeon/r300.c        | 6 +----- drivers/gpu/drm/radeon/radeon_asic.h | 2 +-

  2 files changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/radeon/r300.c +1 -5
index 03b0d4a81f7a..92643dfdd8a8 100644
@@ -1326,12 +1326,8 @@ void r300_set_reg_safe(struct radeon_device 
 *rdev)
   void r300_mc_program(struct radeon_device *rdev)
   {
       struct r100_mc_save save;
-    int r;
 
-    r = r100_debugfs_mc_info_init(rdev);
-    if (r) {
-        dev_err(rdev->dev, "Failed to create r100_mc debugfs file.\n");
-    }
+    r100_debugfs_mc_info_init(rdev);
 
       /* Stops all mc clients */

      r100_mc_stop(rdev, &save);

drivers/gpu/drm/radeon/radeon_asic.h +0 -0
index 2c77f151ef62..1cf2a5e0d91d 100644
@@ -108,7 +108,7 @@ int r100_pci_gart_init(struct radeon_device *rdev);
   void r100_pci_gart_fini(struct radeon_device *rdev);
   int r100_pci_gart_enable(struct radeon_device *rdev);
   void r100_pci_gart_disable(struct radeon_device *rdev);
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/radeon/radeon_asic.h +1 -1
-int r100_debugfs_mc_info_init(struct radeon_device *rdev);
+void  r100_debugfs_mc_info_init(struct radeon_device *rdev);
   int r100_gui_wait_for_idle(struct radeon_device *rdev);
   int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
   void r100_irq_disable(struct radeon_device *rdev);
Signature · 1 line
2.30.0

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

Acked-by on v1 1/1
#3 lore raw
In reply to Nirmoy Das
Quoted 6 lines · Nirmoy Das

Fixes below compilation error:
conflicting types for ‘r100_debugfs_mc_info_init’

Fixes 6f8672d6523bfe38e ("drm/radeon: do not use drm middle layer for

debugfs")

Quoted 8 lines

---
Hi Alex,

Can you please squash this with the "Fixes" commit. I am not sure how I missed it.
I even tested the patch with my radeon card before pushing.

Sure.

Quoted 39 lines
 drivers/gpu/drm/radeon/r300.c        | 6 +-----
 drivers/gpu/drm/radeon/radeon_asic.h | 2 +-
 2 files changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/radeon/r300.c +1 -5
index 03b0d4a81f7a..92643dfdd8a8 100644
@@ -1326,12 +1326,8 @@ void r300_set_reg_safe(struct radeon_device *rdev)
 void r300_mc_program(struct radeon_device *rdev)
 {
        struct r100_mc_save save;
-       int r;
 
-       r = r100_debugfs_mc_info_init(rdev);
-       if (r) {
-               dev_err(rdev->dev, "Failed to create r100_mc debugfs file.\n");
-       }
+       r100_debugfs_mc_info_init(rdev);
 
        /* Stops all mc clients */
        r100_mc_stop(rdev, &save);
drivers/gpu/drm/radeon/radeon_asic.h +1 -2
index 2c77f151ef62..1cf2a5e0d91d 100644
@@ -108,7 +108,7 @@ int r100_pci_gart_init(struct radeon_device *rdev);
 void r100_pci_gart_fini(struct radeon_device *rdev);
 int r100_pci_gart_enable(struct radeon_device *rdev);
 void r100_pci_gart_disable(struct radeon_device *rdev);
-int r100_debugfs_mc_info_init(struct radeon_device *rdev);
+void  r100_debugfs_mc_info_init(struct radeon_device *rdev);
 int r100_gui_wait_for_idle(struct radeon_device *rdev);
 int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring);
 void r100_irq_disable(struct radeon_device *rdev);
--

2.30.0

Quoted 4 lines

_______________________________________________
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