archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <>
To: Oleksandr Suvorov
Cc: Igor Opaniuk
	Marcel Ziswiler
	Mark Brown <>,
	Oleksandr Suvorov
	Philippe Schenker
Subject: Applied "spi: spidev: fix speed setting message" to the spi tree
Date: Mon, 02 Mar 2020 16:05:14 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

The patch

   spi: spidev: fix speed setting message

has been applied to the spi tree at 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.


>From 4276fc82fc5d1aa24c6ad1a16fbaccf11fa61e02 Mon Sep 17 00:00:00 2001
From: Oleksandr Suvorov <>
Date: Sat, 29 Feb 2020 18:18:41 +0200
Subject: [PATCH] spi: spidev: fix speed setting message

The message of max device speed setting is shown when
an error in spi_setup() occurs.
Instead, it should be shown when the setup call succeeds.

Signed-off-by: Oleksandr Suvorov <>
Signed-off-by: Mark Brown <>
 drivers/spi/spidev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index c97e853dbf5c..80dd1025b953 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -454,10 +454,11 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 			spi->max_speed_hz = tmp;
 			retval = spi_setup(spi);
-			if (retval >= 0)
+			if (retval == 0) {
 				spidev->speed_hz = tmp;
-			else
-				dev_dbg(&spi->dev, "%d Hz (max)\n", tmp);
+				dev_dbg(&spi->dev, "%d Hz (max)\n",
+					spidev->speed_hz);
+			}
 			spi->max_speed_hz = save;

      parent reply	other threads:[~2020-03-02 16:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-29 16:18 [PATCH 0/2] spi: spidev: Fix messages in spidev Oleksandr Suvorov
     [not found] ` <>
2020-02-29 16:18   ` [PATCH 1/2] spi: spidev: fix a debug message value Oleksandr Suvorov
2020-03-02 16:05     ` Applied "spi: spidev: fix a debug message value" to the spi tree Mark Brown
2020-02-29 16:18   ` [PATCH 2/2] spi: spidev: fix speed setting message Oleksandr Suvorov
     [not found]     ` <>
2020-03-02 16:05       ` Mark Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \
    --subject='Re: Applied "spi: spidev: fix speed setting message" to the spi tree' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).