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]
Date:   Tue, 06 Mar 2018 16:59:28 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Javier Arteaga <javier@...tex.com>,
        Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc:     Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Linus Walleij <linus.walleij@...aro.org>,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: intel: Implement intel_gpio_get_direction
 callback

On Tue, 2018-03-06 at 16:56 +0200, Andy Shevchenko wrote:
> On Tue, 2018-03-06 at 14:31 +0000, Javier Arteaga wrote:

> > > +static int intel_gpio_get_direction(struct gpio_chip *chip,
> > > unsigned int offset)
> > > +{

> > > +	if (padcfg0 & PADCFG0_PMODE_MASK)
> > > +		return -EINVAL;
> 
> Actually we might return direction of GPIO function while pin is in
> some
> other mode, though it would probably make not much sense in practice.

One more though, this is a call back for GPIO function anyway, so, above
condition should never happen. I think it's safe to remove it
completely.

> > > +
> > > +	return !!(padcfg0 & PADCFG0_GPIOTXDIS);
> > > +}


-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ