[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170528091317.GK2784@lahna.fi.intel.com>
Date: Sun, 28 May 2017 12:13:17 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: Andy Shevchenko <andy.shevchenko@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andreas Noever <andreas.noever@...il.com>,
Michael Jamet <michael.jamet@...el.com>,
Yehezkel Bernat <yehezkel.bernat@...el.com>,
Lukas Wunner <lukas@...ner.de>,
Amir Levy <amir.jer.levy@...el.com>,
Andy Lutomirski <luto@...nel.org>,
Mario Limonciello <Mario.Limonciello@...l.com>,
Jared.Dominguez@...l.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 24/27] thunderbolt: Add support for Internal
Connection Manager (ICM)
On Sat, May 27, 2017 at 11:45:21PM +0300, Andy Shevchenko wrote:
> On Fri, May 26, 2017 at 7:09 PM, Mika Westerberg
> <mika.westerberg@...ux.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;
Unfortunately this does not work if link is 0.
Powered by blists - more mailing lists