[radeon-alex:drm-next-4.20-wip 173/184] drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer_debug.c:74:36: sparse: missing braces around initializer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://people.freedesktop.org/~agd5f/linux.git drm-next-4.20-wip
head:   2034a5eca0c640259d13dbd4c29ca8ce712055cc
commit: 56aebc3d39a70b30eb06b911271b6bdf525f5f55 [173/184] drm/amd/display: implement DPMS DTN test v2
reproduce:
        # apt-get install sparse
        git checkout 56aebc3d39a70b30eb06b911271b6bdf525f5f55
        make ARCH=x86_64 allmodconfig
        make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer_debug.c:74:36: sparse: missing braces around initializer
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer_debug.c:74:36: sparse: missing braces around initializer

vim +74 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer_debug.c

    70	
    71	static unsigned int dcn10_get_hubbub_state(struct dc *dc, char *pBuf, unsigned int bufSize)
    72	{
    73		struct dc_context *dc_ctx = dc->ctx;
  > 74		struct dcn_hubbub_wm wm = {0};
    75		int i;
    76	
    77		unsigned int chars_printed = 0;
    78		unsigned int remaining_buffer = bufSize;
    79	
    80		const uint32_t ref_clk_mhz = dc_ctx->dc->res_pool->ref_clock_inKhz / 1000;
    81		static const unsigned int frac = 1000;
    82	
    83		hubbub1_wm_read_state(dc->res_pool->hubbub, &wm);
    84	
    85		chars_printed = snprintf_count(pBuf, remaining_buffer, "wm_set_index,data_urgent,pte_meta_urgent,sr_enter,sr_exit,dram_clk_chanage\n");
    86		remaining_buffer -= chars_printed;
    87		pBuf += chars_printed;
    88	
    89		for (i = 0; i < 4; i++) {
    90			struct dcn_hubbub_wm_set *s;
    91	
    92			s = &wm.sets[i];
    93	
    94			chars_printed = snprintf_count(pBuf, remaining_buffer, "%x,%d.%03d,%d.%03d,%d.%03d,%d.%03d,%d.%03d\n",
    95				s->wm_set,
    96				(s->data_urgent * frac) / ref_clk_mhz / frac, (s->data_urgent * frac) / ref_clk_mhz % frac,
    97				(s->pte_meta_urgent * frac) / ref_clk_mhz / frac, (s->pte_meta_urgent * frac) / ref_clk_mhz % frac,
    98				(s->sr_enter * frac) / ref_clk_mhz / frac, (s->sr_enter * frac) / ref_clk_mhz % frac,
    99				(s->sr_exit * frac) / ref_clk_mhz / frac, (s->sr_exit * frac) / ref_clk_mhz % frac,
   100				(s->dram_clk_chanage * frac) / ref_clk_mhz / frac, (s->dram_clk_chanage * frac) / ref_clk_mhz % frac);
   101			remaining_buffer -= chars_printed;
   102			pBuf += chars_printed;
   103		}
   104	
   105		return bufSize - remaining_buffer;
   106	}
   107	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux