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: <20190315131435.GE9224@smile.fi.intel.com>
Date:   Fri, 15 Mar 2019 15:14:35 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Simon Horman <horms@...ge.net.au>
Cc:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        linux-i2c@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Keerthy <j-keerthy@...com>, Peter Rosin <peda@...ntia.se>,
        Tony Lindgren <tony@...mide.com>,
        Russell King <linux@...linux.org.uk>,
        Stefan Lengfeld <contact@...fanchrist.eu>,
        Phil Reid <preid@...ctromag.com.au>,
        Tero Kristo <t-kristo@...com>, linux-omap@...r.kernel.org,
        linux-tegra@...r.kernel.org
Subject: Re: [RFC PATCH v2 5/7] i2c: busses: omap: Add the
 master_xfer_irqless hook

On Fri, Mar 15, 2019 at 01:47:18PM +0100, Simon Horman wrote:
> On Sat, Mar 02, 2019 at 02:47:33PM +0100, Wolfram Sang wrote:

> > +	if (!polling) {
> > +		timeout = wait_for_completion_timeout(&omap->cmd_complete,
> > +						      OMAP_I2C_TIMEOUT);
> > +	} else {
> > +		do {
> > +			omap_i2c_wait(omap);
> > +			ret = omap_i2c_xfer_data(omap);
> > +		} while (ret == -EAGAIN);
> > +
> > +		if (!ret)
> > +			timeout = 1;
> > +		else
> > +			timeout = 0;
> 
> 
> nit: the following might be cleaner
> 
> 		ret = !!timeout;
> 

Other way around, perhaps,

      timeout = !ret;

> > +	}

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ