Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 00/30] [Set 13] Finally rid W=1 warnings from GPU
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. 0 out of 5000 left! LAST SET! You're all clean. Can you believe it!? Lee Jones (30): drm/amd/display/dc/dc_helper: Include our own header, containing prototypes drm/amd/include/renoir_ip_offset: Mark top-level IP_BASE as __maybe_unused drm/amd/display/dmub/src/dmub_dcn30: Include our own header containing prototypes drm/amd/display/modules/power/power_helpers: Staticify local functions drm/amd/display/modules/info_packet/info_packet: Correct kernel-doc formatting drm/amd/display/dc/core/dc_resource: Staticify local functions drm/amd/display/dc/core/dc_link: Remove unused variable 'status' drm/amd/display/dc/core/dc_link_dp: Staticify local function 'linkRateInKHzToLinkRateMultiplier' drm/amd/display/dc/dce112/dce112_resource: Include our own header file containing prototypes drm/amd/display/dc/core/dc: Staticise local function 'apply_ctx_interdependent_lock' drm/amd/display/dc/dce100/Makefile: Ignore -Woverride-init warning drm/amd/display/dc/dce100/dce100_resource: Include our own header containing prototypes drm/amd/display/dc/dce60/Makefile: Ignore -Woverride-init warning drm/amd/display/dc/dce80/Makefile: Ignore -Woverride-init warning drm/amd/display/dc/dce80/dce80_resource: Include our own header containing prototypes fixup! drm/amd/display/dc/dce60/Makefile: Ignore -Woverride-init warning drm/amd/display/dc/dce60/dce60_resource: Include our own header containing prototypes drm/amd/display/dc/core/dc_link: Move some local data from the stack to the heap drm/amd/display/dc/core/dc_link_dp: Mark 'result_write_min_hblank' as __maybe_unused drm/amd/display/dc/core/dc: Fix a bunch of documentation misdemeanours drm/amd/display/dc/core/dc_resource: Demote some kernel-doc abuses drm/amd/display/dc/core/dc_link: Fix a couple of function documentation issues drm/nouveau/nvkm/engine/gr/gf100: Demote non-conformant kernel-doc header drm/nouveau/nouveau_bo: Remove unused variables 'dev' drm/nouveau/nouveau_display: Remove set but unused variable 'width' drm/nouveau/dispnv04/crtc: Demote non-conforming kernel-doc headers drm/nouveau/dispnv50/disp: Remove unused variable 'ret' from function returning void drm/nouveau/dispnv50/headc57d: Make local function 'headc57d_olut' static drm/nouveau/nv50_display: Remove superfluous prototype for local static functions drm/nouveau/dispnv50/disp: Include header containing our prototypes drivers/gpu/drm/amd/display/dc/core/dc.c | 36 +++++++++---------- drivers/gpu/drm/amd/display/dc/core/dc_link.c | 31 ++++++++-------- .../gpu/drm/amd/display/dc/core/dc_link_dp.c | 4 +-- .../gpu/drm/amd/display/dc/core/dc_resource.c | 14 ++++---- drivers/gpu/drm/amd/display/dc/dc_helper.c | 1 + .../gpu/drm/amd/display/dc/dce100/Makefile | 2 ++ .../amd/display/dc/dce100/dce100_resource.c | 2 ++ .../amd/display/dc/dce112/dce112_resource.c | 4 ++- drivers/gpu/drm/amd/display/dc/dce60/Makefile | 2 ++ .../drm/amd/display/dc/dce60/dce60_resource.c | 2 ++ drivers/gpu/drm/amd/display/dc/dce80/Makefile | 2 ++ .../drm/amd/display/dc/dce80/dce80_resource.c | 2 ++ .../gpu/drm/amd/display/dmub/src/dmub_dcn30.c | 1 + .../display/modules/info_packet/info_packet.c | 13 +++---- .../amd/display/modules/power/power_helpers.c | 6 ++-- .../gpu/drm/amd/include/renoir_ip_offset.h | 2 +- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 +-- drivers/gpu/drm/nouveau/dispnv50/disp.c | 7 ++-- drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 2 +- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 --- drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++--- drivers/gpu/drm/nouveau/nv50_display.h | 3 -- .../gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- 23 files changed, 80 insertions(+), 74 deletions(-) Cc: Alex Deucher <alexander.deucher at amd.com> Cc: amd-gfx at lists.freedesktop.org Cc: Anthony Koo <Anthony.Koo at amd.com> Cc: Ben Skeggs <bskeggs at redhat.com> Cc: Bhawanpreet Lakha <Bhawanpreet.Lakha at amd.com> Cc: "Christian K?nig" <christian.koenig at amd.com> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: David Airlie <airlied at linux.ie> Cc: dri-devel at lists.freedesktop.org Cc: Harry Wentland <harry.wentland at amd.com> Cc: Jeremy Kolb <jkolb at brandeis.edu> Cc: Leo Li <sunpeng.li at amd.com> Cc: linaro-mm-sig at lists.linaro.org Cc: linux-media at vger.kernel.org Cc: Lyude Paul <lyude at redhat.com> Cc: Mauro Rossi <issor.oruam at gmail.com> Cc: Noah Abradjian <noah.abradjian at amd.com> Cc: nouveau at lists.freedesktop.org Cc: Rodrigo Siqueira <Rodrigo.Siqueira at amd.com> Cc: Sumit Semwal <sumit.semwal at linaro.org> -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 23/30] drm/nouveau/nvkm/engine/gr/gf100: Demote non-conformant kernel-doc header
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:992: warning: Function parameter or member 'gr' not described in 'gf100_gr_wait_idle' Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c index 749f73fc45a84..33541b4c01114 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c @@ -982,7 +982,7 @@ gf100_gr_zbc_init(struct gf100_gr *gr) } } -/** +/* * Wait until GR goes idle. GR is considered idle if it is disabled by the * MC (0x200) register, or GR is not busy and a context switch is not in * progress. -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 24/30] drm/nouveau/nouveau_bo: Remove unused variables 'dev'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nouveau_bo.c: In function ?nouveau_ttm_tt_populate?: drivers/gpu/drm/nouveau/nouveau_bo.c:1228:17: warning: variable ?dev? set but not used [-Wunused-but-set-variable] drivers/gpu/drm/nouveau/nouveau_bo.c: In function ?nouveau_ttm_tt_unpopulate?: drivers/gpu/drm/nouveau/nouveau_bo.c:1252:17: warning: variable ?dev? set but not used [-Wunused-but-set-variable] Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: Sumit Semwal <sumit.semwal at linaro.org> Cc: "Christian K?nig" <christian.koenig at amd.com> Cc: Jeremy Kolb <jkolb at brandeis.edu> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Cc: linux-media at vger.kernel.org Cc: linaro-mm-sig at lists.linaro.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/nouveau_bo.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index c85b1af06b7bf..1e8d5e1cb18f3 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c @@ -1225,7 +1225,6 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev, { struct ttm_tt *ttm_dma = (void *)ttm; struct nouveau_drm *drm; - struct device *dev; bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); if (ttm_tt_is_populated(ttm)) @@ -1239,7 +1238,6 @@ nouveau_ttm_tt_populate(struct ttm_bo_device *bdev, } drm = nouveau_bdev(bdev); - dev = drm->dev->dev; return ttm_pool_alloc(&drm->ttm.bdev.pool, ttm, ctx); } @@ -1249,14 +1247,12 @@ nouveau_ttm_tt_unpopulate(struct ttm_bo_device *bdev, struct ttm_tt *ttm) { struct nouveau_drm *drm; - struct device *dev; bool slave = !!(ttm->page_flags & TTM_PAGE_FLAG_SG); if (slave) return; drm = nouveau_bdev(bdev); - dev = drm->dev->dev; return ttm_pool_free(&drm->ttm.bdev.pool, ttm); } -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 25/30] drm/nouveau/nouveau_display: Remove set but unused variable 'width'
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nouveau_display.c: In function ?nouveau_framebuffer_new?: drivers/gpu/drm/nouveau/nouveau_display.c:309:15: warning: variable ?width? set but not used [-Wunused-but-set-variable] Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/nouveau_display.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index bceb48a2dfca6..b76bba4ca0856 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -306,7 +306,7 @@ nouveau_framebuffer_new(struct drm_device *dev, struct nouveau_bo *nvbo = nouveau_gem_object(gem); struct drm_framebuffer *fb; const struct drm_format_info *info; - unsigned int width, height, i; + unsigned int height, i; uint32_t tile_mode; uint8_t kind; int ret; @@ -346,9 +346,9 @@ nouveau_framebuffer_new(struct drm_device *dev, info = drm_get_format_info(dev, mode_cmd); for (i = 0; i < info->num_planes; i++) { - width = drm_format_info_plane_width(info, - mode_cmd->width, - i); + drm_format_info_plane_width(info, + mode_cmd->width, + i); height = drm_format_info_plane_height(info, mode_cmd->height, i); -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 26/30] drm/nouveau/dispnv04/crtc: Demote non-conforming kernel-doc headers
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/dispnv04/crtc.c:462: warning: Function parameter or member 'crtc' not described in 'nv_crtc_mode_set_regs' drivers/gpu/drm/nouveau/dispnv04/crtc.c:462: warning: Function parameter or member 'mode' not described in 'nv_crtc_mode_set_regs' drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or member 'crtc' not described in 'nv_crtc_mode_set' drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or member 'mode' not described in 'nv_crtc_mode_set' drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or member 'adjusted_mode' not described in 'nv_crtc_mode_set' drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or member 'x' not described in 'nv_crtc_mode_set' drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or member 'y' not described in 'nv_crtc_mode_set' drivers/gpu/drm/nouveau/dispnv04/crtc.c:640: warning: Function parameter or member 'old_fb' not described in 'nv_crtc_mode_set' Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/dispnv04/crtc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c index f9e962fd94d0d..f9a276ea5a9e0 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c @@ -449,7 +449,7 @@ nv_crtc_mode_set_vga(struct drm_crtc *crtc, struct drm_display_mode *mode) regp->Attribute[NV_CIO_AR_CSEL_INDEX] = 0x00; } -/** +/* * Sets up registers for the given mode/adjusted_mode pair. * * The clocks, CRTCs and outputs attached to this CRTC must be off. @@ -625,7 +625,7 @@ nv_crtc_swap_fbs(struct drm_crtc *crtc, struct drm_framebuffer *old_fb) return ret; } -/** +/* * Sets up registers for the given mode/adjusted_mode pair. * * The clocks, CRTCs and outputs attached to this CRTC must be off. -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 27/30] drm/nouveau/dispnv50/disp: Remove unused variable 'ret' from function returning void
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ?nv50_mstm_cleanup?: drivers/gpu/drm/nouveau/dispnv50/disp.c:1357:6: warning: variable ?ret? set but not used [-Wunused-but-set-variable] Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index b615204c2cba6..809a9b20a6899 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -1354,12 +1354,11 @@ nv50_mstm_cleanup(struct nv50_mstm *mstm) { struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); struct drm_encoder *encoder; - int ret; NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); - ret = drm_dp_check_act_status(&mstm->mgr); + drm_dp_check_act_status(&mstm->mgr); - ret = drm_dp_update_payload_part2(&mstm->mgr); + drm_dp_update_payload_part2(&mstm->mgr); drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { if (encoder->encoder_type == DRM_MODE_ENCODER_DPMST) { -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 28/30] drm/nouveau/dispnv50/headc57d: Make local function 'headc57d_olut' static
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/dispnv50/headc57d.c:173:1: warning: no previous prototype for ?headc57d_olut? [-Wmissing-prototypes] Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: Lyude Paul <lyude at redhat.com> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/dispnv50/headc57d.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c index fd51527b56b83..bdcfd240d61c8 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/headc57d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/headc57d.c @@ -169,7 +169,7 @@ headc57d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem) writew(readw(mem - 4), mem + 4); } -bool +static bool headc57d_olut(struct nv50_head *head, struct nv50_head_atom *asyh, int size) { if (size != 0 && size != 256 && size != 1024) -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 29/30] drm/nouveau/nv50_display: Remove superfluous prototype for local static functions
Fixes the following build error: drivers/gpu/drm/nouveau/dispnv50/disp.c:2530:1: error: conflicting types for ?nv50_display_fini? In file included from drivers/gpu/drm/nouveau/dispnv50/disp.c:71: drivers/gpu/drm/nouveau/nv50_display.h:36:6: note: previous declaration of ?nv50_display_fini? was her In file included from drivers/gpu/drm/nouveau/dispnv50/disp.c:71: drivers/gpu/drm/nouveau/nv50_display.h:35:6: note: previous declaration of ?nv50_display_init? was here drivers/gpu/drm/nouveau/dispnv50/disp.c:2581:1: error: static declaration of ?nv50_display_destroy? follows non-static declaration In file included from drivers/gpu/drm/nouveau/dispnv50/disp.c:71: drivers/gpu/drm/nouveau/nv50_display.h:34:6: note: previous declaration of ?nv50_display_destroy? was here Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/nv50_display.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nv50_display.h b/drivers/gpu/drm/nouveau/nv50_display.h index fbd3b15583bc8..2421401d12636 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.h +++ b/drivers/gpu/drm/nouveau/nv50_display.h @@ -31,7 +31,4 @@ #include "nouveau_reg.h" int nv50_display_create(struct drm_device *); -void nv50_display_destroy(struct drm_device *); -int nv50_display_init(struct drm_device *); -void nv50_display_fini(struct drm_device *); #endif /* __NV50_DISPLAY_H__ */ -- 2.25.1
Lee Jones
2021-Jan-13 08:07 UTC
[Nouveau] [PATCH 30/30] drm/nouveau/dispnv50/disp: Include header containing our prototypes
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/dispnv50/disp.c:2599:1: warning: no previous prototype for ?nv50_display_create? [-Wmissing-prototypes] Cc: Ben Skeggs <bskeggs at redhat.com> Cc: David Airlie <airlied at linux.ie> Cc: Daniel Vetter <daniel at ffwll.ch> Cc: dri-devel at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Signed-off-by: Lee Jones <lee.jones at linaro.org> --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 809a9b20a6899..d82965893b6bc 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -68,6 +68,8 @@ #include <subdev/bios/dp.h> +#include "nv50_display.h" + /****************************************************************************** * EVO channel *****************************************************************************/ -- 2.25.1
Lee Jones
2021-Jan-14 10:33 UTC
[Nouveau] [PATCH 00/30] [Set 13] Finally rid W=1 warnings from GPU
On Wed, 13 Jan 2021, Lee Jones wrote:> This set is part of a larger effort attempting to clean-up W=1 > kernel builds, which are currently overwhelmingly riddled with > niggly little warnings. > > 0 out of 5000 left! > > LAST SET! You're all clean. Can you believe it!?Ah, fair warning for you: we're not yet done. Arm is clean. There are still fix-ups required for x86 and PPC. I'll get right on it. -- Lee Jones [???] Senior Technical Lead - Developer Services Linaro.org ? Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog