lkml.org 
[lkml]   [2016]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/9] regulator: axp20x: support AXP806 variant
On Sun, Aug 21, 2016 at 10:11:20AM +0800, Chen-Yu Tsai wrote:

> + if (id == AXP806_DCDCB) {
> + return (((reg & GENMASK(7, 6)) == BIT(6)) ||
> + ((reg & GENMASK(7, 6)) == BIT(7)));
> + } else if (id == AXP806_DCDCC) {
> + return ((reg & GENMASK(7, 6)) == BIT(7));
> + } else if (id == AXP806_DCDCE) {
> + return !!(reg & BIT(5));
> + }

This looks like you're trying to write a switch statement, please do
that.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.290 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site