All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Qingqing.Wang-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amdgpu: soc15 enable (v3)
Date: Mon, 3 Apr 2017 21:53:54 +0300	[thread overview]
Message-ID: <20170403185354.GA2885@mwanda> (raw)

Hello Ken Wang,

The patch 220ab9bd1ccf: "drm/amdgpu: soc15 enable (v3)" from Mar 6,
2017, leads to the following static checker warning:

	drivers/gpu/drm/amd/amdgpu/soc15.c:110 soc15_pcie_rreg()
	error: potentially dereferencing uninitialized 'nbio_pcie_id'.

drivers/gpu/drm/amd/amdgpu/soc15.c
   101  static u32 soc15_pcie_rreg(struct amdgpu_device *adev, u32 reg)
   102  {
   103          unsigned long flags, address, data;
   104          u32 r;
   105          struct nbio_pcie_index_data *nbio_pcie_id;
   106  
   107          if (adev->asic_type == CHIP_VEGA10)
   108                  nbio_pcie_id = &nbio_v6_1_pcie_index_data;

There should be an else statement to this probably?

   109  
   110          address = nbio_pcie_id->index_offset;
   111          data = nbio_pcie_id->data_offset;
   112  
   113          spin_lock_irqsave(&adev->pcie_idx_lock, flags);
   114          WREG32(address, reg);
   115          (void)RREG32(address);
   116          r = RREG32(data);
   117          spin_unlock_irqrestore(&adev->pcie_idx_lock, flags);
   118          return r;
   119  }
   120  

See also:

drivers/gpu/drm/amd/amdgpu/soc15.c:110 soc15_pcie_rreg() error: potentially dereferencing uninitialized 'nbio_pcie_id'.
drivers/gpu/drm/amd/amdgpu/soc15.c:129 soc15_pcie_wreg() error: potentially dereferencing uninitialized 'nbio_pcie_id'.
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1736 amdgpu_sriov_reinit_early() error: uninitialized symbol 'r'.
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3033 gfx_v9_0_ring_emit_hdp_flush() error:  potentially dereferencing uninitialized 'nbio_hf_reg'.
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3036 gfx_v9_0_ring_emit_hdp_flush() error: potentially dereferencing uninitialized 'nbio_hf_reg'.
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c:3043 gfx_v9_0_ring_emit_hdp_flush() error: potentially dereferencing uninitialized 'nbio_hf_reg'.
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:357 sdma_v4_0_ring_emit_hdp_flush() error: potentially dereferencing uninitialized 'nbio_hf_reg'.
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c:359 sdma_v4_0_ring_emit_hdp_flush() error: potentially dereferencing uninitialized 'nbio_hf_reg'.
drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/vega10_smumgr.c:425 vega10_smu_init() error: uninitialized symbol 'handle'.
drivers/gpu/drm/amd/amdgpu/../powerplay/hwmgr/vega10_hwmgr.c:2860 vega10_apply_state_adjust_rules() error: uninitialized symbol 'stable_pstate_sclk_dpm_percentage'.

regards,
dan carpenter
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2017-04-03 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 18:53 Dan Carpenter [this message]
2017-04-03 19:12 ` [bug report] drm/amdgpu: soc15 enable (v3) Alex Deucher
     [not found]   ` <CADnq5_OUXQUFG7kvg_FuLd+Pz0wy9q3gFEe68cm6C7ozpbaZzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-04-03 19:29     ` Dan Carpenter
2017-04-03 19:35       ` Dan Carpenter
2017-04-03 19:54         ` Deucher, Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170403185354.GA2885@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=Qingqing.Wang-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.