public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* 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]
       [not found] <202111300439.S9nMj4kS-lkp@intel.com>
@ 2021-12-07  9:16 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-12-07  9:16 UTC (permalink / raw)
  To: Fangzhi Zuo
  Cc: llvm, kbuild-all, Linux Kernel Mailing List, Alex Deucher,
	Nicholas Kazlauskas

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@intel.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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-12-07  9:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <202111300439.S9nMj4kS-lkp@intel.com>
2021-12-07  9:16 ` 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] kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox