All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Fangzhi Zuo <Jerry.Zuo@amd.com>
Cc: kbuild-all@lists.01.org,
	Linux Memory Management List <linux-mm@kvack.org>,
	Alex Deucher <alexander.deucher@amd.com>,
	Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Subject: [linux-next:master 9967/10320] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:117:11: warning: variable 'channels' set but not used
Date: Wed, 25 Aug 2021 20:44:42 +0800	[thread overview]
Message-ID: <202108252031.k19t8wGY-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2836 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7636510f976d75b860848884169ba985c8f844d8
commit: c45ffcf7ea9d57b79e264b6c2d8afb5e95a93097 [9967/10320] drm/amd/display: Add DP 2.0 Audio Package Generator
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c45ffcf7ea9d57b79e264b6c2d8afb5e95a93097
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout c45ffcf7ea9d57b79e264b6c2d8afb5e95a93097
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

   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:11: warning: variable 'channels' set but not used [-Wunused-but-set-variable]
     117 |  uint32_t channels = 0;
         |           ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:116:11: warning: variable 'speakers' set but not used [-Wunused-but-set-variable]
     116 |  uint32_t speakers = 0;
         |           ^~~~~~~~


vim +/channels +117 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c

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

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 65192 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 9967/10320] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:117:11: warning: variable 'channels' set but not used
Date: Wed, 25 Aug 2021 20:44:42 +0800	[thread overview]
Message-ID: <202108252031.k19t8wGY-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2904 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7636510f976d75b860848884169ba985c8f844d8
commit: c45ffcf7ea9d57b79e264b6c2d8afb5e95a93097 [9967/10320] drm/amd/display: Add DP 2.0 Audio Package Generator
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=c45ffcf7ea9d57b79e264b6c2d8afb5e95a93097
        git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
        git fetch --no-tags linux-next master
        git checkout c45ffcf7ea9d57b79e264b6c2d8afb5e95a93097
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

All warnings (new ones prefixed by >>):

   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:11: warning: variable 'channels' set but not used [-Wunused-but-set-variable]
     117 |  uint32_t channels = 0;
         |           ^~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:116:11: warning: variable 'speakers' set but not used [-Wunused-but-set-variable]
     116 |  uint32_t speakers = 0;
         |           ^~~~~~~~


vim +/channels +117 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c

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

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 65192 bytes --]

             reply	other threads:[~2021-08-25 12:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-25 12:44 kernel test robot [this message]
2021-08-25 12:44 ` [linux-next:master 9967/10320] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:117:11: warning: variable 'channels' set but not used kernel test robot

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=202108252031.k19t8wGY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Jerry.Zuo@amd.com \
    --cc=Nicholas.Kazlauskas@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.