Received: by 2002:ac0:a874:0:0:0:0:0 with SMTP id c49csp436544ima; Fri, 15 Mar 2019 06:16:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdkJJzlrHRaQ40zudy2hpTC2ar7vT5WA/3gzwiofXVABBOv6+io02C5qoSpSj1hjgJ9tMY X-Received: by 2002:a62:d281:: with SMTP id c123mr3975782pfg.210.1552655815387; Fri, 15 Mar 2019 06:16:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552655815; cv=none; d=google.com; s=arc-20160816; b=K8aJkhO6+6peukH8oa+HP9Wfw678uBhFubeEHa1t1V2M2KH1OFCAm4TX0HNyAe7EEM eXk38j/wyX+N6ifZrZ3AteQoRO+apjkX9kHbUn/Doq7olSe/FtqZsKkEVszQD7SikQIT 5dzlNVhHGX6C6AuSBeGDmCsj4gX6VqhypWxUHyelOi1evlzK357dmg+qIQW2pg7bGIte A/Fi1Ei36VmT+6Bh2ICNkxyYPdNo4/BpC1yzXW8868nx4CxTO8qRHQofbCeTAzLnJJct cf6We7tQ1wQNqDBSsqkRaICe8B+9KZOrDd1nC+lePt/VJ4kzei61ViRy5TydnDhPMuPR FVBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=SYlHoQD75+3wTPwYpLUNznIS+YHamHh85ZBPrkjVScs=; b=aFBEZ4+17DxHq6Bwl90IJd+fgR6NuDeFac1vud0YCTXTbou9VaQnTxaPXsM9+L1rff 1CEZXc2PmnVBXS3xwoMjrEBN0gFuokndECDC/yJtd+KKpFQ3sUCQSsKgn31HWG814NQI cLVl7y7IuNl1/YN0grEZkosEML4zOmyf0D8HNqJNUNQD/AOeLhybZy3g3qfAxRWMyO79 a5qWbqM3S+1/4lC406rVNoE4Uo7wgyw/f+H+qGGpeGUD2/nu8jaSJk6eRXlpbsL1fL3H neC16Y26N1VFu7UgKrYRW/uL9tiaOcceIVT0ync2wOWLrJJGGt0QHUyiC3agC0WVEEUz 1n3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i3si1781714pgq.282.2019.03.15.06.16.39; Fri, 15 Mar 2019 06:16:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729102AbfCONOm (ORCPT + 99 others); Fri, 15 Mar 2019 09:14:42 -0400 Received: from mga17.intel.com ([192.55.52.151]:24672 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729031AbfCONOl (ORCPT ); Fri, 15 Mar 2019 09:14:41 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2019 06:14:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,482,1544515200"; d="scan'208";a="134323309" Received: from smile.fi.intel.com (HELO smile) ([10.237.72.86]) by orsmga003.jf.intel.com with ESMTP; 15 Mar 2019 06:14:37 -0700 Received: from andy by smile with local (Exim 4.92) (envelope-from ) id 1h4mfT-0000Uh-Vz; Fri, 15 Mar 2019 15:14:35 +0200 Date: Fri, 15 Mar 2019 15:14:35 +0200 From: Andy Shevchenko To: Simon Horman Cc: Wolfram Sang , linux-i2c@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Keerthy , Peter Rosin , Tony Lindgren , Russell King , Stefan Lengfeld , Phil Reid , Tero Kristo , linux-omap@vger.kernel.org, linux-tegra@vger.kernel.org Subject: Re: [RFC PATCH v2 5/7] i2c: busses: omap: Add the master_xfer_irqless hook Message-ID: <20190315131435.GE9224@smile.fi.intel.com> References: <20190302134735.4393-1-wsa+renesas@sang-engineering.com> <20190302134735.4393-6-wsa+renesas@sang-engineering.com> <20190315124717.x3do5evok5syipo7@verge.net.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190315124717.x3do5evok5syipo7@verge.net.au> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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