From patchwork Thu Mar 19 09:01:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sperl X-Patchwork-Id: 6047781 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 14D8CBF90F for ; Thu, 19 Mar 2015 09:02:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6426A20523 for ; Thu, 19 Mar 2015 09:02:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B7612050E for ; Thu, 19 Mar 2015 09:02:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751805AbbCSJC3 (ORCPT ); Thu, 19 Mar 2015 05:02:29 -0400 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:56364 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751824AbbCSJC2 (ORCPT ); Thu, 19 Mar 2015 05:02:28 -0400 Received: from raspb.intern.sperl.org (account martin@sperl.org [10.10.10.32] verified) by sperl.org (CommuniGate Pro SMTP 6.0.10) with ESMTPSA id 6281514; Thu, 19 Mar 2015 08:58:53 +0000 From: kernel@martin.sperl.org To: broonie@kernel.org, warren@wwwdotorg.org, lee@kernel.org, linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Cc: Martin Sperl Subject: [PATCH] SPI: BCM2835: fix all checkpath --strict messages Date: Thu, 19 Mar 2015 09:01:50 +0000 Message-Id: <1426755714-28130-1-git-send-email-kernel@martin.sperl.org> X-Mailer: git-send-email 1.7.10.4 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Martin Sperl Signed-off-by: Martin Sperl --- drivers/spi/spi-bcm2835.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 419a782..e1dea40 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -178,8 +178,9 @@ static irqreturn_t bcm2835_spi_interrupt(int irq, void *dev_id) return IRQ_NONE; } -static int bcm2835_spi_start_transfer(struct spi_device *spi, - struct spi_transfer *tfr) +static int bcm2835_spi_start_transfer( + struct spi_device *spi, + struct spi_transfer *tfr) { struct bcm2835_spi *bs = spi_master_get_devdata(spi->master); unsigned long spi_hz, clk_hz, cdiv; @@ -196,8 +197,9 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi, if (cdiv >= 65536) cdiv = 0; /* 0 is the slowest we can go */ - } else + } else { cdiv = 0; /* 0 is the slowest we can go */ + } if (spi->mode & SPI_CPOL) cs |= BCM2835_SPI_CS_CPOL; @@ -230,8 +232,9 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi, return 0; } -static int bcm2835_spi_finish_transfer(struct spi_device *spi, - struct spi_transfer *tfr, bool cs_change) +static int bcm2835_spi_finish_transfer( + struct spi_device *spi, + struct spi_transfer *tfr, bool cs_change) { struct bcm2835_spi *bs = spi_master_get_devdata(spi->master); u32 cs = bcm2835_rd(bs, BCM2835_SPI_CS); @@ -252,8 +255,9 @@ static int bcm2835_spi_finish_transfer(struct spi_device *spi, return 0; } -static int bcm2835_spi_transfer_one(struct spi_master *master, - struct spi_message *mesg) +static int bcm2835_spi_transfer_one( + struct spi_master *master, + struct spi_message *mesg) { struct bcm2835_spi *bs = spi_master_get_devdata(master); struct spi_transfer *tfr; @@ -267,8 +271,9 @@ static int bcm2835_spi_transfer_one(struct spi_master *master, if (err) goto out; - timeout = wait_for_completion_timeout(&bs->done, - msecs_to_jiffies(BCM2835_SPI_TIMEOUT_MS)); + timeout = wait_for_completion_timeout( + &bs->done, + msecs_to_jiffies(BCM2835_SPI_TIMEOUT_MS)); if (!timeout) { err = -ETIMEDOUT; goto out; @@ -342,8 +347,9 @@ static int bcm2835_spi_probe(struct platform_device *pdev) clk_prepare_enable(bs->clk); - err = devm_request_irq(&pdev->dev, bs->irq, bcm2835_spi_interrupt, 0, - dev_name(&pdev->dev), master); + err = devm_request_irq( + &pdev->dev, bs->irq, bcm2835_spi_interrupt, 0, + dev_name(&pdev->dev), master); if (err) { dev_err(&pdev->dev, "could not request IRQ: %d\n", err); goto out_clk_disable;