| Message ID | 20260219175130.2839234-6-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers | show
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBS433XGAMGQEIGWSMIQ@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id F2D803F150
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 19 Feb 2026 18:52:12 +0100 (CET)
Received: by mail-wm1-f72.google.com with SMTP id
5b1f17b1804b1-4836c819456sf9217265e9.3
for <linux-amarula@patchwork.amarulasolutions.com>;
Thu, 19 Feb 2026 09:52:12 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1771523532; cv=pass;
d=google.com; s=arc-20240605;
b=bJjxSapk8NhgKPdE4APtmTUUgh/MchG8YswXJ7EHVvVQfIPs8k6o94RS1bvqo/U/Ox
oIY1dKF2JtRSd2MLVeMWU5AEf59PiKO7jNXI+bubJ6SIfbvFJZA9X8LusPazixlIYbPx
gC6RSJVOQzwCWZisdXwmQxGCE6354EunFs+AnUBZkLtdUQPXyJ1czjX4vfRbMZcWRYba
MDF9QsLSvACa9IuKSuWkuEF4VgClGHoR7wtvRqeLFXAFLY/7WSfBI5Y+J0AmE9UDzgUc
/9uBGm2qQ8xmStCsOk6Yt6XRYN2gbDoyXSpPxN3N9gpTRMGIYilX+Y/Zm2ZhUhp9MRhX
z89w==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=W0GquyKy0Vu35182TvbMk2QZNgGI/7Ey1LlneZG8U80=;
fh=YLHTA9Bdznj65yn7wP8+0WIvQk8zHh6XAhDIEDKNKRw=;
b=ZKMSX/r6N54CZ5GIHkyAet0eaLPlOPRBObr/C9qcqbWdskSrHKGsP3uu5++Q0Y6wKM
bofFZVcFwU8O2fPyG7zHyZZt6t23gN8FWbwK45MBjzI/YdBGJDontH91QxZ1mT+rVeTF
DJNTP8wtyiGiFD/rzgm6jWyxiSVQ46K6B95Ear5ol3VWmte7tqK+R+AjD9+nmq5+rrYt
1EX9Bvkx6B8JGYR+2pnhORC/W9GeKKB4x9vr1sUPOswUmocQs4LhyoiJsoxRxMQf5wke
oWOX4ErceMjQVLD2dsqy9xBarX3Mkdj6oagwXuZfle8aI8TO+/WPt+TUj8kO5XslxDoo
crKw==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=qeY6nU9y;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.65 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1771523532; x=1772128332;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:x-original-authentication-results
:x-original-sender:mime-version:references:in-reply-to:message-id
:date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
bh=W0GquyKy0Vu35182TvbMk2QZNgGI/7Ey1LlneZG8U80=;
b=Ja48wcQIDedpw8veLgKU2z7uVsGjrlkSAzECvP0531LyB0RB8YEFdlkpF0887Ta5PO
010Pp1oJS4hyQgo1Xeh4bRj5/gs9g7Zynmx0QIRSVsko3/Bs3RpZ0CvlzphfsxAfrUqc
AboQirBAL5UxViZaZD9i0wQeVy9YTp16PSWzs=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20230601; t=1771523532; x=1772128332;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:x-original-authentication-results:x-original-sender:mime-version
:references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg
:x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id
:reply-to;
bh=W0GquyKy0Vu35182TvbMk2QZNgGI/7Ey1LlneZG8U80=;
b=Z3m2pw+ZVLzJ+1LJm3A5YUijSLNbfH9H5G+SdAX4jhzAee9uClwOoXNEXLjC9qi/F1
x4d0Kq4zuAq6/yyf0NqLp65Zv4mVI0TnU1uMdgvbbDI9DuXpBR2oMhQJZ4gKYcFx4CoD
VQHNVJpojHpyDCEeAwBiC9QuLTW6NtWSKmOLJQ7yPZJJ1jxt+56ZXeWoNF69JAaM7ajS
ecLU6uaOjRvy7gDLBhVQFFpgZv90qt8SDMRe+YkAsDI5Zd6GFuqs7cMVOu9Z1a+go4NV
/MYMJYk/YW00rBhC3Zo71EWTN8aUlFjzKFDHuwFJrmFoqWCgTpk3O200HOrmJyBVLnJT
+S7A==
X-Forwarded-Encrypted: i=2;
AJvYcCW0bsZt4icCVB1IDTuSSLM89Jn+sT8mTerMVeOnogVyVx9ZgVqKDA0CefXa8H9jWOQ9Qw/3A9etmlx9nPfM@patchwork.amarulasolutions.com
X-Gm-Message-State: AOJu0Yx77M0ACq2iRs1v76LvhE/oJpuMuJPEtadXQ3AevetRtciEqmkd
ZA9QfWzbjdAMxfuAscP//Z0pyajsb3/IkN2CYm9JdIP65dcmnyXl+SBwNSm04woEY4ahgw06h0C
BCg==
X-Received: by 2002:a05:600c:1d19:b0:483:a2db:6743 with SMTP id
5b1f17b1804b1-483a2db6aabmr23086285e9.4.1771523532559;
Thu, 19 Feb 2026 09:52:12 -0800 (PST)
X-BeenThere: linux-amarula@amarulasolutions.com;
h="AV1CL+Fy+a6Ejc0R4AbbCn/LOWh5htrrKuWPk+/fJzwljaEKIQ=="
Received: by 2002:a05:6000:2c12:b0:42b:52c4:6656 with SMTP id
ffacd0b85a97d-4378f228c49ls6723803f8f.2.-pod-prod-03-eu; Thu, 19 Feb 2026
09:52:10 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AJvYcCUczAIXUAh+9nJRb4Ydm7kHDywWxxPMkBLFz65UqYF79lClDXrb7PfzINIInIqGW4QYqN59PbODgFliUqrN@amarulasolutions.com
X-Received: by 2002:a05:600c:1991:b0:480:2521:4d92 with SMTP id
5b1f17b1804b1-483710858bcmr408271695e9.24.1771523530338;
Thu, 19 Feb 2026 09:52:10 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1771523530; cv=none;
d=google.com; s=arc-20240605;
b=JLWgG06OU3JaDOMvFNTnPCSrMmYTM6f3bgbBF4JD3Zp+72DiJ+Vp3HIqYwuqZQZxv/
LhO+meyd1Z4ybyqU2lg9XyqiHjDoX4fESV6mupH3DQhphEp/H2GB1jwnZVcDSUNBVunn
1XZFdjOTRBsHChZLuDW7JLvl53cCUfpbhBfMwytxoAQzoTpH/POVDT3Kb+CD3alxdoo/
efcA5GQToV5meA3vNrm8KT9b6EXzcccMHsfP2rExIY7/9XMqbgbOjKO/49ORiy5Mqi5N
lENT/9aCVGtFFiuiqnTdXn5LWLRvaTdI6Da+RFapuGwU7UZ5Jo0Ha5AwQ0Fl3PcQdw6y
F5jw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20240605;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=VXul22mgOqTPFmE2l0Bw7pi4t5Fuo2IMZYSpgl/+DvU=;
fh=XDCuK3ft5W5N36HRfLq0yIlgVKTn4RElKErzz3TeWFo=;
b=TBYaFj9YJQrIRGOLPuOkpIypHAVTMewW8tcbPkKCRobLpDdAHmQwZltwjL7Psuzx17
ovXu+HEYTQgyhfpvzjXwe41YBXvN48K3uAkIMu5n6zvpGRKwKvTuw0bzcVItyt7p38eo
5ZLyvdBVJQK6v8ox4mxxiZbdz9be/K6qh5/wyCM4/CQZNM/tWpVTA6eM8u+/Eyts7tA4
uEsle2didHr8W7EVfFI/pAfEknnBDtNxXrkb8Qurx4o0SKMfcXT2a7SOOkRZk6mYM8qT
GwbTZAwS3XDwN+I4+enKe3hxBmUto0JwABuVOREjf3FeZbZFbCyArCX/DV+c/1tIcT+i
iNvg==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b=qeY6nU9y;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.65 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Received: from mail-sor-f65.google.com (mail-sor-f65.google.com.
[209.85.220.65])
by mx.google.com with SMTPS id
5b1f17b1804b1-483703bfd04sor20256855e9.19.2026.02.19.09.52.10
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Thu, 19 Feb 2026 09:52:10 -0800 (PST)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65;
X-Forwarded-Encrypted: i=1;
AJvYcCWpPzp0we9pIcJDVa8h71lb2AlTjR/37KVeKjrK5wSDtzUJQ4D9AlstaiBZSTJsz+vN7yWQNo8o9Mci/6oh@amarulasolutions.com
X-Gm-Gg: AZuq6aLhEKqhcDQPZlW2fysuFrEwTcEBF+7kTwS3HkP7iNqa00GKfHJJsQvHMKju/jm
EGYICwnnhWkcMlBp1bOYgWB4ufleeRTjpxnma1bGYHV9AreQLA1fvsFwGTDBFKmA+FX8QvKboMv
qOVHs/GemLCiBu4gJTnzC9hwbViHxNuXeLaoV/qKL4bCKStdw9eZuE3wicxzKVuPxnI/Y21aMwy
KlqwMxOgiAyXciPeUEndwhQYKGBQfkbkyV1FHeBX0Bn/4T5sMLz3CkCfxdfwcJsmZqe9yOjzJYV
RYN+obwJ4qR8RZDyHWn1Bt6NmkAv9l/EuwEiyIgTRqt5y0Bi0XJeKmaT2cplk40ogTIETossp7q
vqAG06GUDogn4q/rECuFX7ZdH+G6WIsdcoldsAsOdcWQu0eybduMsSlSx7S9LIfzJ6QbluVBMsK
hL3A6X1B2VOx130aJnASCleI+5HAqQ22kDshjuxh50YPgENfpzRk/9dLwxvO6IC5kCFN/5yvUJ4
WG76NsEr7Bmw9hCaKDrq8kIbp/kzwSp1Z50czY5SqxNIwTekxYiWToZOwQXO30RAKYoldzAjLa2
I2ybCesAv0zq4AK9pdOycWTM
X-Received: by 2002:a05:600c:6912:b0:483:709e:f22d with SMTP id
5b1f17b1804b1-4837108fc46mr374253345e9.27.1771523529890;
Thu, 19 Feb 2026 09:52:09 -0800 (PST)
Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it
(host-95-248-31-95.retail.telecomitalia.it. [95.248.31.95])
by smtp.gmail.com with ESMTPSA id
5b1f17b1804b1-483a31b0e63sm35485005e9.2.2026.02.19.09.52.04
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Thu, 19 Feb 2026 09:52:09 -0800 (PST)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: u-boot@lists.denx.de
Cc: Patrice Chotard <patrice.chotard@foss.st.com>,
linux-amarula@amarulasolutions.com,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Tom Rini <trini@konsulko.com>,
uboot-stm32@st-md-mailman.stormreply.com
Subject: [PATCH 5/8] spi: stm32: clean up buffer length assignment
Date: Thu, 19 Feb 2026 18:51:16 +0100
Message-ID: <20260219175130.2839234-6-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20260219175130.2839234-1-dario.binacchi@amarulasolutions.com>
References: <20260219175130.2839234-1-dario.binacchi@amarulasolutions.com>
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b=qeY6nU9y;
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.65 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
|
| Related |
show
|
diff --git a/drivers/spi/stm32_spi.c b/drivers/spi/stm32_spi.c index a1f31cf653c7..adba97915cd3 100644 --- a/drivers/spi/stm32_spi.c +++ b/drivers/spi/stm32_spi.c @@ -404,8 +404,8 @@ static int stm32_spi_xfer(struct udevice *slave, unsigned int bitlen, priv->tx_buf = dout; priv->rx_buf = din; - priv->tx_len = priv->tx_buf ? bitlen / 8 : 0; - priv->rx_len = priv->rx_buf ? bitlen / 8 : 0; + priv->tx_len = priv->tx_buf ? xferlen : 0; + priv->rx_len = priv->rx_buf ? xferlen : 0; mode = SPI_FULL_DUPLEX; if (!priv->tx_buf)
Remove redundant divisions by using the already available xferlen variable for setting the rx/tx buffer lengths. Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com> --- drivers/spi/stm32_spi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)