Skip to contentSkip to conversation

Removal of unnecessary cast

PATCH In review Andrew Mbugua 3 participants 3 messages Oct 14, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Removal of unnecessary cast

---
 drivers/net/xen-netback/netback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
index 5836995d6774..35801828c78b 100644
@@ -1294,7 +1294,7 @@ static void xenvif_zerocopy_callback(struct sk_buff *skb,
 	spin_lock_irqsave(&queue->callback_lock, flags);
 	do {
 		u16 pending_idx = ubuf->desc;
-		ubuf = (struct ubuf_info_msgzc *) ubuf->ctx;
+		ubuf = ubuf->ctx;
 		BUG_ON(queue->dealloc_prod - queue->dealloc_cons >=
 			MAX_PENDING_REQS);
 		index = pending_index(queue->dealloc_prod);
Signature · 1 line
2.43.0
#1 lore raw

Hello Andrew!

Quoted 1 line · Andrew Mbugua

---

It looks like your change is missing a change description. This usually contains a short explaination on why the change in the patch makes sense (i.e. here why the cast can be dropped).

Your patch is also missing the Developers Certificate of origin, i.e. the "Signed-off-by: ..." line which checkpatch.pl also complains about:

    $ ./scripts/checkpatch.pl --git HEAD
    WARNING: Missing commit description - Add an appropriate one
    ERROR: Missing Signed-off-by: line(s)

All of this is covered by the [submitting patches docs][1], so before sending another revision of your change maybe go through this.

Cheers,
Chris

[1]: https://docs.kernel.org/process/submitting-patches.html

Quoted 18 lines
 drivers/net/xen-netback/netback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/xen-netback/netback.c +1 -1
index 5836995d6774..35801828c78b 100644
@@ -1294,7 +1294,7 @@ static void xenvif_zerocopy_callback(struct sk_buff *skb,
 	spin_lock_irqsave(&queue->callback_lock, flags);
 	do {
 		u16 pending_idx = ubuf->desc;
-		ubuf = (struct ubuf_info_msgzc *) ubuf->ctx;
+		ubuf = ubuf->ctx;
 		BUG_ON(queue->dealloc_prod - queue->dealloc_cons >=
 			MAX_PENDING_REQS);
 		index = pending_index(queue->dealloc_prod);
Signature · 1 line
2.43.0
#2 lore raw

Yes, and the subject needs to be fixed as well. This is networking and they have specific rules. You'd need to put net-next in the subject since it's not a bugfix.

[PATCH net-next] net/xen-netback: remove unnecessary cast

Also when you resend, include all the people from ./scripts/get_maintainer.pl. You may as well not count it as a v2 because no one how matters will see this version of the patch and calling it a v2 will only be confusing.

regards,
dan carpenter