drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:1113:25: warning: variable 'clk_src' set but not used
From: kernel test robot
Date: Mon Sep 27 2021 - 19:37:39 EST
Hi Alex,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 92477dd1faa650e50bd3bb35a6c0b8d09198cc35
commit: 20f2ffe504728612d7b0c34e4f8280e34251e704 drm/amdgpu: fold CONFIG_DRM_AMD_DC_DCN3* into CONFIG_DRM_AMD_DC_DCN (v3)
date: 11 months ago
config: i386-randconfig-a015-20210927 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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=20f2ffe504728612d7b0c34e4f8280e34251e704
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 20f2ffe504728612d7b0c34e4f8280e34251e704
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.c:96:6: warning: no previous prototype for function 'vg_update_clocks' [-Wmissing-prototypes]
void vg_update_clocks(struct clk_mgr *clk_mgr_base,
^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.c:96:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vg_update_clocks(struct clk_mgr *clk_mgr_base,
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.c:375:6: warning: no previous prototype for function 'vg_get_clk_states' [-Wmissing-prototypes]
void vg_get_clk_states(struct clk_mgr *clk_mgr_base, struct clk_states *s)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.c:375:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vg_get_clk_states(struct clk_mgr *clk_mgr_base, struct clk_states *s)
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.c:393:6: warning: no previous prototype for function 'vg_init_clocks' [-Wmissing-prototypes]
void vg_init_clocks(struct clk_mgr *clk_mgr)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/vg_clk_mgr.c:393:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void vg_init_clocks(struct clk_mgr *clk_mgr)
^
static
3 warnings generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/dcn301_smu.c:91:5: warning: no previous prototype for function 'dcn301_smu_send_msg_with_param' [-Wmissing-prototypes]
int dcn301_smu_send_msg_with_param(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/clk_mgr/dcn301/dcn301_smu.c:91:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int dcn301_smu_send_msg_with_param(
^
static
1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c:1113:25: warning: variable 'clk_src' set but not used [-Wunused-but-set-variable]
struct dce110_clk_src *clk_src;
^
1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn30/irq_service_dcn30.c:50:20: warning: no previous prototype for function 'to_dal_irq_source_dcn30' [-Wmissing-prototypes]
enum dc_irq_source to_dal_irq_source_dcn30(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn30/irq_service_dcn30.c:50:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
enum dc_irq_source to_dal_irq_source_dcn30(
^
static
1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3052:10: warning: variable 'MaxUsedBW' set but not used [-Wunused-but-set-variable]
double MaxUsedBW = 0;
^
1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_init.c:139:6: warning: no previous prototype for function 'dcn30_hw_sequencer_construct' [-Wmissing-prototypes]
void dcn30_hw_sequencer_construct(struct dc *dc)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_init.c:139:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dcn30_hw_sequencer_construct(struct dc *dc)
^
static
1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:44:6: warning: no previous prototype for function 'dpp30_read_state' [-Wmissing-prototypes]
void dpp30_read_state(struct dpp *dpp_base,
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:44:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dpp30_read_state(struct dpp *dpp_base,
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:375:6: warning: no previous prototype for function 'dpp3_get_optimal_number_of_taps' [-Wmissing-prototypes]
bool dpp3_get_optimal_number_of_taps(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:375:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool dpp3_get_optimal_number_of_taps(
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:483:6: warning: no previous prototype for function 'dpp3_cnv_set_bias_scale' [-Wmissing-prototypes]
void dpp3_cnv_set_bias_scale(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:483:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dpp3_cnv_set_bias_scale(
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:669:6: warning: no previous prototype for function 'dpp3_program_blnd_lut' [-Wmissing-prototypes]
bool dpp3_program_blnd_lut(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:669:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool dpp3_program_blnd_lut(
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:1080:6: warning: no previous prototype for function 'dpp3_program_shaper' [-Wmissing-prototypes]
bool dpp3_program_shaper(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:1080:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool dpp3_program_shaper(
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:1265:6: warning: no previous prototype for function 'dpp3_program_3dlut' [-Wmissing-prototypes]
bool dpp3_program_3dlut(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dpp.c:1265:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool dpp3_program_3dlut(
^
static
6 warnings generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:322:27: warning: variable 'optc' set but not used [-Wunused-but-set-variable]
struct timing_generator *optc;
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_hwseq.c:654:7: warning: variable 'is_dp' set but not used [-Wunused-but-set-variable]
bool is_dp;
^
2 warnings generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:1363:5: warning: no previous prototype for function 'mpcc3_release_rmu' [-Wmissing-prototypes]
int mpcc3_release_rmu(struct mpc *mpc, int mpcc_id)
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_mpc.c:1363:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int mpcc3_release_rmu(struct mpc *mpc, int mpcc_id)
^
static
1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_afmt.c:122:11: warning: variable 'speakers' set but not used [-Wunused-but-set-variable]
uint32_t speakers = 0;
^
1 warning generated.
--
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dio_stream_encoder.c:53:6: warning: no previous prototype for function 'convert_dc_info_packet_to_128' [-Wmissing-prototypes]
void convert_dc_info_packet_to_128(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dio_stream_encoder.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void convert_dc_info_packet_to_128(
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dio_stream_encoder.c:487:6: warning: no previous prototype for function 'enc3_stream_encoder_dvi_set_stream_attribute' [-Wmissing-prototypes]
void enc3_stream_encoder_dvi_set_stream_attribute(
^
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn30/dcn30_dio_stream_encoder.c:487:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void enc3_stream_encoder_dvi_set_stream_attribute(
^
static
2 warnings generated.
..
vim +/clk_src +1113 drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_clock_source.c
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1106
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1107 static uint32_t dcn3_get_pix_clk_dividers(
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1108 struct clock_source *cs,
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1109 struct pixel_clk_params *pix_clk_params,
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1110 struct pll_settings *pll_settings)
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1111 {
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1112 unsigned long long actual_pix_clk_100Hz = pix_clk_params->requested_pix_clk_100hz;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 @1113 struct dce110_clk_src *clk_src;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1114
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1115 clk_src = TO_DCE110_CLK_SRC(cs);
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1116 DC_LOGGER_INIT();
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1117
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1118 if (pix_clk_params == NULL || pll_settings == NULL
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1119 || pix_clk_params->requested_pix_clk_100hz == 0) {
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1120 DC_LOG_ERROR(
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1121 "%s: Invalid parameters!!\n", __func__);
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1122 return -1;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1123 }
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1124
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1125 memset(pll_settings, 0, sizeof(*pll_settings));
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1126 /* Adjust for HDMI Type A deep color */
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1127 if (pix_clk_params->signal_type == SIGNAL_TYPE_HDMI_TYPE_A) {
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1128 switch (pix_clk_params->color_depth) {
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1129 case COLOR_DEPTH_101010:
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1130 actual_pix_clk_100Hz = (actual_pix_clk_100Hz * 5) >> 2;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1131 break;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1132 case COLOR_DEPTH_121212:
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1133 actual_pix_clk_100Hz = (actual_pix_clk_100Hz * 6) >> 2;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1134 break;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1135 case COLOR_DEPTH_161616:
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1136 actual_pix_clk_100Hz = actual_pix_clk_100Hz * 2;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1137 break;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1138 default:
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1139 break;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1140 }
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1141 }
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1142 pll_settings->actual_pix_clk_100hz = (unsigned int) actual_pix_clk_100Hz;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1143 pll_settings->adjusted_pix_clk_100hz = (unsigned int) actual_pix_clk_100Hz;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1144 pll_settings->calculated_pix_clk_100hz = (unsigned int) actual_pix_clk_100Hz;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1145
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1146 return 0;
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1147 }
4d55b0dd1cdd85 Bhawanpreet Lakha 2020-05-21 1148
:::::: The code at line 1113 was first introduced by commit
:::::: 4d55b0dd1cdd8535ffd6057f210465575117d807 drm/amd/display: Add DCN3 CLK_MGR
:::::: TO: Bhawanpreet Lakha <Bhawanpreet.Lakha@xxxxxxx>
:::::: CC: Alex Deucher <alexander.deucher@xxxxxxx>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip