[PART1 PATCH 2/8] drm/amdgpu: add parse clock gating state

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

 



On Thu, Jan 05, 2017 at 11:33:38AM -0500, Felix Kuehling wrote:
> This could be done with much less code duplication:
> 
> 	static const struct {
> 		u32 flag;
> 		const char *name;
> 	} clocks[] = {
> 		{AMD_CG_SUPPORT_GFX_MGCG, "Medium Grain Clock Gating"},
> 		{AMD_CG_SUPPORT_GFX_MGLS, "Medium Grain memory Light Sleep"},
> 		...
> 		{0, NULL}
> 	};
> 
> 	for (i = 0; clocks[i].flag; i++)
> 		seq_printf(m, "\t%s: %s\n",
> 			clocks[i].name,
> 			(flags & clocks[i].flag) ? "On" : "Off");
> 

Looks better. Thank you.

Thanks,
Rui


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux