AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 3/9] amdgpu/dc: make some audio functions return void
Date: Fri, 29 Sep 2017 14:34:36 +1000	[thread overview]
Message-ID: <20170929043442.7984-3-airlied@gmail.com> (raw)
In-Reply-To: <20170929043442.7984-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

From: Dave Airlie <airlied@redhat.com>

There is no need to check for these pointers being valid
at this level. Check earlier if required.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/amd/display/dc/dce/dce_audio.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
index 198f453..6e94028 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_audio.c
@@ -703,14 +703,11 @@ void dce_aud_az_configure(
 */
 
 /* search pixel clock value for Azalia HDMI Audio */
-static bool get_azalia_clock_info_hdmi(
+static void get_azalia_clock_info_hdmi(
 	uint32_t crtc_pixel_clock_in_khz,
 	uint32_t actual_pixel_clock_in_khz,
 	struct azalia_clock_info *azalia_clock_info)
 {
-	if (azalia_clock_info == NULL)
-		return false;
-
 	/* audio_dto_phase= 24 * 10,000;
 	 *   24MHz in [100Hz] units */
 	azalia_clock_info->audio_dto_phase =
@@ -720,18 +717,13 @@ static bool get_azalia_clock_info_hdmi(
 	 *  [khz] -> [100Hz] */
 	azalia_clock_info->audio_dto_module =
 			actual_pixel_clock_in_khz * 10;
-
-	return true;
 }
 
-static bool get_azalia_clock_info_dp(
+static void get_azalia_clock_info_dp(
 	uint32_t requested_pixel_clock_in_khz,
 	const struct audio_pll_info *pll_info,
 	struct azalia_clock_info *azalia_clock_info)
 {
-	if (pll_info == NULL || azalia_clock_info == NULL)
-		return false;
-
 	/* Reported dpDtoSourceClockInkhz value for
 	 * DCE8 already adjusted for SS, do not need any
 	 * adjustment here anymore
@@ -745,8 +737,6 @@ static bool get_azalia_clock_info_dp(
 	 *  [khz] ->[100Hz] */
 	azalia_clock_info->audio_dto_module =
 		pll_info->dp_dto_source_clock_in_khz * 10;
-
-	return true;
 }
 
 void dce_aud_wall_dto_setup(
-- 
2.9.4

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

  parent reply	other threads:[~2017-09-29  4:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29  4:34 [PATCH 1/9] amdgpu/dc: make get_audio_clock_info return void Dave Airlie
     [not found] ` <20170929043442.7984-1-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-29  4:34   ` [PATCH 2/9] amdgpu/dc: make program_regamma_pwl " Dave Airlie
2017-09-29  4:34   ` Dave Airlie [this message]
2017-09-29  4:34   ` [PATCH 4/9] amdgpu/dc: remove pointless returns in the i2caux constructor paths Dave Airlie
2017-09-29  4:34   ` [PATCH 5/9] amdgpu/dc: cleanup construct returns in gpio Dave Airlie
2017-09-29  4:34   ` [PATCH 6/9] amdgpu/dc: another round of dce/dcn construct cleanups Dave Airlie
2017-09-29  4:34   ` [PATCH 7/9] amdgpu/dc: remove pointless return from build_pipe_hw_param Dave Airlie
2017-09-29  4:34   ` [PATCH 8/9] amdgpu: fixup construct to void paths on some more dc objects Dave Airlie
2017-09-29  4:34   ` [PATCH 9/9] amdgpu/dc: fix construct return values on irq service Dave Airlie
     [not found]     ` <20170929043442.7984-9-airlied-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-09-29 14:27       ` Harry Wentland

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=20170929043442.7984-3-airlied@gmail.com \
    --to=airlied-re5jqeeqqe8avxtiumwx3w@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