Re: [Intel-gfx] [PATCH 1/2] drm/i915/gvt: Fix missing static
On Thu, Apr 28, 2022 at 01:42:53PM -0700, Wang, Zhi A wrote: On 4/28/22 8:40 PM, De Marchi, Lucas wrote: 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. Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") Cc: Zhi Wang Cc: Christoph Hellwig Cc: Zhenyu Wang Signed-off-by: Lucas De Marchi --- 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. oh 20220427212849.18109-1-zhi.a.w...@intel.com, 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
Re: [Intel-gfx] [PATCH 1/2] drm/i915/gvt: Fix missing static
On 4/28/22 8:40 PM, De Marchi, Lucas wrote: > 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. > > Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") > Cc: Zhi Wang > Cc: Christoph Hellwig > Cc: Zhenyu Wang > Signed-off-by: Lucas De Marchi > --- > 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. > diff --git a/drivers/gpu/drm/i915/gvt/handlers.c > b/drivers/gpu/drm/i915/gvt/handlers.c > index cf00398c2870..e4358aa01048 100644 > --- a/drivers/gpu/drm/i915/gvt/handlers.c > +++ b/drivers/gpu/drm/i915/gvt/handlers.c > @@ -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; > } >
[Intel-gfx] [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. Fixes: e0f74ed4634d ("i915/gvt: Separate the MMIO tracking table from GVT-g") Cc: Zhi Wang Cc: Christoph Hellwig Cc: Zhenyu Wang Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/gvt/handlers.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index cf00398c2870..e4358aa01048 100644 --- a/drivers/gpu/drm/i915/gvt/handlers.c +++ b/drivers/gpu/drm/i915/gvt/handlers.c @@ -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; } -- 2.36.0