From patchwork Sat May 22 17:14:12 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Contreras X-Patchwork-Id: 101647 X-Patchwork-Delegate: hiroshi.doyu@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4MHEaIK017127 for ; Sat, 22 May 2010 17:14:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755780Ab0EVROf (ORCPT ); Sat, 22 May 2010 13:14:35 -0400 Received: from mail-bw0-f46.google.com ([209.85.214.46]:55289 "EHLO mail-bw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755769Ab0EVROe (ORCPT ); Sat, 22 May 2010 13:14:34 -0400 Received: by mail-bw0-f46.google.com with SMTP id 7so383709bwz.19 for ; Sat, 22 May 2010 10:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=epV8aLkHeqzT2lKftJX05OFThRzRv4INpzQpkm6xWMo=; b=WJDn+NBQRzM1R0geEW20SF1RHxi3ffAvTIC2+vxGzLN/QJmIP2XG7RJnbU6IK8CFpW S0HnglVQ3lGds0HjDGSOo3Ph/3TanYMVCWT6/G1exCYTHUKJp49cz/FbyVcSKfxeX4g3 OaF3EZgp0TXbGppaIqlm1y8K7Q8zr3e751Zas= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=drKgND1tx69wl5c0l13BQS5liLU8urszSwuyJwtVF53pS7Z7wexPP5SC52i1Oc4loP C0lGdnmeH9rGPCYQy+ZElCWYz8MaF4qh0yDqsN3xCM6gny81SawNPg14HJZpQmJ09qQb 0Ia/9HLay8W4K/Vm+2sMiLPNWNokkCayTvYh8= Received: by 10.204.151.83 with SMTP id b19mr813221bkw.54.1274548473355; Sat, 22 May 2010 10:14:33 -0700 (PDT) Received: from localhost (a91-153-253-80.elisa-laajakaista.fi [91.153.253.80]) by mx.google.com with ESMTPS id d13sm10171295bkd.17.2010.05.22.10.14.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 22 May 2010 10:14:32 -0700 (PDT) From: Felipe Contreras To: linux-omap Cc: linux-arm , Hiroshi Doyu , Tony Lindgren , Felipe Contreras Subject: [PATCH v3 01/14] omap: mailbox: trivial whitespace cleanups Date: Sat, 22 May 2010 20:14:12 +0300 Message-Id: <1274548465-20208-2-git-send-email-felipe.contreras@gmail.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1274548465-20208-1-git-send-email-felipe.contreras@gmail.com> References: <1274548465-20208-1-git-send-email-felipe.contreras@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 22 May 2010 17:14:36 +0000 (UTC) diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 36b3aa2..38a6cb1 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c @@ -142,14 +142,14 @@ static void mbox_rx_work(struct work_struct *work) struct omap_mbox_queue *mq = container_of(work, struct omap_mbox_queue, work); mbox_msg_t msg; - int len; - - while (kfifo_len(&mq->fifo) >= sizeof(msg)) { - len = kfifo_out(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); - WARN_ON(len != sizeof(msg)); - - if (mq->callback) - mq->callback((void *)msg); + int len; + + while (kfifo_len(&mq->fifo) >= sizeof(msg)) { + len = kfifo_out(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); + WARN_ON(len != sizeof(msg)); + + if (mq->callback) + mq->callback((void *)msg); } } @@ -165,12 +165,12 @@ static void __mbox_tx_interrupt(struct omap_mbox *mbox) static void __mbox_rx_interrupt(struct omap_mbox *mbox) { - struct omap_mbox_queue *mq = mbox->rxq; + struct omap_mbox_queue *mq = mbox->rxq; mbox_msg_t msg; - int len; + int len; while (!mbox_fifo_empty(mbox)) { - if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) { + if (unlikely(kfifo_avail(&mq->fifo) < sizeof(msg))) { omap_mbox_disable_irq(mbox, IRQ_RX); rq_full = true; goto nomem; @@ -178,8 +178,8 @@ static void __mbox_rx_interrupt(struct omap_mbox *mbox) msg = mbox_fifo_read(mbox); - len = kfifo_in(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); - WARN_ON(len != sizeof(msg)); + len = kfifo_in(&mq->fifo, (unsigned char *)&msg, sizeof(msg)); + WARN_ON(len != sizeof(msg)); if (mbox->ops->type == OMAP_MBOX_TYPE1) break; @@ -278,11 +278,11 @@ static int omap_mbox_startup(struct omap_mbox *mbox) return 0; - fail_alloc_rxq: +fail_alloc_rxq: mbox_queue_free(mbox->txq); - fail_alloc_txq: +fail_alloc_txq: free_irq(mbox->irq, mbox); - fail_request_irq: +fail_request_irq: if (mbox->ops->shutdown) mbox->ops->shutdown(mbox); @@ -359,10 +359,10 @@ int omap_mbox_register(struct device *parent, struct omap_mbox *mbox) if (mbox->next) return -EBUSY; - mbox->dev = device_create(&omap_mbox_class, - parent, 0, mbox, "%s", mbox->name); - if (IS_ERR(mbox->dev)) - return PTR_ERR(mbox->dev); + mbox->dev = device_create(&omap_mbox_class, + parent, 0, mbox, "%s", mbox->name); + if (IS_ERR(mbox->dev)) + return PTR_ERR(mbox->dev); spin_lock(&mboxes_lock); tmp = find_mboxes(mbox->name); @@ -405,7 +405,7 @@ EXPORT_SYMBOL(omap_mbox_unregister); static int __init omap_mbox_init(void) { - int err; + int err; err = class_register(&omap_mbox_class); if (err) @@ -426,7 +426,7 @@ subsys_initcall(omap_mbox_init); static void __exit omap_mbox_exit(void) { destroy_workqueue(mboxd); - class_unregister(&omap_mbox_class); + class_unregister(&omap_mbox_class); } module_exit(omap_mbox_exit);