lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230327233353.64081-9-caionovais@usp.br>
Date:   Mon, 27 Mar 2023 20:33:49 -0300
From:   Caio Novais <caionovais@....br>
To:     amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Cc:     Alex Deucher <alexander.deucher@....com>,
        Christian König <christian.koenig@....com>,
        "Pan, Xinhui" <Xinhui.Pan@....com>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Harry Wentland <harry.wentland@....com>,
        Leo Li <sunpeng.li@....com>,
        Rodrigo Siqueira <Rodrigo.Siqueira@....com>,
        Jack Xiao <Jack.Xiao@....com>,
        Hawking Zhang <Hawking.Zhang@....com>, Le Ma <le.ma@....com>,
        Mario Limonciello <mario.limonciello@....com>,
        Yifan Zhang <yifan1.zhang@....com>,
        Mukul Joshi <mukul.joshi@....com>, Jun Lei <Jun.Lei@....com>,
        Wenjing Liu <wenjing.liu@....com>,
        Alan Liu <HaoPing.Liu@....com>,
        Caio Novais <caionovais@....br>,
        Joshua Ashton <joshua@...ggi.es>,
        Guo Zhengkui <guozhengkui@...o.com>,
        Nicholas Kazlauskas <Nicholas.Kazlauskas@....com>,
        Zhan Liu <zhan.liu@....com>, Wayne Lin <wayne.lin@....com>,
        Charlene Liu <Charlene.Liu@....com>,
        Martin Leung <Martin.Leung@....com>,
        Tom Chung <chiahsuan.chung@....com>,
        Alvin Lee <alvin.lee2@....com>,
        George Shen <George.Shen@....com>,
        Qingqing Zhuo <qingqing.zhuo@....com>,
        Roman Li <Roman.Li@....com>,
        Wesley Chalmers <Wesley.Chalmers@....com>,
        Aurabindo Pillai <aurabindo.pillai@....com>,
        Jingwen Zhu <Jingwen.Zhu@....com>,
        Melissa Wen <mwen@...lia.com>,
        Felipe Clark <felipe.clark@....com>,
        Sung Joon Kim <sungjoon.kim@....com>,
        Dillon Varone <Dillon.Varone@....com>,
        Ethan Wellenreiter <Ethan.Wellenreiter@....com>,
        Taimur Hassan <Syed.Hassan@....com>,
        Maíra Canal <mairacanal@...eup.net>,
        Brian Chang <Brian.Chang@....com>,
        Gabe Teeger <gabe.teeger@....com>,
        André Almeida <andrealmeid@...lia.com>,
        Chaitanya Dhere <chaitanya.dhere@....com>,
        Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
        Ryan Lin <tsung-hua.lin@....com>,
        Hamza Mahfooz <hamza.mahfooz@....com>
Subject: [PATCH 08/12] drm/amd/display: Remove two unused variables 'speakers' and 'channels' and remove unused function 'speakers_to_channels'

Compiling AMD GPU drivers displays two warnings:

drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c: In function ‘apg31_se_audio_setup’:
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:117:18: warning: variable ‘channels’ set but not used [-Wunused-but-set-variable]
and
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:116:18: warning: variable ‘speakers’ set but not used [-Wunused-but-set-variable]

Get rid of them by removing the variables and the function
"speakers_to_channels".

Signed-off-by: Caio Novais <caionovais@....br>
---
 .../gpu/drm/amd/display/dc/dcn31/dcn31_apg.c  | 39 -------------------
 1 file changed, 39 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c
index 24e9ff65434d..e94d0ba915ce 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_apg.c
@@ -72,40 +72,6 @@ static void apg31_disable(
 	REG_UPDATE(APG_CONTROL2, APG_ENABLE, 0);
 }
 
-static union audio_cea_channels speakers_to_channels(
-	struct audio_speaker_flags speaker_flags)
-{
-	union audio_cea_channels cea_channels = {0};
-
-	/* these are one to one */
-	cea_channels.channels.FL = speaker_flags.FL_FR;
-	cea_channels.channels.FR = speaker_flags.FL_FR;
-	cea_channels.channels.LFE = speaker_flags.LFE;
-	cea_channels.channels.FC = speaker_flags.FC;
-
-	/* if Rear Left and Right exist move RC speaker to channel 7
-	 * otherwise to channel 5
-	 */
-	if (speaker_flags.RL_RR) {
-		cea_channels.channels.RL_RC = speaker_flags.RL_RR;
-		cea_channels.channels.RR = speaker_flags.RL_RR;
-		cea_channels.channels.RC_RLC_FLC = speaker_flags.RC;
-	} else {
-		cea_channels.channels.RL_RC = speaker_flags.RC;
-	}
-
-	/* FRONT Left Right Center and REAR Left Right Center are exclusive */
-	if (speaker_flags.FLC_FRC) {
-		cea_channels.channels.RC_RLC_FLC = speaker_flags.FLC_FRC;
-		cea_channels.channels.RRC_FRC = speaker_flags.FLC_FRC;
-	} else {
-		cea_channels.channels.RC_RLC_FLC = speaker_flags.RLC_RRC;
-		cea_channels.channels.RRC_FRC = speaker_flags.RLC_RRC;
-	}
-
-	return cea_channels;
-}
-
 static void apg31_se_audio_setup(
 	struct apg *apg,
 	unsigned int az_inst,
@@ -113,17 +79,12 @@ static void apg31_se_audio_setup(
 {
 	struct dcn31_apg *apg31 = DCN31_APG_FROM_APG(apg);
 
-	uint32_t speakers = 0;
-	uint32_t channels = 0;
 
 	ASSERT(audio_info);
 	/* This should not happen.it does so we don't get BSOD*/
 	if (audio_info == NULL)
 		return;
 
-	speakers = audio_info->flags.info.ALLSPEAKERS;
-	channels = speakers_to_channels(audio_info->flags.speaker_flags).all;
-
 	/* DisplayPort only allows for one audio stream with stream ID 0 */
 	REG_UPDATE(APG_CONTROL2, APG_DP_AUDIO_STREAM_ID, 0);
 
-- 
2.40.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ