[haiku-commits] Re: r42205 - haiku/trunk/src/add-ons/accelerants/radeon_hd

  • From: Jérôme Duval <korli@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 16 Jun 2011 17:09:46 +0200

Hi Alexander,

I found a few style issues.

2011/6/16  <kallisti5@xxxxxxxxxxx>:
> +                               && list[i].pciIdMax >= info.device_id) {
> +                               if (*bandgap == 0) *bandgap = 
> list[i].bandgap[dac][type];
> +                               if (*whitefine == 0) *whitefine = 
> list[i].whitefine[dac][type];

Each of these if statements should be on two lines.

> +                               break;
> +                       }
> +                       i++;
> +               }
> +               if (list[i].pciIdMin != 0)
> +                       TRACE("%s: found new BandGap / WhiteFine in table for 
> card!\n",
> +                               __func__);

This multilines if statement should use braces.

> +       if (bandGap) mask |= 0xFF << 16;
> +       if (whiteFine) mask |= 0xFF << 8;

Each of these if statements should be on two lines.

> Added: haiku/trunk/src/add-ons/accelerants/radeon_hd/dac.h
> ===================================================================
> --- haiku/trunk/src/add-ons/accelerants/radeon_hd/dac.h                       
>   (rev 0)
> +++ haiku/trunk/src/add-ons/accelerants/radeon_hd/dac.h 2011-06-16 14:39:07 
> UTC (rev 42205)
> @@ -0,0 +1,29 @@
> +/*
> + * Copyright 2006-2011, Haiku, Inc. All Rights Reserved.
> + * Distributed under the terms of the MIT License.
> + *
> + * Authors:
> + *      Alexander von Gluck, kallisti5@xxxxxxxxxxx
> + */
> +
> +#ifndef RADEON_HD_DAC_H
> +#define RADEON_HD_DAC_H
> +
> +// DAC Offsets

No blank line between the header guard and the comment header.

Bye,
Jérôme

Other related posts: