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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Vfr_XvDbCBgh0z6iHe8BH9t8ZN6QpP9t4HvXd10db-Hcw@mail.gmail.com>
Date:   Mon, 30 Jul 2018 20:14:58 +0300
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Tomer Maimon <tmaimon77@...il.com>
Cc:     Linus Walleij <linus.walleij@...aro.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>
Subject: Re: [PATCH v1 1/1] gpio: mmio: add inverted direction get_set io support

On Mon, Jul 30, 2018 at 12:34 PM, Tomer Maimon <tmaimon77@...il.com> wrote:
> Add get_set_inv_dir and get_set_multiple_inv_dir I/O functions
> to call the data register when the dirction is input and
> set register when the direction is output.
> the functions will linked to the I/O get functions if the user set
> BGPIOF_INVERTED_REG_DIR flag in the bgpio initialization.

> +       /* Make sure we first clear any bits that are zero when we read the register */
> +       *bits &= ~*mask;

Theoretically it's possible to get mask and bits longer than one long,
and bitmap API has to be used.
Though, it seems entire driver has been written in an assumption that
it's never happen.

> +                               gc->get_multiple =
> +                               bgpio_get_set_multiple_inv_dir;

I think you may keep it on one line.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ