lkml.org 
[lkml]   [2011]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3.1] [resend] Resurrect Intel740 driver: i740fb
Date
On Sat, Dec 3, 2011 at 3:45 PM, Florian Tobias Schandinat
<FlorianSchandinat@gmx.de> wrote:
>
>> +     return !!(i740inreg(par, XRX, REG_DDC_STATE) & DDC_SCL);
>
> Why "!!"?

This is a trick that guarantees that the return value is either 0 or
1. Without the !!, the return value will be either 0 or DDC_SCL.

--
Timur Tabi
Linux kernel developer at Freescale
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-12-04 03:39    [from the cache]
©2003-2011 Jasper Spaans