Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2410224ybf; Mon, 2 Mar 2020 08:05:45 -0800 (PST) X-Google-Smtp-Source: ADFU+vtNvhW6FFk2ByBCrad9ajDTGrWeD4yBHDv61ddeieVSIyKs7K0OUJ72WTaC3HqvvioMh27K X-Received: by 2002:aca:1b11:: with SMTP id b17mr133395oib.45.1583165145064; Mon, 02 Mar 2020 08:05:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583165145; cv=none; d=google.com; s=arc-20160816; b=eaBXpaEG5IoJpqoorbJz3yH5jUVmjuhQGj8+CHHsjmdoyxqB5Cl74PGB6DdNtGUrjB 4TIDx/vEcwtDyCL50KnZ78XQ9ZHwkLYC4jHy8CDGMTdf09kOn+7acU7bJOLsV7Q6qpFb 4RRkqdqZQIDWKdW+XFoaqn8tX5gXqbkuGIu1/M8GpRCzIJcB1nJyRsfBGfP4bRYnUC59 qdGr6QSFkETwug3LDoi+oaCUGtVgpKgoMFlspXIZG5skCXRLffOR4nYpXlkxGlvGqpu2 NL8y0sWBf42F4+cloyvQvPJQyu9h6zbVMnPWSKyvoPZMvRd/I1UmnGDl2NH7SXTse6dx Y94A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:in-reply-to:subject:cc:to:from :date; bh=2hDfGCZ7nHdxjDURFZiT08uV7RG5Q58NKQwdXRqF+lw=; b=uBkItwUsdv56s49ejcBzSydP32CuUQwJ1fRkxDmpmpMWUs4/pJN1XlJqLDdgNruNbE tbm1ZjKgt7buHisWZpQB2zgVFl8o9frMo0xW6Qx42Wn59mvC9/vXBDI0a4ynO6HD6MDm thvyodLjLwZG4hLUpqpNQ6f/g67JHIHDzf/qQftsPK14ATBuvdfc2F1tiGr8t5sSmDjP rktM91kADNOVS+ndQpyHcqgoZc3hI2HDSyKCC/2eFnxFOTshd9S7BqCCxJ0BAJaNqAd3 KTPb13CBGugq/U4Qs2MAbTgPSCltEgLZ8Ztx9kVcawwF30gbtz34tZkO2q291L0bfMek 0/iA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si6309734ote.275.2020.03.02.08.05.31; Mon, 02 Mar 2020 08:05:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727420AbgCBQFR (ORCPT + 99 others); Mon, 2 Mar 2020 11:05:17 -0500 Received: from foss.arm.com ([217.140.110.172]:34652 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727170AbgCBQFR (ORCPT ); Mon, 2 Mar 2020 11:05:17 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC58B2F; Mon, 2 Mar 2020 08:05:16 -0800 (PST) Received: from localhost (unknown [10.37.6.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2EE2A3F7D8; Mon, 2 Mar 2020 08:05:16 -0800 (PST) Date: Mon, 02 Mar 2020 16:05:14 +0000 From: Mark Brown To: Oleksandr Suvorov Cc: Igor Opaniuk , linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org, Marcel Ziswiler , Mark Brown , Oleksandr Suvorov , Philippe Schenker Subject: Applied "spi: spidev: fix speed setting message" to the spi tree In-Reply-To: <20200229161841.89144-3-oleksandr.suvorov@toradex.com> Message-Id: X-Patchwork-Hint: ignore Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The patch spi: spidev: fix speed setting message has been applied to the spi tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 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. Thanks, Mark 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 Link: https://lore.kernel.org/r/20200229161841.89144-3-oleksandr.suvorov@toradex.com 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; } break; -- 2.20.1