drm/i915/gvt: Fix missing static
PATCH 1/2 drm/i915/gvt: Fix missing static
Fix broken build:
$ make W=1 drivers/gpu/drm/i915/gvt/handlers.o ... CC [M] drivers/gpu/drm/i915/gvt/handlers.o drivers/gpu/drm/i915/gvt/handlers.c:75:6: error: no previous prototype for ‘intel_gvt_match_device’ [-Werror=missing-prototypes] 75 | bool intel_gvt_match_device(struct intel_gvt *gvt, | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errors
Commit e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") removed the prototype from the header due to the function being used only in this single compilation unit, but forgot to make it static.
--- drivers/gpu/drm/i915/gvt/handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gvt/handlers.c +2 -2
@@ -72,8 +72,8 @@ unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt)return 0 ; } -bool intel_gvt_match_device (struct intel_gvt *gvt, -unsigned long device) +static bool intel_gvt_match_device (struct intel_gvt *gvt, +unsigned long device) {return intel_gvt_get_device_type (gvt) & device; }
Signature · 1 line
2.36.0
PATCH 2/2 drm/i915/gvt: Fix wrong kernel doc
Fix function name when documenting it:
drivers/gpu/drm/i915/gvt/handlers.c:3066: warning: expecting prototype for intel_t_default_mmio_write(). Prototype was for intel_vgpu_default_mmio_write() instead
--- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/gvt/handlers.c +1 -1
@@ -3052,7 +3052,7 @@ int intel_vgpu_default_mmio_read(struct intel_vgpu *vgpu, unsigned int offset, }/** -* intel_t_default_mmio_write - default MMIO write handler +* intel_vgpu_default_mmio_write - default MMIO write handler * @vgpu: a vGPU * @offset: access offset * @p_data: write data buffer
Signature · 1 line
2.36.0
Quoted 14 lines · Lucas
Fix broken build:
$ make W=1 drivers/gpu/drm/i915/gvt/handlers.o ... CC [M] drivers/gpu/drm/i915/gvt/handlers.o drivers/gpu/drm/i915/gvt/handlers.c:75:6: error: no previous prototype for ‘intel_gvt_match_device’ [-Werror=missing-prototypes] 75 | bool intel_gvt_match_device(struct intel_gvt *gvt, | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errorsCommit
e0f74ed4634d("i915/gvt: Separate the MMIO tracking table from GVT-g") removed the prototype from the header due to the function being used only in this single compilation unit, but forgot to make it static.
Quoted 9 lines
Fixes e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g")Cc Zhi Wang <[email protected]>Cc Christoph Hellwig <[email protected]>Cc Zhenyu Wang <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gvt/handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Hi Lucas:
Thanks so much for the patch. There is a patch to fix undergoing already. I will take your second patch.
Quoted 16 lines
drivers/gpu/drm/i915/gvt/handlers.c +2
-2@@ -72,8 +72,8 @@ unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt)return 0 ; } -bool intel_gvt_match_device (struct intel_gvt *gvt, -unsigned long device) +static bool intel_gvt_match_device (struct intel_gvt *gvt, +unsigned long device) {return intel_gvt_get_device_type (gvt) & device; }
Quoted 24 lines · Zhi A
Quoted 14 lines · Lucas
Fix broken build:
$ make W=1 drivers/gpu/drm/i915/gvt/handlers.o ... CC [M] drivers/gpu/drm/i915/gvt/handlers.o drivers/gpu/drm/i915/gvt/handlers.c:75:6: error: no previous prototype for ‘intel_gvt_match_device’ [-Werror=missing-prototypes] 75 | bool intel_gvt_match_device(struct intel_gvt *gvt, | ^~~~~~~~~~~~~~~~~~~~~~ cc1: all warnings being treated as errorsCommit
e0f74ed4634d("i915/gvt: Separate the MMIO tracking table from GVT-g") removed the prototype from the header due to the function being used only in this single compilation unit, but forgot to make it static.Quoted 9 lines
Fixes e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g")Cc Zhi Wang <[email protected]>Cc Christoph Hellwig <[email protected]>Cc Zhenyu Wang <[email protected]>Signed-off-by Lucas De Marchi <[email protected]>--- drivers/gpu/drm/i915/gvt/handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 4 lines
Hi Lucas:
Thanks so much for the patch. There is a patch to fix undergoing already. I will take your second patch.
oh [email protected], I missed that.
Do you mind adding the Fixes tag in that one to avoid it going to a kernel release without that?
thanks
Lucas De Marchi
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/gvt: Fix missing static
In reply to Lucas De Marchi== Series Details ==
== Series Details ==
Series: series starting with [1/2] drm/i915/gvt: Fix missing static
URL : https://patchwork.freedesktop.org/series/103293/
State : failure
== Summary ==
Error: make failed
CALL scripts/checksyscalls.sh
CALL scripts/atomic/check-atomics.sh
DESCEND objtool
CHK include/generated/compile.h
CC [M] drivers/gpu/drm/i915/gvt/handlers.odrivers/gpu/drm/i915/gvt/handlers.c:75:13: error: static declaration of ‘intel_gvt_match_device’ follows non-static declaration
static bool intel_gvt_match_device(struct intel_gvt *gvt,
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/gvt/gvt.h:42,
from drivers/gpu/drm/i915/gvt/handlers.c:41:
drivers/gpu/drm/i915/gvt/mmio.h:75:6: note: previous declaration of ‘intel_gvt_match_device’ was here
bool intel_gvt_match_device(struct intel_gvt *gvt, unsigned long device);
^~~~~~~~~~~~~~~~~~~~~~scripts/Makefile.build:288: recipe for target 'drivers/gpu/drm/i915/gvt/handlers.o' failed make[4]: *** [drivers/gpu/drm/i915/gvt/handlers.o] Error 1 scripts/Makefile.build:550: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:550: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:550: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1834: recipe for target 'drivers' failed
make: *** [drivers] Error 2
Re: [Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/2] drm/i915/gvt: Fix missing static
Quoted 16 lines · Patchwork
== Series Details ==
Series: series starting with [1/2] drm/i915/gvt: Fix missing static
URL : https://patchwork.freedesktop.org/series/103293/
State : failure== Summary ==
Error: make failed
CALLscripts/checksyscalls.sh
CALLscripts/atomic/check-atomics.sh
DESCEND objtool
CHKinclude/generated/compile.h
CC [M]drivers/gpu/drm/i915/gvt/handlers.odrivers/gpu/drm/i915/gvt/handlers.c:75:13: error: static declaration of ‘intel_gvt_match_device’ follows non-static declaration static bool intel_gvt_match_device(structintel_gvt*gvt,
Quoted 6 lines
^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/i915/gvt/gvt.h:42,
from drivers/gpu/drm/i915/gvt/handlers.c:41:
drivers/gpu/drm/i915/gvt/mmio.h:75:6: note: previous declaration of ‘intel_gvt_match_device’ was here
bool intel_gvt_match_device(struct intel_gvt *gvt, unsigned long device);
^~~~~~~~~~~~~~~~~~~~~~it looks like CI tried to apply this to the wrong rev. It's probably trying to apply it to the last one that it knows is buildable... which means it never validates if something fixes the build?
I think it would be better to try applying to the latest drm-tip, and fallback to latest known-buildable iff it fails.
Lucas De Marchi
Quoted 12 lines
scripts/Makefile.build:288: recipe for target 'drivers/gpu/drm/i915/gvt/handlers.o' failed make[4]: *** [drivers/gpu/drm/i915/gvt/handlers.o] Error 1scripts/Makefile.build:550: recipe for target 'drivers/gpu/drm/i915' failed make[3]: *** [drivers/gpu/drm/i915] Error 2scripts/Makefile.build:550: recipe for target 'drivers/gpu/drm' failed make[2]: *** [drivers/gpu/drm] Error 2scripts/Makefile.build:550: recipe for target 'drivers/gpu' failed
make[1]: *** [drivers/gpu] Error 2
Makefile:1834: recipe for target 'drivers' failed
make: *** [drivers] Error 2