AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: Samson.Tam-5C7GfCeVMHo@public.gmane.org
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [bug report] drm/amd/display: Link train only when link is DP and backend is enabled
Date: Mon, 25 Mar 2019 11:14:17 +0300	[thread overview]
Message-ID: <20190325081417.GA4320@kadam> (raw)

Hello Samson Tam,

This is a semi-automatic email about new static checker warnings.

The patch 66acd4418d7d: "drm/amd/display: Link train only when link
is DP and backend is enabled" from Mar 4, 2019, leads to the
following Smatch complaint:

    drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:553 dc_link_set_preferred_link_settings()
    warn: variable dereferenced before check 'link_stream' (see line 550)

drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c
   540                  }
   541          }
   542  
   543          /* Stream not found */
   544          if (i == MAX_PIPES)
   545                  return;
   546  
   547          link_stream = link->dc->current_state->res_ctx.pipe_ctx[i].stream;
   548  
   549		/* Cannot retrain link if backend is off */
   550		if (link_stream->dpms_off)
                    ^^^^^^^^^^^^^^^^^^^^^
New check

   551			return;
   552	
   553		if (link_stream)
                    ^^^^^^^^^^^
The old code used to check for NULL
   554			decide_link_settings(link_stream, &store_settings);
   555	

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

                 reply	other threads:[~2019-03-25  8:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20190325081417.GA4320@kadam \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=Samson.Tam-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox