[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-14 Thread Dan Carpenter
On Fri, May 13, 2016 at 10:47:05PM +0530, Muhammad Falak R Wani wrote: > Sorry for my childish mistake, i got a little too carried away. No need to appologize, it's just a disagreement about style issues. regards, dan carpenter

[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-13 Thread Muhammad Falak R Wani
On Thu, May 12, 2016 at 12:53:48PM +0300, Jani Nikula wrote: > On Wed, 11 May 2016, Muhammad Falak R Wani wrote: > > Use ARRAY_SIZE() for the size calculation of the array. Also move the > > condition evaulation function out of the for loop. > > Although, any respectable c-compiler would optimize

[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-13 Thread Deucher, Alexander
ucher, > Alexander; Zhu, Rex; Dan Carpenter > Subject: Re: [PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of > array > > On Thu, May 12, 2016 at 12:53:48PM +0300, Jani Nikula wrote: > > On Wed, 11 May 2016, Muhammad Falak R Wani > wrote: > > > Use ARRAY_SIZE

[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-12 Thread Jani Nikula
On Wed, 11 May 2016, Muhammad Falak R Wani wrote: > Use ARRAY_SIZE() for the size calculation of the array. Also move the > condition evaulation function out of the for loop. > Although, any respectable c-compiler would optimize this and evaluate > the function only once outside the loop, but the

[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-12 Thread Eric Engestrom
On Wed, May 11, 2016 at 11:18:43PM +0530, Muhammad Falak R Wani wrote: > Use ARRAY_SIZE() for the size calculation of the array. Also move the > condition evaulation function out of the for loop. > Although, any respectable c-compiler would optimize this and evaluate > the function only once

[PATCH] drm/amd/powerplay: use ARRAY_SIZE() for size of array

2016-05-12 Thread Muhammad Falak R Wani
Use ARRAY_SIZE() for the size calculation of the array. Also move the condition evaulation function out of the for loop. Although, any respectable c-compiler would optimize this and evaluate the function only once outside the loop, but the optimzation engine of gcc is bit brain-dead, and at times