mbox series

[00/40,Set,7] Rid W=1 warnings from GPU

Message ID 20201113134938.4004947-1-lee.jones@linaro.org
Headers show
Series Rid W=1 warnings from GPU | expand

Message

Lee Jones Nov. 13, 2020, 1:48 p.m. UTC
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.

This brings the running total from 5000 (in v5.9) down to 1400!

Hopefully not too much more to go now.

Lee Jones (40):
  drm/amd/include/vega10_ip_offset: Mark _BASE structs as __maybe_unused
  drm/amd/display/dc/core/dc_link_dp: Move
    DP_VGA_LVDS_CONVERTER_ID_{2,3} to where they're used
  drm/amd/display/dc/core/dc_link_ddc: Move DP_DVI_CONVERTER_ID_{4,5} to
    where they're used
  drm/amd/amdgpu/amdgpu_drv: Move 'amdgpu_info_ioctl()'s prototype to
    shared header
  drm/amd/amdgpu/amdgpu_ring: Fix misnaming of param 'max_dw'
  drm/msm/adreno/a6xx_gpu: Staticise local function 'a6xx_idle'
  drm/mediatek/mtk_disp_rdma: Fix formatting and supply missing struct
    member description
  drm/amd/amdgpu/amdgpu_ib: Fix some incorrect/incomplete function
    documentation
  drm/mediatek/mtk_drm_crtc: Demote seriously out-of-date struct header
  drm/mediatek/mtk_drm_drv: Staticise local function invoked by
    reference
  drm/amd/amdgpu/amdgpu_pll: Fix kernel-doc formatting, missing and
    extra params
  drm/pl111/pl111_display: Make local function static
  drm/panel/panel-tpo-tpg110: Correct misnaming and supply missing param
    description
  drm/meson/meson_venc: Make local function
    'meson_venc_hdmi_get_dmt_vmode' static
  drm/lima/lima_drv: Demote kernel-doc formatting abuse
  drm/amd/amdgpu/amdgpu_sync: Fix misnamed, missing and extra param
    descriptions
  drm/meson/meson_vclk: Make two local functions static
  drm/mediatek/mtk_dpi: Remove unused struct definition
    'mtk_dpi_encoder_funcs'
  drm/amd/amdgpu/amdgpu_vram_mgr: Add missing descriptions for 'dev' and
    'dir'
  drm/pl111/pl111_debugfs: Make local function 'pl111_debugfs_regs()'
    static
  drm/amd/amdgpu/amdgpu_virt: Make local function
    'amdgpu_virt_update_vf2pf_work_item()' static
  drm/amd/amdgpu/amdgpu_sched: Consume our own header containing
    prototypes
  drm/lima/lima_sched: Remove unused and unnecessary variable 'ret'
  drm/amd/amdgpu/amdgpu_ids: Supply missing docs for 'id' and 'vmhub'
  drm/amd/amdgpu/amdgpu_debugfs: Demote obvious abuse of kernel-doc
    formatting
  drm/amd/amdgpu/amdgpu_gmc: Demote one and fix another function header
  drm/amd/amdgpu/amdgpu_ras: Remove unused function
    'amdgpu_ras_error_cure'
  drm/amd/amdgpu/amdgpu_ras: Make local function
    'amdgpu_ras_error_status_query' static
  drm/amd/amdgpu/amdgpu_csa: Remove set but unused variable 'r'
  drm/amd/amdgpu/amdgpu_vm_cpu: Fix 'amdgpu_vm_cpu_prepare()'s doc-rot
  drm/amd/amdgpu/amdgpu_vm_sdma: Fix 'amdgpu_vm_sdma_prepare()'s doc-rot
  drm/msm/disp/mdp5/mdp5_crtc: Make local function
    'mdp5_crtc_setup_pipeline()' static
  drm/drm_dp_mst_topology: Remove set but never used variable 'len'
  drm/msm/disp/mdp5/mdp5_ctl: Demote non-conformant kernel-doc headers
  drm/msm/disp/mdp5/mdp5_kms: Make local functions 'mdp5_{en,dis}able()'
    static
  drm/amd/amdgpu/amdgpu_fw_attestation: Consume our own header
    containing prototypes
  drm/amd/amdgpu/smu_v11_0_i2c: Provide descriptions for 'control' and
    'data' params
  drm/msm/disp/dpu1/dpu_core_perf: Remove set but unused variable
    'dpu_cstate'
  drm/msm/disp/dpu1/dpu_encoder: Remove a bunch of unused variables
  drm/amd/amdgpu/gfx_v7_0: Remove unused struct definition

 drivers/gpu/drm/amd/amdgpu/amdgpu_csa.c       |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  4 +-
 .../drm/amd/amdgpu/amdgpu_fw_attestation.c    |  3 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c       |  5 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c        |  6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c       |  2 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |  1 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h       | 31 ++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c       | 10 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       | 11 +--
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sched.c     |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c      |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c      |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c    |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c   |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c  |  2 +
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c         |  9 ---
 drivers/gpu/drm/amd/amdgpu/gfx_v7_0.h         |  1 -
 drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c    |  3 +
 .../gpu/drm/amd/display/dc/core/dc_link_ddc.c |  4 +
 .../gpu/drm/amd/display/dc/core/dc_link_dp.c  |  5 ++
 .../amd/display/include/ddc_service_types.h   |  8 --
 .../gpu/drm/amd/include/vega10_ip_offset.h    | 76 +++++++++----------
 drivers/gpu/drm/drm_dp_mst_topology.c         |  4 +-
 drivers/gpu/drm/lima/lima_drv.c               |  2 +-
 drivers/gpu/drm/lima/lima_sched.c             |  3 +-
 drivers/gpu/drm/mediatek/mtk_disp_rdma.c      |  5 +-
 drivers/gpu/drm/mediatek/mtk_dpi.c            |  9 ---
 drivers/gpu/drm/mediatek/mtk_drm_crtc.c       |  4 +-
 drivers/gpu/drm/mediatek/mtk_drm_drv.c        |  4 +-
 drivers/gpu/drm/meson/meson_vclk.c            |  8 +-
 drivers/gpu/drm/meson/meson_venc.c            |  4 +-
 drivers/gpu/drm/msm/adreno/a6xx_gpu.c         |  2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c |  3 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c   | 12 +--
 drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c     |  6 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c      |  6 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c      |  4 +-
 drivers/gpu/drm/panel/panel-tpo-tpg110.c      |  3 +-
 drivers/gpu/drm/pl111/pl111_debugfs.c         |  2 +-
 drivers/gpu/drm/pl111/pl111_display.c         |  2 +-
 43 files changed, 147 insertions(+), 142 deletions(-)
 create mode 100644 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.h

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Cc: Andres Rodriguez <andresx7@gmail.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Chun-Kuang Hu <chunkuang.hu@kernel.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: dri-devel@lists.freedesktop.org
Cc: Eric Anholt <eric@anholt.net>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Cc: freedreno@lists.freedesktop.org
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Jie Qiu <jie.qiu@mediatek.com>
Cc: John Clements <john.clements@amd.com>
Cc: Kalyan Thota <kalyan_t@codeaurora.org>
Cc: Kevin Hilman <khilman@baylibre.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: lima@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-amlogic@lists.infradead.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org
Cc: linux-mediatek@lists.infradead.org
Cc: linux-media@vger.kernel.org
Cc: Luben Tuikov <luben.tuikov@amd.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Monk.liu@amd.com
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Qiang Yu <yuq825@gmail.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Sean Paul <sean@poorly.run>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: YT SHEN <yt.shen@mediatek.com>
-- 
2.25.1

Comments

Jordan Crouse Nov. 13, 2020, 3:30 p.m. UTC | #1
On Fri, Nov 13, 2020 at 01:49:04PM +0000, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):

> 

>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c:33:6: warning: no previous prototype for ‘a6xx_idle’ [-Wmissing-prototypes]

> 

> Cc: Rob Clark <robdclark@gmail.com>

> Cc: Sean Paul <sean@poorly.run>

> Cc: David Airlie <airlied@linux.ie>

> Cc: Daniel Vetter <daniel@ffwll.ch>

> Cc: linux-arm-msm@vger.kernel.org

> Cc: dri-devel@lists.freedesktop.org

> Cc: freedreno@lists.freedesktop.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>


Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>

> ---

>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c

> index fcb0aabbc9852..03c2f7e0c9497 100644

> --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c

> +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c

> @@ -30,7 +30,7 @@ static inline bool _a6xx_check_idle(struct msm_gpu *gpu)

>  		A6XX_RBBM_INT_0_MASK_RBBM_HANG_DETECT);

>  }

>  

> -bool a6xx_idle(struct msm_gpu *gpu, struct msm_ringbuffer *ring)

> +static bool a6xx_idle(struct msm_gpu *gpu, struct msm_ringbuffer *ring)

>  {

>  	/* wait for CP to drain ringbuffer: */

>  	if (!adreno_idle(gpu, ring))

> -- 

> 2.25.1

> 

> _______________________________________________

> Freedreno mailing list

> Freedreno@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/freedreno


-- 
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Abhinav Kumar Nov. 13, 2020, 7:45 p.m. UTC | #2
On 2020-11-13 05:49, Lee Jones wrote:
> Very little attempt has been made to document these functions.

> 

> Fixes the following W=1 kernel build warning(s):

> 

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function

> parameter or member 'ctl' not described in

> 'mdp5_ctl_set_encoder_state'

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function

> parameter or member 'pipeline' not described in

> 'mdp5_ctl_set_encoder_state'

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Function

> parameter or member 'enabled' not described in

> 'mdp5_ctl_set_encoder_state'

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:227: warning: Excess

> function parameter 'enable' description in

> 'mdp5_ctl_set_encoder_state'

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function

> parameter or member 'ctl' not described in 'mdp5_ctl_commit'

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function

> parameter or member 'pipeline' not described in 'mdp5_ctl_commit'

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function

> parameter or member 'flush_mask' not described in 'mdp5_ctl_commit'

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c:529: warning: Function

> parameter or member 'start' not described in 'mdp5_ctl_commit'

> 

> Cc: Rob Clark <robdclark@gmail.com>

> Cc: Sean Paul <sean@poorly.run>

> Cc: David Airlie <airlied@linux.ie>

> Cc: Daniel Vetter <daniel@ffwll.ch>

> Cc: linux-arm-msm@vger.kernel.org

> Cc: dri-devel@lists.freedesktop.org

> Cc: freedreno@lists.freedesktop.org

> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>

> ---

>  drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 6 +++---

>  1 file changed, 3 insertions(+), 3 deletions(-)

> 

> diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c

> b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c

> index 030279d7b64b7..b5c40f9773629 100644

> --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c

> +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c

> @@ -213,10 +213,10 @@ static void send_start_signal(struct mdp5_ctl 

> *ctl)

>  	spin_unlock_irqrestore(&ctl->hw_lock, flags);

>  }

> 

> -/**

> +/*

>   * mdp5_ctl_set_encoder_state() - set the encoder state

>   *

> - * @enable: true, when encoder is ready for data streaming; false, 

> otherwise.

> + * @enabled: true, when encoder is ready for data streaming; false, 

> otherwise.

>   *

>   * Note:

>   * This encoder state is needed to trigger START signal (data path 

> kickoff).

> @@ -507,7 +507,7 @@ static void fix_for_single_flush(struct mdp5_ctl

> *ctl, u32 *flush_mask,

>  	}

>  }

> 

> -/**

> +/*

>   * mdp5_ctl_commit() - Register Flush

>   *

>   * The flush register is used to indicate several registers are all