Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3345964pxv; Sun, 4 Jul 2021 16:10:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx167QrAPYqa2oQw7dpqSpVdXdDRjxb0eOGPlgp9RJK8d0kGXboFWj9zE5V8fgnsxCCUBzU X-Received: by 2002:a5e:9602:: with SMTP id a2mr9611188ioq.146.1625440211697; Sun, 04 Jul 2021 16:10:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625440211; cv=none; d=google.com; s=arc-20160816; b=A3tZhuCB4377vRlKdyG/PFK0TqRi0F0OpYsylAhybJTU3j1wU7VaC07WPh7VDoFTUC LySmVK63chbzNlC5e/+qHGWb+TRl2bOVDzrpw/wv+TYdP7KtGqO1tRlIOhS0rU9b/MqE +n0/zi8/uauQCfDMqlCRKFQV+PBqGCbMN3ETqZuIxi+v/oAqeCiSy1WS4DpZHPuf6OEy iVFPzR9LfmaQq3trSZDsBLxvxDOJZ+F0Ba+t9zFEo2y/XPMbdl0IN1yuRX1APxmw7etK k3MIW/UWRs65O29ee3sR0mjahWllw57RLV6kCik0z2F+qX1foXjw6F5TT4f3X8NOLb12 pSRQ== 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=Fmu2Xu9ypNI6/cWQGNmfY+Xtta0SDSwnRBBZhw1bLFg=; b=FH+vT52erIFXcCVlRwNzkCh5VV+fPnxMap6Q3brBS4azC7paey4dt11vNkkADntJLO oWi6zWmPSivuypu2SKEv1LGi+QC6NHUgmQQqV2GiNM7ok2FPkKFUZjQ+HsWbxoJRXo2J +kVedWpAAyUvO58PX0RFURS10maoxX0aBxDMNVoCpUpbyiBWTAhWNEneEc17B6L5U/fv rWGs6ccJ671WNyyZTWUy+GGMTrZFeVCLgELYs5ZMRTdaBHDYhR1BiSs3ciQkkaGHNHd4 fofpCF4lldSaod2rBkzfG4Ot6ts1GtW2sxchqg9BqFfkbeiBe6YQNsxu+UEqM2Wce1O6 xUIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ojQdVALr; 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 f17si10552573ilj.76.2021.07.04.16.09.59; Sun, 04 Jul 2021 16:10:11 -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=ojQdVALr; 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 S232237AbhGDXKl (ORCPT + 99 others); Sun, 4 Jul 2021 19:10:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:48990 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231811AbhGDXJO (ORCPT ); Sun, 4 Jul 2021 19:09:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A3C361474; Sun, 4 Jul 2021 23:06:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625439998; bh=uu4IOEsZsfgAPk2eecSoxen6XKp6DK3pLY4HKZJa1Ek=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ojQdVALrFA1vWvGun1YauJOIhuwdum35OTIHGQK4oK2u8p3W+6tyvEPf5CIDg9SGt M2/3zSDxn5X1LHloPVN88F3jbdLyFQ77nf4R0cjZGNwgbt1zKF+1NhIL/7oCCVXiJv YLRV4o5dkc9jsU5Pq3+E+sQSp7huTpOJ/P+L3tLA+P6Nsas5RRcQZDJaqIEOeUi12Y ERVJvyuiIz2sYsMZN3jKFFKQJvPvUKF5fDTBXKt/OfUTKwbnkMQZy4UHGijDlYFmtu of/AQ/CSFq8k6xUsdtad811houDPTxrz1bgN5an6Eb4M7kCLZNBfCSg9A0jHEKiTaE UvSag9RjMCZAw== 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.12 16/80] spi: spi-loopback-test: Fix 'tx_buf' might be 'rx_buf' Date: Sun, 4 Jul 2021 19:05:12 -0400 Message-Id: <20210704230616.1489200-16-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210704230616.1489200-1-sashal@kernel.org> References: <20210704230616.1489200-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 df981e55c24c..89b91cdfb2a5 100644 --- a/drivers/spi/spi-loopback-test.c +++ b/drivers/spi/spi-loopback-test.c @@ -874,7 +874,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