linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernard Zhao <bernard@vivo.com>
To: "Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Rodrigo Siqueira" <Rodrigo.Siqueira@amd.com>,
	"Jun Lei" <Jun.Lei@amd.com>, "Aric Cyr" <aric.cyr@amd.com>,
	"Wenjing Liu" <wenjing.liu@amd.com>,
	"abdoulaye berthe" <abdoulaye.berthe@amd.com>,
	"Michael Strauss" <michael.strauss@amd.com>,
	"Brandon Syu" <Brandon.Syu@amd.com>,
	"Martin Leung" <martin.leung@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: opensource.kernel@vivo.com, Bernard Zhao <bernard@vivo.com>
Subject: [PATCH] drm/amd/display: optimize code runtime a bit
Date: Mon, 21 Sep 2020 04:42:42 -0700	[thread overview]
Message-ID: <20200921114244.20506-1-bernard@vivo.com> (raw)

Static function dal_ddc_i2c_payloads_destroy is only called
in dal_ddc_service_query_ddc_data, the parameter is &payloads
, there is no point NULL risk, so no need to check.
This change is to make the code run a bit fast.

Signed-off-by: Bernard Zhao <bernard@vivo.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
index b984eecca58b..6dcc666738fc 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
@@ -150,9 +150,6 @@ static uint32_t dal_ddc_i2c_payloads_get_count(struct i2c_payloads *p)
 
 static void dal_ddc_i2c_payloads_destroy(struct i2c_payloads *p)
 {
-	if (!p)
-		return;
-
 	dal_vector_destruct(&p->payloads);
 }
 
-- 
2.28.0


             reply	other threads:[~2020-09-21 11:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-21 11:42 Bernard Zhao [this message]
2020-09-21 19:33 ` Alex Deucher
2020-09-22  0:57   ` Bernard
  -- strict thread matches above, loose matches on Subject: below --
2020-09-10  2:05 Bernard Zhao
2020-09-15 19:18 ` Alex Deucher

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=20200921114244.20506-1-bernard@vivo.com \
    --to=bernard@vivo.com \
    --cc=Brandon.Syu@amd.com \
    --cc=Jun.Lei@amd.com \
    --cc=Rodrigo.Siqueira@amd.com \
    --cc=abdoulaye.berthe@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aric.cyr@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.leung@amd.com \
    --cc=michael.strauss@amd.com \
    --cc=opensource.kernel@vivo.com \
    --cc=sunpeng.li@amd.com \
    --cc=wenjing.liu@amd.com \
    --subject='Re: [PATCH] drm/amd/display: optimize code runtime a bit' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).