Re: [PATCH] gpio: tc3589x: use BIT() macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 5, 2016 at 3:52 PM, Bjorn Andersson
<bjorn.andersson@xxxxxxxxxx> wrote:
> On Tue 05 Apr 06:10 PDT 2016, Linus Walleij wrote:

>> -     u8 data[] = {!!val << pos, 1 << pos};
>> +     u8 data[] = {!!val << pos, BIT(pos)};
>                         ^
>                         |
> The first part of this is also a bitmask, so even though this is
> slightly messier I think for consistency you should go with:
>
> u8 data[] = {val ? BIT(pos) : 0, BIT(pos)};
>
>>
>>       tc3589x_block_write(tc3589x, reg, ARRAY_SIZE(data), data);
>>  }
>
> The rest looks good,
>
> Reviewed-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>

OK thanks, edited like so and applied with your review tag.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux