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>] [day] [month] [year] [list]
Message-ID: <736272c1-4d41-55cd-b14d-c4820c5bcf8b@intel.com>
Date:   Tue, 7 Dec 2021 17:16:03 +0800
From:   kernel test robot <yujie.liu@...el.com>
To:     Fangzhi Zuo <Jerry.Zuo@....com>
CC:     <llvm@...ts.linux.dev>, <kbuild-all@...ts.01.org>,
        "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        Alex Deucher <alexander.deucher@....com>,
        Nicholas Kazlauskas <Nicholas.Kazlauskas@....com>
Subject: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:124:2:
 warning: Value stored to 'speakers' is never read
 [clang-analyzer-deadcode.DeadStores]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d58071a8a76d779eedab38033ae4c821c30295a5
commit: 61452908a79ec936660494fb4b9f2a35ee42e6e0 drm/amd/display: Add DP 2.0 Audio Package Generator
date:   3 months ago
config: x86_64-randconfig-c007-20211128 (https://download.01.org/0day-ci/archive/20211130/202111300439.S9nMj4kS-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
reproduce (this is a W=1 build):
         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
         chmod +x ~/bin/make.cross
         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=61452908a79ec936660494fb4b9f2a35ee42e6e0
         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
         git fetch --no-tags linus master
         git checkout 61452908a79ec936660494fb4b9f2a35ee42e6e0
         # save the config file to linux build tree
         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>


clang-analyzer warnings: (new ones prefixed by >>)

 >> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:124:2: warning: Value stored to 'speakers' is never read [clang-analyzer-deadcode.DeadStores]
            speakers = audio_info->flags.info.ALLSPEAKERS;
            ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 >> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:125:2: warning: Value stored to 'channels' is never read [clang-analyzer-deadcode.DeadStores]
            channels = speakers_to_channels(audio_info->flags.speaker_flags).all;
            ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


vim +/speakers +124 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c

61452908a79ec9 Fangzhi Zuo 2021-06-09  108
61452908a79ec9 Fangzhi Zuo 2021-06-09  109  static void apg31_se_audio_setup(
61452908a79ec9 Fangzhi Zuo 2021-06-09  110  	struct apg *apg,
61452908a79ec9 Fangzhi Zuo 2021-06-09  111  	unsigned int az_inst,
61452908a79ec9 Fangzhi Zuo 2021-06-09  112  	struct audio_info *audio_info)
61452908a79ec9 Fangzhi Zuo 2021-06-09  113  {
61452908a79ec9 Fangzhi Zuo 2021-06-09  114  	struct dcn31_apg *apg31 = DCN31_APG_FROM_APG(apg);
61452908a79ec9 Fangzhi Zuo 2021-06-09  115
61452908a79ec9 Fangzhi Zuo 2021-06-09  116  	uint32_t speakers = 0;
61452908a79ec9 Fangzhi Zuo 2021-06-09  117  	uint32_t channels = 0;
61452908a79ec9 Fangzhi Zuo 2021-06-09  118
61452908a79ec9 Fangzhi Zuo 2021-06-09  119  	ASSERT(audio_info);
61452908a79ec9 Fangzhi Zuo 2021-06-09  120  	/* This should not happen.it does so we don't get BSOD*/
61452908a79ec9 Fangzhi Zuo 2021-06-09  121  	if (audio_info == NULL)
61452908a79ec9 Fangzhi Zuo 2021-06-09  122  		return;
61452908a79ec9 Fangzhi Zuo 2021-06-09  123
61452908a79ec9 Fangzhi Zuo 2021-06-09 @124  	speakers = audio_info->flags.info.ALLSPEAKERS;
61452908a79ec9 Fangzhi Zuo 2021-06-09 @125  	channels = speakers_to_channels(audio_info->flags.speaker_flags).all;
61452908a79ec9 Fangzhi Zuo 2021-06-09  126
61452908a79ec9 Fangzhi Zuo 2021-06-09  127  	/* DisplayPort only allows for one audio stream with stream ID 0 */
61452908a79ec9 Fangzhi Zuo 2021-06-09  128  	REG_UPDATE(APG_CONTROL2, APG_DP_AUDIO_STREAM_ID, 0);
61452908a79ec9 Fangzhi Zuo 2021-06-09  129
61452908a79ec9 Fangzhi Zuo 2021-06-09  130  	/* When running in "pair mode", pairs of audio channels have their own enable
61452908a79ec9 Fangzhi Zuo 2021-06-09  131  	 * this is for really old audio drivers */
61452908a79ec9 Fangzhi Zuo 2021-06-09  132  	REG_UPDATE(APG_DBG_GEN_CONTROL, APG_DBG_AUDIO_CHANNEL_ENABLE, 0xF);
61452908a79ec9 Fangzhi Zuo 2021-06-09  133  	// REG_UPDATE(APG_DBG_GEN_CONTROL, APG_DBG_AUDIO_CHANNEL_ENABLE, channels);
61452908a79ec9 Fangzhi Zuo 2021-06-09  134
61452908a79ec9 Fangzhi Zuo 2021-06-09  135  	/* Disable forced mem power off */
61452908a79ec9 Fangzhi Zuo 2021-06-09  136  	REG_UPDATE(APG_MEM_PWR, APG_MEM_PWR_FORCE, 0);
61452908a79ec9 Fangzhi Zuo 2021-06-09  137
61452908a79ec9 Fangzhi Zuo 2021-06-09  138  	apg31_enable(apg);
61452908a79ec9 Fangzhi Zuo 2021-06-09  139  }
61452908a79ec9 Fangzhi Zuo 2021-06-09  140

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ