u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: mxc_spi: remove redundant code in spi_xchg_single()
@ 2021-11-06 10:03 li.haolin
  2022-01-15 14:15 ` Fabio Estevam
  0 siblings, 1 reply; 3+ messages in thread
From: li.haolin @ 2021-11-06 10:03 UTC (permalink / raw)
  To: u-boot; +Cc: jagan, Haolin Li

From: Haolin Li <li.haolin@qq.com>

The value of cnt is overwritten without being used.

Signed-off-by: Haolin Li <li.haolin@qq.com>
---
 drivers/spi/mxc_spi.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c
index 3c53de165d..5adfdf8b5f 100644
--- a/drivers/spi/mxc_spi.c
+++ b/drivers/spi/mxc_spi.c
@@ -391,8 +391,6 @@ int spi_xchg_single(struct mxc_spi_slave *mxcs, unsigned int bitlen,
 
 	nbytes = DIV_ROUND_UP(bitlen, 8);
 
-	cnt = nbytes % 32;
-
 	if (bitlen % 32) {
 		data = reg_read(&regs->rxdata);
 		cnt = (bitlen % 32) / 8;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] spi: mxc_spi: remove redundant code in spi_xchg_single()
  2021-11-06 10:03 [PATCH] spi: mxc_spi: remove redundant code in spi_xchg_single() li.haolin
@ 2022-01-15 14:15 ` Fabio Estevam
  0 siblings, 0 replies; 3+ messages in thread
From: Fabio Estevam @ 2022-01-15 14:15 UTC (permalink / raw)
  To: li.haolin; +Cc: U-Boot-Denx, Jagan Teki

On Sat, Nov 6, 2021 at 12:11 PM <li.haolin@qq.com> wrote:
>
> From: Haolin Li <li.haolin@qq.com>
>
> The value of cnt is overwritten without being used.
>
> Signed-off-by: Haolin Li <li.haolin@qq.com>

Reviewed-by: Fabio Estevam <festevam@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] spi: mxc_spi: remove redundant code in spi_xchg_single()
@ 2022-02-05 16:42 sbabic
  0 siblings, 0 replies; 3+ messages in thread
From: sbabic @ 2022-02-05 16:42 UTC (permalink / raw)
  To: li.haolin, u-boot

> From: Haolin Li <li.haolin@qq.com>
> The value of cnt is overwritten without being used.
> Signed-off-by: Haolin Li <li.haolin@qq.com>
> Reviewed-by: Fabio Estevam <festevam@gmail.com>
Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

-- 
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-02-05 16:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-06 10:03 [PATCH] spi: mxc_spi: remove redundant code in spi_xchg_single() li.haolin
2022-01-15 14:15 ` Fabio Estevam
2022-02-05 16:42 sbabic

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).