Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 342f948a authored by Martin Sperl's avatar Martin Sperl Committed by Mark Brown
Browse files

spi: bcm2835: fix all checkpath --strict messages



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: default avatarMartin Sperl <kernel@martin.sperl.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent c517d838
Loading
Loading
Loading
Loading
+11 −7
Original line number Diff line number Diff line
@@ -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);
@@ -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;