[PATCH] drm/amd/display: Fix 64-bit division, yet again

Emil Velikov emil.l.velikov at gmail.com
Wed Feb 15 15:30:22 UTC 2017


On 15 February 2017 at 14:47, Harry Wentland <harry.wentland at amd.com> wrote:
> On 2017-02-15 06:44 AM, Emil Velikov wrote:
>>
>> On 14 February 2017 at 20:36, Harry Wentland <harry.wentland at amd.com>
>> wrote:
>>>
>>> Also make the code somewhat more readable.
>>>
>> I'd suggest reaching to the team to integrate scripts/checkpatch.pl in
>> the pre-commit hook.
>>
>> It will help you improve the coding standard and, as you mentioned, it
>> "make[s] the code somewhat more readable".
>>
>
> Thanks, Emil. We actually have that hooked up at pre-submission in our
> internal repo but don't block submission on warnings and allow a couple
> people to push anyways despite errors because we seem to get some
> unnecessary errors on complex macros that can't really be handled
> differently.
>
Some ideas:
 - nobody is exempt - everyone has to go through the checks/hooks
 - can not push if there are more than X warnings and Y errors
 - whitelist patches that include changes to the problematic macros
Btw, do you recall which macros are responsible?

> Need to think on how to improve that. It's a pain being the bad guy
> constantly and people don't always see the importance of good coding and
> commit msg style.
>
One possible solution is to check that the commit message is at least
A% of the diffstat - refusing to commit + sending a bunch of links
about why you want good commit messages.

Afaict all of the above can be automated, thus nobody will be an
exception to the rule. With time all that can go away, but until then
it will save you/Alex a) time and b) being the bad guys.
It will take a few rounds to tweaking the X/Y/A numbers though ;-)

Thanks
Emil


More information about the amd-gfx mailing list