Skip to contentSkip to conversation

drm/rockchip: include rockchip_drm_drv.h

PATCH Superseded Min-Hua Chen 3 participants 10 messages Sep 5, 2024 – Sep 8, 2024

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/rockchip: include rockchip_drm_drv.h

Include rockchip_drm_drv.h to fix the follow sparse warning:

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse:
warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

No functional change intended.

---
 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +1 -0
index 18efb3fe1c00..c678d1b0fd7c 100644
@@ -14,6 +14,7 @@
 #include <drm/drm_print.h>
 
 #include "rockchip_drm_vop2.h"
+#include "rockchip_drm_drv.h"
 
 static const uint32_t formats_cluster[] = {
 	DRM_FORMAT_XRGB2101010,
Signature · 1 line
2.43.0
maintainer
#1 lore raw

Hi Min Hua,
Thanks for your work

Quoted 18 lines · Min-Hua Chen

Include rockchip_drm_drv.h to fix the follow sparse warning:

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse:
warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

No functional change intended.

---
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 1 +

1 file changed, 1 insertion(+)
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +0 -0
index 18efb3fe1c00..c678d1b0fd7c 100644

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c line 18

Quoted 5 lines
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +1 -0
@@ -14,6 +14,7 @@
 #include <drm/drm_print.h>
 
 #include "rockchip_drm_vop2.h"
+#include "rockchip_drm_drv.h"
 

We already have a patch[0] include rockchip_drm_drv.h in rockchip_drm_vop2.h

[0]https://patchwork.kernel.org/project/linux-rockchip/patch/[email protected]/

Quoted 10 lines
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +0 -0
 static const uint32_t formats_cluster[] = {
 	DRM_FORMAT_XRGB2101010,
Signature · 7 lines
2.43.0


_______________________________________________
Linux-rockchip mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-rockchip
#2 lore raw

Hi,

Quoted 24 lines

Hi Min Hua,
Thanks for your work

Quoted 20 lines · Min-Hua Chen

Include rockchip_drm_drv.h to fix the follow sparse warning:

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse:
warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

No functional change intended.

---
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 1 +

1 file changed, 1 insertion(+)
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +0 -0
index 18efb3fe1c00..c678d1b0fd7c 100644
@@ -14,6 +14,7 @@
 #include <drm/drm_print.h>
 
Quoted 7 lines

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c line 18

Quoted 3 lines
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +1 -0
 #include "rockchip_drm_vop2.h"
+#include "rockchip_drm_drv.h"
 

We already have a patch[0] include rockchip_drm_drv.h in rockchip_drm_vop2.h

[0]https://patchwork.kernel.org/project/linux-rockchip/patch/[email protected]/

that's great, thanks for letting me know.

Min-Hua

#3 lore raw
In reply to Andy Yan
Quoted 21 lines · Andy Yan
Quoted 20 lines · Min-Hua Chen

Include rockchip_drm_drv.h to fix the follow sparse warning:

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse:
warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

No functional change intended.

---
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 1 +

1 file changed, 1 insertion(+)
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +0 -0
index 18efb3fe1c00..c678d1b0fd7c 100644
@@ -14,6 +14,7 @@
 #include <drm/drm_print.h>
 
Quoted 7 lines

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c line 18

Quoted 3 lines
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +1 -0
 #include "rockchip_drm_vop2.h"
+#include "rockchip_drm_drv.h"
 

We already have a patch[0] include rockchip_drm_drv.h in rockchip_drm_vop2.h

[0]https://patchwork.kernel.org/project/linux-rockchip/patch/[email protected]/

Maybe I'm missing something, but this patch seems to fix an already existing bug (which should have a Fixes tag?), which Andy also fixed while implementing a different (and unrelated) feature?

Cheers,
Diederik

maintainer
#4 lore raw

Hi,

Quoted 28 lines · Diederik de Haas
Quoted 27 lines · Andy Yan
Quoted 18 lines · Min-Hua Chen

Include rockchip_drm_drv.h to fix the follow sparse warning:

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse:
warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

No functional change intended.

---
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 1 +

1 file changed, 1 insertion(+)
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +0 -0
index 18efb3fe1c00..c678d1b0fd7c 100644

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c line 18

Quoted 5 lines
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +1 -0
@@ -14,6 +14,7 @@
 #include <drm/drm_print.h>
 
 #include "rockchip_drm_vop2.h"
+#include "rockchip_drm_drv.h"
 

We already have a patch[0] include rockchip_drm_drv.h in rockchip_drm_vop2.h

Quoted 6 lines
Quoted 1 line

[0]https://patchwork.kernel.org/project/linux-rockchip/patch/[email protected]/

Maybe I'm missing something, but this patch seems to fix an already existing bug (which should have a Fixes tag?), which Andy also fixed

while implementing a different (and unrelated) feature?

In fact, I don't know how to reproduce this compilation issue.
While implementing my feature, I happened to find that I need to include rockchip_drm_drv.h in rockchip_drm_vop2.h

Quoted 3 lines

Cheers,
Diederik

#5 lore raw

Hi,

Quoted 29 lines · Andy Yan
Quoted 28 lines · Diederik de Haas
Quoted 27 lines · Andy Yan
Quoted 18 lines · Min-Hua Chen

Include rockchip_drm_drv.h to fix the follow sparse warning:

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse:
warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

No functional change intended.

---
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c | 1 +

1 file changed, 1 insertion(+)
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +0 -0
index 18efb3fe1c00..c678d1b0fd7c 100644

drivers/gpu/drm/rockchip/rockchip_vop2_reg.c line 18

Quoted 5 lines
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c +1 -0
@@ -14,6 +14,7 @@
 #include <drm/drm_print.h>
 
 #include "rockchip_drm_vop2.h"
+#include "rockchip_drm_drv.h"
 

We already have a patch[0] include rockchip_drm_drv.h in rockchip_drm_vop2.h

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

[0]https://patchwork.kernel.org/project/linux-rockchip/patch/[email protected]/

Maybe I'm missing something, but this patch seems to fix an already existing bug (which should have a Fixes tag?), which Andy also fixed while implementing a different (and unrelated) feature?

In fact, I don't know how to reproduce this compilation issue.

FWIW: I didn't see it either, but I assumed I was missing the right context (i.e. patches) needed to trigger that warning.

Quoted 2 lines

While implementing my feature, I happened to find that I need to include rockchip_drm_drv.h in rockchip_drm_vop2.h

Makes perfect sense :)
But if the warning is indeed valid, it should be fixed on its own (IMO).

Cheers,
Diederik

#6 lore raw
Quoted 3 lines

FWIW: I didn't see it either, but I assumed I was missing the right context (i.e. patches) needed to trigger that warning.

FYI

I triggered the warning by the following step:

install 'sparse' first

git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
cd linux
ARCH=arm64 LLVM=1 make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' mrproper defconfig all -j8

cheers,
Min-Hua

Quoted 9 lines
Quoted 3 lines

While implementing my feature, I happened to find that I need to include rockchip_drm_drv.h in rockchip_drm_vop2.h

Makes perfect sense :)
But if the warning is indeed valid, it should be fixed on its own (IMO).

Cheers,
Diederik

#7 lore raw
Quoted 8 lines · Min-Hua Chen
Quoted 2 lines

FWIW: I didn't see it either, but I assumed I was missing the right context (i.e. patches) needed to trigger that warning.

I triggered the warning by the following step:

install 'sparse' first

ARCH=arm64 LLVM=1 make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' mrproper defconfig all -j8

This, especially the 'LLVM' part, is important context information and should be part of the commit message.

I had only just started when I saw a number of sparse warnings:

  DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-io.dtb
  OVL     arch/arm64/boot/dts/ti/k3-j721e-evm.dtb
  OVL     arch/arm64/boot/dts/ti/k3-j721s2-evm.dtb
  OVL     arch/arm64/boot/dts/ti/k3-am654-idk.dtb
  DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dtb
  DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-wifi.dtbo
  DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dtb
  DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6b-io.dtb
  DTC     arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dtb
  DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9.dtb

../init/main.c:192:12: sparse: warning: symbol 'envp_init' was not declared. Should it be static? ../init/main.c:290:16: sparse: warning: cast to restricted __le32 ../init/main.c:291:16: sparse: warning: cast to restricted __le32
CHECK ../init/do_mounts.c

And several followed, including in c-code files. So I stopped the build and assume you've identified a or several actual issues.

I've seen several commits where changes were made because LLVM flagged potentially problematic code, where GCC did not, so it's quite possible you're on to something here.

But it would be helpful if the commit message said what code was potentially problematic and why. And then the proper fix for that could indeed be to include rockchip_drm_drv.h.

Cheers,
Diederik

maintainer
#8 lore raw

Hi ,

Quoted 25 lines · Diederik de Haas
Quoted 8 lines · Min-Hua Chen
Quoted 2 lines

FWIW: I didn't see it either, but I assumed I was missing the right context (i.e. patches) needed to trigger that warning.

I triggered the warning by the following step:

install 'sparse' first

ARCH=arm64 LLVM=1 make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' mrproper defconfig all -j8

This, especially the 'LLVM' part, is important context information and should be part of the commit message.

I had only just started when I saw a number of sparse warnings:

 DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-io.dtb
 OVL     arch/arm64/boot/dts/ti/k3-j721e-evm.dtb
 OVL     arch/arm64/boot/dts/ti/k3-j721s2-evm.dtb
 OVL     arch/arm64/boot/dts/ti/k3-am654-idk.dtb
 DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dtb
 DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-wifi.dtbo
 DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dtb
 DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6b-io.dtb
 DTC     arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dtb
 DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9.dtb
Quoted 6 lines

../init/main.c:192:12: sparse: warning: symbol 'envp_init' was not declared. Should it be static? ../init/main.c:290:16: sparse: warning: cast to restricted __le32 ../init/main.c:291:16: sparse: warning: cast to restricted __le32
CHECK ../init/do_mounts.c

I can see same warnings, a lots of。
And also see the warning in vop2:
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse: warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

Min Hua,If you are agree,I will split it from my patch, and add a Fix tag ,and also add a SoB of you, Then resend in My V3 series,this will make my patch series easier。

Quoted 13 lines

And several followed, including in c-code files. So I stopped the build and assume you've identified a or several actual issues.

I've seen several commits where changes were made because LLVM flagged potentially problematic code, where GCC did not, so it's quite possible you're on to something here.

But it would be helpful if the commit message said what code was potentially problematic and why. And then the proper fix for that could indeed be to include rockchip_drm_drv.h.

Cheers,
Diederik

#9 lore raw
Quoted 14 lines
Quoted 6 lines
 DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-kb.dtb
 DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6a-wifi.dtbo
 DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3-lte.dtb
 DTC     arch/arm64/boot/dts/rockchip/rk3588-edgeble-neu6b-io.dtb
 DTC     arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dtb
 DTC     arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r9.dtb
Quoted 6 lines

../init/main.c:192:12: sparse: warning: symbol 'envp_init' was not declared. Should it be static? ../init/main.c:290:16: sparse: warning: cast to restricted __le32 ../init/main.c:291:16: sparse: warning: cast to restricted __le32
CHECK ../init/do_mounts.c

Quoted 7 lines

I can see same warnings, a lots of。
And also see the warning in vop2:
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:502:24: sparse: warning: symbol 'vop2_platform_driver' was not declared. Should it be static?

Min Hua,If you are agree,I will split it from my patch, and add a Fix tag ,and also add a SoB of you, Then resend in My V3 series,this will make my patch series easier。

It looks good to me. Thank you and Diederik for commenting.

cheers,
Min-Hua

Quoted 13 lines
Quoted 13 lines

And several followed, including in c-code files. So I stopped the build and assume you've identified a or several actual issues.

I've seen several commits where changes were made because LLVM flagged potentially problematic code, where GCC did not, so it's quite possible you're on to something here.

But it would be helpful if the commit message said what code was potentially problematic and why. And then the proper fix for that could indeed be to include rockchip_drm_drv.h.

Cheers,
Diederik