On Tue, Nov 19, 2013 at 12:56 AM, Markus Mayer <[email protected]> wrote: > On 18 November 2013 01:55, Linus Walleij <[email protected]> wrote: >> On Fri, Nov 8, 2013 at 9:19 PM, Markus Mayer <[email protected]> wrote: >> >>> We need to return the corresponding bit for a particular GPIO. This bit >>> contains shift not mask. >>> >>> Signed-off-by: Markus Mayer <[email protected]> >>> Reviewed-by: Tim Kryger <[email protected]> >>> Reviewed-by: Matt Porter <[email protected]> >> >> OK... >> >>> /* return the specified bit status */ >>> - return !!(val & bit); >>> + return (val >> bit) & 1; >> >> What about doing it like this instead: >> >> return !!(val & BIT(bit)); > > I'll have to run that change through some tests to ensure everything > is working as intended.
OK please do, because that style is used elsewhere in the driver so I'd like to keep it consistent. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
