From patchwork Fri Mar 20 14:26:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Sperl X-Patchwork-Id: 6057321 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5196B9F399 for ; Fri, 20 Mar 2015 14:26:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 705692049E for ; Fri, 20 Mar 2015 14:26:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66DE82051D for ; Fri, 20 Mar 2015 14:26:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751492AbbCTO0Q (ORCPT ); Fri, 20 Mar 2015 10:26:16 -0400 Received: from 212-186-180-163.dynamic.surfer.at ([212.186.180.163]:56670 "EHLO cgate.sperl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751227AbbCTO0P convert rfc822-to-8bit (ORCPT ); Fri, 20 Mar 2015 10:26:15 -0400 Received: from msmac.intern.sperl.org (account martin@sperl.org [10.10.10.11] verified) by sperl.org (CommuniGate Pro SMTP 6.1.2) with ESMTPSA id 6290024; Fri, 20 Mar 2015 14:26:12 +0000 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: [PATCH V2] SPI: BCM2835: fix all checkpath --strict messages From: Martin Sperl In-Reply-To: <20150320134053.GN2869@sirena.org.uk> Date: Fri, 20 Mar 2015 15:26:11 +0100 Cc: Stephen Warren , lee@kernel.org, linux-spi@vger.kernel.org, linux-rpi-kernel@lists.infradead.org Message-Id: <78137BE7-37A4-4144-BBCC-CBEDA70DD31A@martin.sperl.org> References: <1426755714-28130-1-git-send-email-kernel@martin.sperl.org> <550BA8FE.7030001@wwwdotorg.org> <7727F65E-D8BC-4299-A359-56FA449C3379@martin.sperl.org> <20150320134053.GN2869@sirena.org.uk> To: Mark Brown X-Mailer: Apple Mail (2.2070.6) 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 The following errors/warnings issued by checkpatch.pl --strict have been fixed: drivers/spi/spi-bcm2835.c:182: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:191: CHECK: braces {} should be used on all arms of this statement drivers/spi/spi-bcm2835.c:234: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:256: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:271: CHECK: Alignment should match open parenthesis drivers/spi/spi-bcm2835.c:346: CHECK: Alignment should match open parenthesis total: 0 errors, 0 warnings, 6 checks, 403 lines checked In 2 locations the arguments had to get split/moved to the next line so that the line width stays below 80 chars. Signed-off-by: Martin Sperl --- drivers/spi/spi-bcm2835.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) Changelog: v2: minimized changes where possible diff --git a/drivers/spi/spi-bcm2835.c b/drivers/spi/spi-bcm2835.c index 419a782..779d3a8 100644 --- a/drivers/spi/spi-bcm2835.c +++ b/drivers/spi/spi-bcm2835.c @@ -179,7 +179,7 @@ static irqreturn_t bcm2835_spi_interrupt(int irq, void *dev_id) } static int bcm2835_spi_start_transfer(struct spi_device *spi, - struct spi_transfer *tfr) + struct spi_transfer *tfr) { struct bcm2835_spi *bs = spi_master_get_devdata(spi->master); unsigned long spi_hz, clk_hz, cdiv; @@ -196,8 +196,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; @@ -231,7 +232,8 @@ static int bcm2835_spi_start_transfer(struct spi_device *spi, } static int bcm2835_spi_finish_transfer(struct spi_device *spi, - struct spi_transfer *tfr, bool cs_change) + 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); @@ -253,7 +255,7 @@ static int bcm2835_spi_finish_transfer(struct spi_device *spi, } static int bcm2835_spi_transfer_one(struct spi_master *master, - struct spi_message *mesg) + struct spi_message *mesg) { struct bcm2835_spi *bs = spi_master_get_devdata(master); struct spi_transfer *tfr; @@ -267,8 +269,10 @@ 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; @@ -343,7 +347,7 @@ 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); + dev_name(&pdev->dev), master); if (err) { dev_err(&pdev->dev, "could not request IRQ: %d\n", err); goto out_clk_disable;