]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: macb: apply reverse christmas tree in macb_tx_map()
authorThéo Lebrun <theo.lebrun@bootlin.com>
Tue, 14 Oct 2025 15:25:15 +0000 (17:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Oct 2025 23:59:28 +0000 (16:59 -0700)
The arguments grew over time; follow conventions and apply reverse
christmas tree (RCT).

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
Link: https://patch.msgid.link/20251014-macb-cleanup-v1-14-31cd266e22cd@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/cadence/macb_main.c

index dd3b13fa304715b4629c20120a908262af106a2d..e15fcdd43d778c685dbb927386904362b8dba8b9 100644 (file)
@@ -1988,14 +1988,14 @@ static unsigned int macb_tx_map(struct macb *bp,
                                struct sk_buff *skb,
                                unsigned int hdrlen)
 {
-       dma_addr_t mapping;
+       unsigned int f, nr_frags = skb_shinfo(skb)->nr_frags;
        unsigned int len, i, tx_head = queue->tx_head;
+       u32 ctrl, lso_ctrl = 0, seq_ctrl = 0;
+       unsigned int eof = 1, mss_mfs = 0;
        struct macb_tx_skb *tx_skb = NULL;
        struct macb_dma_desc *desc;
        unsigned int offset, size;
-       unsigned int f, nr_frags = skb_shinfo(skb)->nr_frags;
-       unsigned int eof = 1, mss_mfs = 0;
-       u32 ctrl, lso_ctrl = 0, seq_ctrl = 0;
+       dma_addr_t mapping;
 
        /* LSO */
        if (skb_shinfo(skb)->gso_size != 0) {