lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vc8pDPGrJH=UixW-r+kyT5K7wQXs8aN=SzooZpH9qnUcA@mail.gmail.com>
Date:   Sat, 27 May 2017 23:45:21 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Mika Westerberg <mika.westerberg@...ux.intel.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 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;

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ