]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
atm: remove the unused pre_send and send_bh device operations
authorJakub Kicinski <kuba@kernel.org>
Mon, 15 Jun 2026 19:44:14 +0000 (12:44 -0700)
committerJakub Kicinski <kuba@kernel.org>
Tue, 16 Jun 2026 15:53:52 +0000 (08:53 -0700)
atmdev_ops::pre_send (a TX pre-processing hook) and ::send_bh (a
bottom-half capable send variant) have no implementation behind them:
no remaining ATM driver sets either, so vcc_sendmsg() always skipped
pre_send and the raw AAL0/AAL5 paths always fell back to ->send().
The drivers that used these hooks were removed with the legacy ATM
adapters.

Drop both operations and the dead branches that tested for them.

Link: https://patch.msgid.link/20260615194416.752559-8-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/atmdev.h
net/atm/common.c
net/atm/raw.c

index 218c05f2ec540d9766193fa5e61dfe32c15d09c6..96ce36e022474b912eaf5853b79647a47edb0b1a 100644 (file)
@@ -137,9 +137,7 @@ struct atmdev_ops { /* only send is required */
        int (*compat_ioctl)(struct atm_dev *dev,unsigned int cmd,
                            void __user *arg);
 #endif
-       int (*pre_send)(struct atm_vcc *vcc, struct sk_buff *skb);
        int (*send)(struct atm_vcc *vcc,struct sk_buff *skb);
-       int (*send_bh)(struct atm_vcc *vcc, struct sk_buff *skb);
        void (*phy_put)(struct atm_dev *dev,unsigned char value,
            unsigned long addr);
        unsigned char (*phy_get)(struct atm_dev *dev,unsigned long addr);
index 44a0179d458681c9ba8e25cf1cfeb6f8a05b9c77..654cbe3c855e1da0fa850620c3699be54deb21dd 100644 (file)
@@ -626,12 +626,6 @@ int vcc_sendmsg(struct socket *sock, struct msghdr *m, size_t size)
        if (eff != size)
                memset(skb->data + size, 0, eff-size);
 
-       if (vcc->dev->ops->pre_send) {
-               error = vcc->dev->ops->pre_send(vcc, skb);
-               if (error)
-                       goto free_skb;
-       }
-
        error = vcc->dev->ops->send(vcc, skb);
        error = error ? error : size;
 out:
index 1d6ac7b0c4e5a9d8640cdb1779fafb716f1c6685..87d136c7554b4adc26c54ec6f5a5e69917469a75 100644 (file)
@@ -54,8 +54,6 @@ static int atm_send_aal0(struct atm_vcc *vcc, struct sk_buff *skb)
                kfree_skb(skb);
                return -EADDRNOTAVAIL;
        }
-       if (vcc->dev->ops->send_bh)
-               return vcc->dev->ops->send_bh(vcc, skb);
        return vcc->dev->ops->send(vcc, skb);
 }
 
@@ -71,10 +69,7 @@ int atm_init_aal5(struct atm_vcc *vcc)
 {
        vcc->push = atm_push_raw;
        vcc->pop = atm_pop_raw;
-       if (vcc->dev->ops->send_bh)
-               vcc->send = vcc->dev->ops->send_bh;
-       else
-               vcc->send = vcc->dev->ops->send;
+       vcc->send = vcc->dev->ops->send;
        return 0;
 }
 EXPORT_SYMBOL(atm_init_aal5);