From patchwork Mon Feb 2 07:19:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jassi Brar X-Patchwork-Id: 44120 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f198.google.com (mail-we0-f198.google.com [74.125.82.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 256F624086 for ; Mon, 2 Feb 2015 07:19:49 +0000 (UTC) Received: by mail-we0-f198.google.com with SMTP id q59sf15248948wes.1 for ; Sun, 01 Feb 2015 23:19:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=xoT3sP0lrXYdaVznaP84dst0Y9108iDeo8kXtAuYWIo=; b=MNEyGumxLsoPQGHo160kZZdnk13iKAmJg327odWJa3PMgL6RjgwsMVmLqqwTA4d5Mk SZiqAmpi5Ph84ifYwSOGzV4rRYYunVObavnOcVrM58dQHX8lgk9INt75V9n+Y2a4RBjD lRpsbkknzzW6bqL6MAJ0Li3auW0ErA3Ymk/zM8PvN13rc0X7Bnix2PPHjL5ufArj3M0w +7Kin4cJgI463WoqU6F/FxQEtSZSp0JL4A3IIDVj0nl/4wAcmSZDO5V3sC4rGqMvFm38 uyTGHI3r9dnJjhzFkGusdEWNTBguwnsohrATKYaFm4v/DTSVcvTfy6fhxRtDR01/P35x NXNA== X-Gm-Message-State: ALoCoQke5smCQjLi/PEhrZkqsTH9ZWAT8+9HmlHy2YhbQr3FJgg4jNPKzfpBIGt7PHarRccnI6ya X-Received: by 10.112.143.167 with SMTP id sf7mr2107929lbb.0.1422861588439; Sun, 01 Feb 2015 23:19:48 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.120.67 with SMTP id la3ls467130lab.25.gmail; Sun, 01 Feb 2015 23:19:48 -0800 (PST) X-Received: by 10.112.181.41 with SMTP id dt9mr17800094lbc.56.1422861588161; Sun, 01 Feb 2015 23:19:48 -0800 (PST) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id a9si16361889lbc.44.2015.02.01.23.19.48 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 01 Feb 2015 23:19:48 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by mail-la0-f54.google.com with SMTP id hv19so37616330lab.13 for ; Sun, 01 Feb 2015 23:19:48 -0800 (PST) X-Received: by 10.112.25.104 with SMTP id b8mr18027227lbg.69.1422861588065; Sun, 01 Feb 2015 23:19:48 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp1127342lbj; Sun, 1 Feb 2015 23:19:47 -0800 (PST) X-Received: by 10.66.141.5 with SMTP id rk5mr27424670pab.112.1422861586380; Sun, 01 Feb 2015 23:19:46 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qs1si22468335pbb.167.2015.02.01.23.19.45; Sun, 01 Feb 2015 23:19:46 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932684AbbBBHTm (ORCPT + 29 others); Mon, 2 Feb 2015 02:19:42 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:38266 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751257AbbBBHTk (ORCPT ); Mon, 2 Feb 2015 02:19:40 -0500 Received: by mail-pa0-f54.google.com with SMTP id eu11so78894919pac.13 for ; Sun, 01 Feb 2015 23:19:39 -0800 (PST) X-Received: by 10.70.126.1 with SMTP id mu1mr19694589pdb.37.1422861579607; Sun, 01 Feb 2015 23:19:39 -0800 (PST) Received: from localhost.localdomain ([59.91.205.85]) by mx.google.com with ESMTPSA id rj7sm17765152pbc.58.2015.02.01.23.19.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 01 Feb 2015 23:19:38 -0800 (PST) From: Jassi Brar To: linux-kernel@vger.kernel.org Cc: Jassi Brar Subject: [PATCH 1/2] mailbox: check for bit set before polling Date: Mon, 2 Feb 2015 12:49:04 +0530 Message-Id: <1422861544-20667-1-git-send-email-jaswinder.singh@linaro.org> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: jaswinder.singh@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Jassi Brar Before polling we just need to see if the TXDONE_BY_POLL bit is set in txdone_method. There may be another bit (method) specified as well, like TXDONE_BY_ACK. Signed-off-by: Jassi Brar --- drivers/mailbox/mailbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c index 59aad4d..19b491d 100644 --- a/drivers/mailbox/mailbox.c +++ b/drivers/mailbox/mailbox.c @@ -87,7 +87,7 @@ static void msg_submit(struct mbox_chan *chan) exit: spin_unlock_irqrestore(&chan->lock, flags); - if (!err && chan->txdone_method == TXDONE_BY_POLL) + if (!err && (chan->txdone_method & TXDONE_BY_POLL)) poll_txdone((unsigned long)chan->mbox); }