lkml.org 
[lkml]   [2017]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 24/27] thunderbolt: Add support for Internal Connection Manager (ICM)
On Fri, May 26, 2017 at 7:09 PM, Mika Westerberg
<mika.westerberg@linux.intel.com> wrote:

> +static inline u8 dual_link_from_link(u8 link)
> +{
> + return link ? ((link - 1) ^ 0x01) + 1 : 0;
> +}

I have got better one (IIUC):

return (link + 1) ^ 0x01) - 1;

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2017-05-27 22:46    [W:0.365 / U:0.316 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site