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

Commit f6bd03a7 authored by Jarkko Nikula's avatar Jarkko Nikula Committed by Mark Brown
Browse files

spi: Don't break user-visible strings to multiple source lines in drivers



User-visible strings are more difficult to grep from sources if they are
separated to multiple source lines. This is worse than over 80 columns long
line code style violation.

Fix this by making those to single-line strings or by breaking them between
variables.

While at there, convert if (printk_ratelimit()) dev_warn() to use
dev_warn_ratelimited in spi-pxa2xx.c.

Signed-off-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent a1829d2b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1401,8 +1401,8 @@ static int atmel_spi_transfer(struct spi_device *spi, struct spi_message *msg)
			asd = spi->controller_state;
			bits = (asd->csr >> 4) & 0xf;
			if (bits != xfer->bits_per_word - 8) {
				dev_dbg(&spi->dev, "you can't yet change "
					 "bits_per_word in transfers\n");
				dev_dbg(&spi->dev,
					"you can't yet change bits_per_word in transfers\n");
				return -ENOPROTOOPT;
			}
		}
+10 −9
Original line number Diff line number Diff line
@@ -913,8 +913,9 @@ static void bfin_spi_pump_messages(struct work_struct *work)
	drv_data->cur_transfer = list_entry(drv_data->cur_msg->transfers.next,
					    struct spi_transfer, transfer_list);

	dev_dbg(&drv_data->pdev->dev, "got a message to pump, "
		"state is set to: baud %d, flag 0x%x, ctl 0x%x\n",
	dev_dbg(&drv_data->pdev->dev,
		"got a message to pump, state is set to: baud "
		"%d, flag 0x%x, ctl 0x%x\n",
		drv_data->cur_chip->baud, drv_data->cur_chip->flag,
		drv_data->cur_chip->ctl_reg);

@@ -1013,8 +1014,8 @@ static int bfin_spi_setup(struct spi_device *spi)
		 * but let's assume (for now) they do.
		 */
		if (chip_info->ctl_reg & ~bfin_ctl_reg) {
			dev_err(&spi->dev, "do not set bits in ctl_reg "
				"that the SPI framework manages\n");
			dev_err(&spi->dev,
				"do not set bits in ctl_reg that the SPI framework manages\n");
			goto error;
		}
		chip->enable_dma = chip_info->enable_dma != 0
@@ -1050,8 +1051,8 @@ static int bfin_spi_setup(struct spi_device *spi)
	chip->chip_select_num = spi->chip_select;
	if (chip->chip_select_num < MAX_CTRL_CS) {
		if (!(spi->mode & SPI_CPHA))
			dev_warn(&spi->dev, "Warning: SPI CPHA not set:"
				" Slave Select not under software control!\n"
			dev_warn(&spi->dev,
				"Warning: SPI CPHA not set: Slave Select not under software control!\n"
				"See Documentation/blackfin/bfin-spi-notes.txt\n");

		chip->flag = (1 << spi->chip_select) << 8;
@@ -1059,8 +1060,8 @@ static int bfin_spi_setup(struct spi_device *spi)
		chip->cs_gpio = chip->chip_select_num - MAX_CTRL_CS;

	if (chip->enable_dma && chip->pio_interrupt) {
		dev_err(&spi->dev, "enable_dma is set, "
				"do not set pio_interrupt\n");
		dev_err(&spi->dev,
			"enable_dma is set, do not set pio_interrupt\n");
		goto error;
	}
	/*
+2 −2
Original line number Diff line number Diff line
@@ -870,8 +870,8 @@ void dw_spi_remove_host(struct dw_spi *dws)
	/* Remove the queue */
	status = destroy_queue(dws);
	if (status != 0)
		dev_err(&dws->master->dev, "dw_spi_remove: workqueue will not "
			"complete, message memory not freed\n");
		dev_err(&dws->master->dev,
			"dw_spi_remove: workqueue will not complete, message memory not freed\n");

	if (dws->dma_ops && dws->dma_ops->dma_exit)
		dws->dma_ops->dma_exit(dws);
+2 −2
Original line number Diff line number Diff line
@@ -289,8 +289,8 @@ static void fsl_espi_do_trans(struct spi_message *m,
		if ((first->bits_per_word != t->bits_per_word) ||
			(first->speed_hz != t->speed_hz)) {
			espi_trans->status = -EINVAL;
			dev_err(mspi->dev, "bits_per_word/speed_hz should be"
					" same for the same SPI transfer\n");
			dev_err(mspi->dev,
				"bits_per_word/speed_hz should be same for the same SPI transfer\n");
			return;
		}

+2 −2
Original line number Diff line number Diff line
@@ -383,8 +383,8 @@ static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr,

	mps->irq = irq;
	if (pdata == NULL) {
		dev_warn(dev, "probe called without platform data, no "
				"cs_control function will be called\n");
		dev_warn(dev,
			 "probe called without platform data, no cs_control function will be called\n");
		mps->cs_control = NULL;
		mps->sysclk = 0;
		master->bus_num = bus_num;
Loading