]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
net: wan/fsl_ucc_hdlc: cleanup ucc_hdlc_poll
authorTomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Thu, 26 Mar 2026 10:02:32 +0000 (11:02 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sun, 29 Mar 2026 21:21:35 +0000 (14:21 -0700)
Immediately after setting to 0 we are adding to it, and subtracting 0
from budget. Replace with just assignment and no subtraction.

Signed-off-by: Tomas Alvarez Vanoli <tomas.alvarez-vanoli@hitachienergy.com>
Reviewed-by: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Link: https://patch.msgid.link/20260326100232.904289-1-tomas.alvarez-vanoli@hitachienergy.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wan/fsl_ucc_hdlc.c

index b72ab9951875e66839340c668181468b6d7422f2..3bd57527b1be63eded1900c40ab60c54ba7aaf5e 100644 (file)
@@ -628,8 +628,7 @@ static int ucc_hdlc_poll(struct napi_struct *napi, int budget)
        hdlc_tx_done(priv);
        spin_unlock(&priv->lock);
 
-       howmany = 0;
-       howmany += hdlc_rx_done(priv, budget - howmany);
+       howmany = hdlc_rx_done(priv, budget);
 
        if (howmany < budget) {
                napi_complete_done(napi, howmany);