Skip to contentSkip to conversation

wifi: wilc1000: remove setting msg.spi

PATCH Superseded David Lechner 2 participants 3 messages Jan 23, 2024 – Feb 1, 2024 Microchip WILC1000 wifi driver

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 wifi: wilc1000: remove setting msg.spi

(spi_message_add_tail() does not access this field.)

---
 drivers/net/wireless/microchip/wilc1000/spi.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/wireless/microchip/wilc1000/spi.c +0 -4
index 77b4cdff73c3..7eb0f8a421a3 100644
@@ -300,7 +300,6 @@ static int wilc_spi_tx(struct wilc *wilc, u8 *b, u32 len)
 
 		memset(&msg, 0, sizeof(msg));
 		spi_message_init(&msg);
-		msg.spi = spi;
 		spi_message_add_tail(&tr, &msg);
 
 		ret = spi_sync(spi, &msg);
@@ -343,7 +342,6 @@ static int wilc_spi_rx(struct wilc *wilc, u8 *rb, u32 rlen)
 
 		memset(&msg, 0, sizeof(msg));
 		spi_message_init(&msg);
-		msg.spi = spi;
 		spi_message_add_tail(&tr, &msg);
 
 		ret = spi_sync(spi, &msg);
@@ -381,8 +379,6 @@ static int wilc_spi_tx_rx(struct wilc *wilc, u8 *wb, u8 *rb, u32 rlen)
 
 		memset(&msg, 0, sizeof(msg));
 		spi_message_init(&msg);
-		msg.spi = spi;
-
 		spi_message_add_tail(&tr, &msg);
 		ret = spi_sync(spi, &msg);
 		if (ret < 0)
Signature · 1 line
2.43.0
#1 lore raw
Quoted 1 line · David Lechner

Not sure what happened with git send-email, but most of the commit message seems to have disappeared. This should have included the following:

```
Calling spi_sync() unconditionally sets the spi field of struct
spi_message. Therefore setting msg.spi = spi before calling spi_sync()
has no effect and can be removed.
```

I can resend if there are no further comments.

Quoted 39 lines

(spi_message_add_tail() does not access this field.)

---
 drivers/net/wireless/microchip/wilc1000/spi.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/net/wireless/microchip/wilc1000/spi.c +0 -5
index 77b4cdff73c3..7eb0f8a421a3 100644
@@ -300,7 +300,6 @@ static int wilc_spi_tx(struct wilc *wilc, u8 *b, u32 len)
 
                memset(&msg, 0, sizeof(msg));
                spi_message_init(&msg);
-               msg.spi = spi;
                spi_message_add_tail(&tr, &msg);
 
                ret = spi_sync(spi, &msg);
@@ -343,7 +342,6 @@ static int wilc_spi_rx(struct wilc *wilc, u8 *rb, u32 rlen)
 
                memset(&msg, 0, sizeof(msg));
                spi_message_init(&msg);
-               msg.spi = spi;
                spi_message_add_tail(&tr, &msg);
 
                ret = spi_sync(spi, &msg);
@@ -381,8 +379,6 @@ static int wilc_spi_tx_rx(struct wilc *wilc, u8 *wb, u8 *rb, u32 rlen)
 
                memset(&msg, 0, sizeof(msg));
                spi_message_init(&msg);
-               msg.spi = spi;
-
                spi_message_add_tail(&tr, &msg);
                ret = spi_sync(spi, &msg);
                if (ret < 0)
--

2.43.0