[PATCH] drm/radeon: check if pcie gen 2 is already enabled

Alex Deucher alexdeucher at gmail.com
Tue Oct 9 06:02:28 PDT 2012


On Tue, Oct 9, 2012 at 3:05 AM, Rafał Miłecki <zajec5 at gmail.com> wrote:
> 2012/10/8  <alexdeucher at gmail.com>:
>> +       if (speed_cntl & LC_CURRENT_DATA_RATE) {
>> +               DRM_INFO("PCIE gen 2 link speeds already enabled\n");
>> +               return;
>> +       } else
>> +               DRM_INFO("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n");
>> +
>
> See documentation/CodingStyle:
>
>> This does not apply if only one branch of a conditional statement is a single
>> statement; in the latter case use braces in both branches:
>
> Your else should use braces :)

I'll fix that up.

Alex


More information about the dri-devel mailing list