Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3343887pxv; Sun, 4 Jul 2021 16:06:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6WGtH3McMFPjgqo0HAUB2GDc8gmDZbOb8KEyAcd/KhEhPD/cxG4LEaAyG8IxQ7qJp0du5 X-Received: by 2002:a05:6602:21cf:: with SMTP id c15mr9166948ioc.0.1625439978962; Sun, 04 Jul 2021 16:06:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625439978; cv=none; d=google.com; s=arc-20160816; b=hgusX3a4tM6/yI81mOkVOmJ05abaeTqqL5HpTXRCqg6aPEwYSt8uLLLwA3CGb8u1QT /eveRgQ4pItzeT8DDFew4198f8eONJURpCOXK/akjjzvvb2w0m6ILRniDZLgkjd2QVP+ PtrvNZrOBFfPp9d47fk8K9j91VNjAhuWJuZSoxKgx2FgXX7tSt2NDkyLCGg2Hoxr26u/ bAfRT2vKqIa8uwcavXGyYdCyQtRu0XdWUaqBVfNpE9a0NE8q7YcJmwED2SFST3hBmGGP A4EPDuq1oZRVKruLwrvL0OTI7MeCeUuh4JJalA4ZdlnseH3urlLlRjR+8P0Vn3JoqSCf m+ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=RcMcyZN0NsYvXdjuYbm7T7FFPnGBu8ko1ZZFGULLTbQ=; b=ORgiZysbmvX70V/UoNxmLGLeJiqOaR5+GEinzXhowrHehKN/WmvwOxMelcq+460fql B4g953Y23L9ejUoQeILPTgdBc3ytHDWtdP7ulwhy827lNlQpjSqw6UCr+FUdeO2qkmF9 m/pyOxrW3F6Q3GyXPuLnCBTwog+XS0WhxWTa3bhXnnMIwy/pZTPk8QYgWyLgNAFuiWkb tYD6NECSDlSyOUef/01iHjSIAR9DJlDcyYJlZ123EtpK3ZGZJALYn0wzAIyq1nAm5slp Kx2fOtJc31cdCfP/Zpe3RtnbOf2Qyl5Dwey98MZu5Tkwm9A9wcqzrW4MPt7yW+XN55h3 EnVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T3h8Evy2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si11742430ile.35.2021.07.04.16.06.07; Sun, 04 Jul 2021 16:06:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T3h8Evy2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230129AbhGDXH1 (ORCPT + 99 others); Sun, 4 Jul 2021 19:07:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:45394 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230085AbhGDXHS (ORCPT ); Sun, 4 Jul 2021 19:07:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 18ADC613D2; Sun, 4 Jul 2021 23:04:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625439882; bh=bNjkqoyhJ5ZdEXcY3Uw5trWV/WihKOhEWTJBt87HekM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T3h8Evy2Lflu45S4YpRJxGK51I7SRjBTwF5iesUSMQKAYhemi99S8KUMWcRyVqYki dtCJFxX9ef+pyfLqdnOGQsYViEFfYjJRfmPnkuZ8nqxOPKE1k6X87lC3h6QuvKQJBT SDWaClNiWKrHPm0jbdhdMkzLgvK0sTx7zsrrlFg6/hsuXHfPYOzRj2CRNfWhgC3e64 PkT2Mxm7EX4ywQLV8LUeWopQxYP7qhvTBfYP5r+VUnRi7LAegZbfWzFXE0BH0nALEx Vcxt9DAJWnOe0Krw4FKOTK/YdiU73VU3bNTJ3AfHR1XtWcap4Ag8syV/NoYcJ3HEQo XN9RRKqb4kDJg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jay Fang , Mark Brown , Sasha Levin , linux-spi@vger.kernel.org Subject: [PATCH AUTOSEL 5.13 16/85] spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' Date: Sun, 4 Jul 2021 19:03:11 -0400 Message-Id: <20210704230420.1488358-16-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230420.1488358-1-sashal@kernel.org> References: <20210704230420.1488358-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jay Fang [ Upstream commit 9e37a3ab0627011fb63875e9a93094b6fc8ddf48 ] In function 'spi_test_run_iter': Value 'tx_buf' might be 'rx_buf'. Signed-off-by: Jay Fang Link: https://lore.kernel.org/r/1620629903-15493-5-git-send-email-f.fangjian@huawei.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-loopback-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi-loopback-test.c b/drivers/spi/spi-loopback-test.c index f1cf2232f0b5..4d4f77a186a9 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -875,7 +875,7 @@ static int spi_test_run_iter(struct spi_device *spi, test.transfers[i].len = len; if (test.transfers[i].tx_buf) test.transfers[i].tx_buf += tx_off; - if (test.transfers[i].tx_buf) + if (test.transfers[i].rx_buf) test.transfers[i].rx_buf += rx_off; } -- 2.30.2