From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16BF2C43381 for ; Fri, 15 Mar 2019 13:14:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DA7AF218A1 for ; Fri, 15 Mar 2019 13:14:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HwQw2rz2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DA7AF218A1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4R+Ket/Zg4dr+/KC6u5b4h6vl33DD/IdszFuAfVKtA8=; b=HwQw2rz2Tpca57 a0weDwNOixgjoo+cMfP+GgRJ3jo9fizKqoigecXFyy0TtI2HG/pwyR86l0MmOw7hE5DpI0MAgOgMk 8FQkg7Oou8qJ13bGBzPihKDipVFMxZMYBFHE+az/i3INbLCzaJRCQ1ois8R8LsLUgPJBJMBiwYLwC MVYxddlaijgH1mWwi8NZxc4gop8IIYzFD4qVfmzFwbROmalcIPsJ2CNo9eHB9V/K7xPOsAfoJG1m7 vcpH/QqtbPNbEeH/QL5Gz9ikE3PadMjzvoXYeZJ6xUHkivj/0aQWPU2D+xuDUaHXxsjLogmTEgXud HfdZqFALR4gB4xR/pAnA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4mfd-0000eA-Mn; Fri, 15 Mar 2019 13:14:45 +0000 Received: from mga06.intel.com ([134.134.136.31]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h4mfb-0000dl-2v for linux-arm-kernel@lists.infradead.org; Fri, 15 Mar 2019 13:14:43 +0000 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.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 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-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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190315_061443_176723_035C54B7 X-CRM114-Status: GOOD ( 13.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tero Kristo , linux-omap@vger.kernel.org, Tony Lindgren , Keerthy , linux-kernel@vger.kernel.org, Russell King , linux-renesas-soc@vger.kernel.org, Wolfram Sang , linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, Stefan Lengfeld , Phil Reid , Peter Rosin , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel