imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void cbq_destroy_class(struct Qdisc *sch, struct cbq_class *cl) {
   struct cbq_sched_data *q = qdisc_priv(sch);
   WARN_ON(cl->filters);
   tcf_block_put(cl->block);
-  qdisc_destroy(cl->q);
+  qdisc_put(cl->q);
   qdisc_put_rtab(cl->R_tab);
   gen_kill_estimator(&cl->rate_est);
   if (cl != &q->link) kfree(cl);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void cbs_destroy(struct Qdisc *sch) {
   struct cbs_sched_data *q = qdisc_priv(sch);
   struct net_device *dev = qdisc_dev(sch);
   qdisc_watchdog_cancel(&q->watchdog);
   cbs_disable_offload(dev, q);
-  if (q->qdisc) qdisc_destroy(q->qdisc);
+  if (q->qdisc) qdisc_put(q->qdisc);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,59 +1,59 @@
 static int drr_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **tca, unsigned long *arg, struct netlink_ext_ack *extack) {
   struct drr_sched *q = qdisc_priv(sch);
   struct drr_class *cl = (struct drr_class *)*arg;
   struct nlattr *opt = tca[TCA_OPTIONS];
   struct nlattr *tb[TCA_DRR_MAX + 1];
   u32 quantum;
   int err;
   if (!opt) {
     NL_SET_ERR_MSG(extack, "DRR options are required for this operation");
     return -EINVAL;
   }
   err = nla_parse_nested(tb, TCA_DRR_MAX, opt, drr_policy, extack);
   if (err < 0) return err;
   if (tb[TCA_DRR_QUANTUM]) {
     quantum = nla_get_u32(tb[TCA_DRR_QUANTUM]);
     if (quantum == 0) {
       NL_SET_ERR_MSG(extack, "Specified DRR quantum cannot be zero");
       return -EINVAL;
     }
   } else
     quantum = psched_mtu(qdisc_dev(sch));
   if (cl != NULL) {
     if (tca[TCA_RATE]) {
       err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, qdisc_root_sleeping_running(sch), tca[TCA_RATE]);
       if (err) {
         NL_SET_ERR_MSG(extack, "Failed to replace estimator");
         return err;
       }
     }
     sch_tree_lock(sch);
     if (tb[TCA_DRR_QUANTUM]) cl->quantum = quantum;
     sch_tree_unlock(sch);
     return 0;
   }
   cl = kzalloc(sizeof(struct drr_class), GFP_KERNEL);
   if (cl == NULL) return -ENOBUFS;
   cl->common.classid = classid;
   cl->quantum = quantum;
   cl->qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, classid, NULL);
   if (cl->qdisc == NULL)
     cl->qdisc = &noop_qdisc;
   else
     qdisc_hash_add(cl->qdisc, true);
   if (tca[TCA_RATE]) {
     err = gen_replace_estimator(&cl->bstats, NULL, &cl->rate_est, NULL, qdisc_root_sleeping_running(sch), tca[TCA_RATE]);
     if (err) {
       NL_SET_ERR_MSG(extack, "Failed to replace estimator");
-      qdisc_destroy(cl->qdisc);
+      qdisc_put(cl->qdisc);
       kfree(cl);
       return err;
     }
   }
   sch_tree_lock(sch);
   qdisc_class_hash_insert(&q->clhash, &cl->common);
   sch_tree_unlock(sch);
   qdisc_class_hash_grow(sch, &q->clhash);
   *arg = (unsigned long)cl;
   return 0;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void drr_destroy_class(struct Qdisc *sch, struct drr_class *cl) {
   gen_kill_estimator(&cl->rate_est);
-  qdisc_destroy(cl->qdisc);
+  qdisc_put(cl->qdisc);
   kfree(cl);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void dsmark_destroy(struct Qdisc *sch) {
   struct dsmark_qdisc_data *p = qdisc_priv(sch);
   pr_debug("%s(sch %p,[qdisc %p])\n", __func__, sch, p);
   tcf_block_put(p->block);
-  qdisc_destroy(p->q);
+  qdisc_put(p->q);
   if (p->mv != p->embedded) kfree(p->mv);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,13 +1,13 @@
 struct Qdisc *fifo_create_dflt(struct Qdisc *sch, struct Qdisc_ops *ops, unsigned int limit, struct netlink_ext_ack *extack) {
   struct Qdisc *q;
   int err = -ENOMEM;
   q = qdisc_create_dflt(sch->dev_queue, ops, TC_H_MAKE(sch->handle, 1), extack);
   if (q) {
     err = fifo_set_limit(q, limit);
     if (err < 0) {
-      qdisc_destroy(q);
+      qdisc_put(q);
       q = NULL;
     }
   }
   return q ?: ERR_PTR(err);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,7 +1,7 @@
 void dev_shutdown(struct net_device *dev) {
   netdev_for_each_tx_queue(dev, shutdown_scheduler_queue, &noop_qdisc);
   if (dev_ingress_queue(dev)) shutdown_scheduler_queue(dev, dev_ingress_queue(dev), &noop_qdisc);
-  qdisc_destroy(dev->qdisc);
+  qdisc_put(dev->qdisc);
   dev->qdisc = &noop_qdisc;
   WARN_ON(timer_pending(&dev->watchdog_timer));
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,16 +1,16 @@
 struct Qdisc *qdisc_create_dflt(struct netdev_queue *dev_queue, const struct Qdisc_ops *ops, unsigned int parentid, struct netlink_ext_ack *extack) {
   struct Qdisc *sch;
   if (!try_module_get(ops->owner)) {
     NL_SET_ERR_MSG(extack, "Failed to increase module reference counter");
     return NULL;
   }
   sch = qdisc_alloc(dev_queue, ops, extack);
   if (IS_ERR(sch)) {
     module_put(ops->owner);
     return NULL;
   }
   sch->parent = parentid;
   if (!ops->init || ops->init(sch, NULL, extack) == 0) return sch;
-  qdisc_destroy(sch);
+  qdisc_put(sch);
   return NULL;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void shutdown_scheduler_queue(struct net_device *dev, struct netdev_queue *dev_queue, void *_qdisc_default) {
   struct Qdisc *qdisc = dev_queue->qdisc_sleeping;
   struct Qdisc *qdisc_default = _qdisc_default;
   if (qdisc) {
     rcu_assign_pointer(dev_queue->qdisc, qdisc_default);
     dev_queue->qdisc_sleeping = qdisc_default;
-    qdisc_destroy(qdisc);
+    qdisc_put(qdisc);
   }
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void hfsc_destroy_class(struct Qdisc *sch, struct hfsc_class *cl) {
   struct hfsc_sched *q = qdisc_priv(sch);
   tcf_block_put(cl->block);
-  qdisc_destroy(cl->qdisc);
+  qdisc_put(cl->qdisc);
   gen_kill_estimator(&cl->rate_est);
   if (cl != &q->root) kfree(cl);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,9 +1,9 @@
 static void htb_destroy_class(struct Qdisc *sch, struct htb_class *cl) {
   if (!cl->level) {
     WARN_ON(!cl->leaf.q);
-    qdisc_destroy(cl->leaf.q);
+    qdisc_put(cl->leaf.q);
   }
   gen_kill_estimator(&cl->rate_est);
   tcf_block_put(cl->block);
   kfree(cl);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,16 +1,16 @@
 static void mq_attach(struct Qdisc *sch) {
   struct net_device *dev = qdisc_dev(sch);
   struct mq_sched *priv = qdisc_priv(sch);
   struct Qdisc *qdisc, *old;
   unsigned int ntx;
   for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
     qdisc = priv->qdiscs[ntx];
     old = dev_graft_qdisc(qdisc->dev_queue, qdisc);
-    if (old) qdisc_destroy(old);
+    if (old) qdisc_put(old);
 #ifdef CONFIG_NET_SCHED
     if (ntx < dev->real_num_tx_queues) qdisc_hash_add(qdisc, false);
 #endif
   }
   kfree(priv->qdiscs);
   priv->qdiscs = NULL;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,10 +1,10 @@
 static void mq_destroy(struct Qdisc *sch) {
   struct net_device *dev = qdisc_dev(sch);
   struct mq_sched *priv = qdisc_priv(sch);
   unsigned int ntx;
   mq_offload(sch, TC_MQ_DESTROY);
   if (!priv->qdiscs) return;
   for (ntx = 0; ntx < dev->num_tx_queues && priv->qdiscs[ntx]; ntx++)
-    qdisc_destroy(priv->qdiscs[ntx]);
+    qdisc_put(priv->qdiscs[ntx]);
   kfree(priv->qdiscs);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,15 +1,15 @@
 static void mqprio_attach(struct Qdisc *sch) {
   struct net_device *dev = qdisc_dev(sch);
   struct mqprio_sched *priv = qdisc_priv(sch);
   struct Qdisc *qdisc, *old;
   unsigned int ntx;
   /* Attach underlying qdisc */
   for (ntx = 0; ntx < dev->num_tx_queues; ntx++) {
     qdisc = priv->qdiscs[ntx];
     old = dev_graft_qdisc(qdisc->dev_queue, qdisc);
-    if (old) qdisc_destroy(old);
+    if (old) qdisc_put(old);
     if (ntx < dev->real_num_tx_queues) qdisc_hash_add(qdisc, false);
   }
   kfree(priv->qdiscs);
   priv->qdiscs = NULL;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,20 +1,20 @@
 static void mqprio_destroy(struct Qdisc *sch) {
   struct net_device *dev = qdisc_dev(sch);
   struct mqprio_sched *priv = qdisc_priv(sch);
   unsigned int ntx;
   if (priv->qdiscs) {
     for (ntx = 0; ntx < dev->num_tx_queues && priv->qdiscs[ntx]; ntx++)
-      qdisc_destroy(priv->qdiscs[ntx]);
+      qdisc_put(priv->qdiscs[ntx]);
     kfree(priv->qdiscs);
   }
   if (priv->hw_offload && dev->netdev_ops->ndo_setup_tc) {
     struct tc_mqprio_qopt_offload mqprio = {{0}};
     switch (priv->mode) {
     case TC_MQPRIO_MODE_DCB:
     case TC_MQPRIO_MODE_CHANNEL: dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_MQPRIO, &mqprio); break;
     default: return;
     }
   } else {
     netdev_set_num_tc(dev, 0);
   }
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,8 +1,8 @@
 static void multiq_destroy(struct Qdisc *sch) {
   int band;
   struct multiq_sched_data *q = qdisc_priv(sch);
   tcf_block_put(q->block);
   for (band = 0; band < q->bands; band++)
-    qdisc_destroy(q->queues[band]);
+    qdisc_put(q->queues[band]);
   kfree(q->queues);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,38 +1,38 @@
 static int multiq_tune(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) {
   struct multiq_sched_data *q = qdisc_priv(sch);
   struct tc_multiq_qopt *qopt;
   int i;
   if (!netif_is_multiqueue(qdisc_dev(sch))) return -EOPNOTSUPP;
   if (nla_len(opt) < sizeof(*qopt)) return -EINVAL;
   qopt = nla_data(opt);
   qopt->bands = qdisc_dev(sch)->real_num_tx_queues;
   sch_tree_lock(sch);
   q->bands = qopt->bands;
   for (i = q->bands; i < q->max_bands; i++) {
     if (q->queues[i] != &noop_qdisc) {
       struct Qdisc *child = q->queues[i];
       q->queues[i] = &noop_qdisc;
       qdisc_tree_reduce_backlog(child, child->q.qlen, child->qstats.backlog);
-      qdisc_destroy(child);
+      qdisc_put(child);
     }
   }
   sch_tree_unlock(sch);
   for (i = 0; i < q->bands; i++) {
     if (q->queues[i] == &noop_qdisc) {
       struct Qdisc *child, *old;
       child = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, TC_H_MAKE(sch->handle, i + 1), extack);
       if (child) {
         sch_tree_lock(sch);
         old = q->queues[i];
         q->queues[i] = child;
         if (child != &noop_qdisc) qdisc_hash_add(child, true);
         if (old != &noop_qdisc) {
           qdisc_tree_reduce_backlog(old, old->q.qlen, old->qstats.backlog);
-          qdisc_destroy(old);
+          qdisc_put(old);
         }
         sch_tree_unlock(sch);
       }
     }
   }
   return 0;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void netem_destroy(struct Qdisc *sch) {
   struct netem_sched_data *q = qdisc_priv(sch);
   qdisc_watchdog_cancel(&q->watchdog);
-  if (q->qdisc) qdisc_destroy(q->qdisc);
+  if (q->qdisc) qdisc_put(q->qdisc);
   dist_free(q->delay_dist);
   dist_free(q->slot_dist);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,8 +1,8 @@
 static void prio_destroy(struct Qdisc *sch) {
   int prio;
   struct prio_sched_data *q = qdisc_priv(sch);
   tcf_block_put(q->block);
   prio_offload(sch, NULL);
   for (prio = 0; prio < q->bands; prio++)
-    qdisc_destroy(q->queues[prio]);
+    qdisc_put(q->queues[prio]);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,36 +1,36 @@
 static int prio_tune(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) {
   struct prio_sched_data *q = qdisc_priv(sch);
   struct Qdisc *queues[TCQ_PRIO_BANDS];
   int oldbands = q->bands, i;
   struct tc_prio_qopt *qopt;
   if (nla_len(opt) < sizeof(*qopt)) return -EINVAL;
   qopt = nla_data(opt);
   if (qopt->bands > TCQ_PRIO_BANDS || qopt->bands < 2) return -EINVAL;
   for (i = 0; i <= TC_PRIO_MAX; i++) {
     if (qopt->priomap[i] >= qopt->bands) return -EINVAL;
   }
   /* Before commit, make sure we can allocate all new qdiscs */
   for (i = oldbands; i < qopt->bands; i++) {
     queues[i] = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops, TC_H_MAKE(sch->handle, i + 1), extack);
     if (!queues[i]) {
       while (i > oldbands)
-        qdisc_destroy(queues[--i]);
+        qdisc_put(queues[--i]);
       return -ENOMEM;
     }
   }
   prio_offload(sch, qopt);
   sch_tree_lock(sch);
   q->bands = qopt->bands;
   memcpy(q->prio2band, qopt->priomap, TC_PRIO_MAX + 1);
   for (i = q->bands; i < oldbands; i++) {
     struct Qdisc *child = q->queues[i];
     qdisc_tree_reduce_backlog(child, child->q.qlen, child->qstats.backlog);
-    qdisc_destroy(child);
+    qdisc_put(child);
   }
   for (i = oldbands; i < q->bands; i++) {
     q->queues[i] = queues[i];
     if (q->queues[i] != &noop_qdisc) qdisc_hash_add(q->queues[i], true);
   }
   sch_tree_unlock(sch);
   return 0;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void qfq_destroy_class(struct Qdisc *sch, struct qfq_class *cl) {
   struct qfq_sched *q = qdisc_priv(sch);
   qfq_rm_from_agg(q, cl);
   gen_kill_estimator(&cl->rate_est);
-  qdisc_destroy(cl->qdisc);
+  qdisc_put(cl->qdisc);
   kfree(cl);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,37 +1,37 @@
 static int red_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) {
   struct red_sched_data *q = qdisc_priv(sch);
   struct nlattr *tb[TCA_RED_MAX + 1];
   struct tc_red_qopt *ctl;
   struct Qdisc *child = NULL;
   int err;
   u32 max_P;
   if (opt == NULL) return -EINVAL;
   err = nla_parse_nested(tb, TCA_RED_MAX, opt, red_policy, NULL);
   if (err < 0) return err;
   if (tb[TCA_RED_PARMS] == NULL || tb[TCA_RED_STAB] == NULL) return -EINVAL;
   max_P = tb[TCA_RED_MAX_P] ? nla_get_u32(tb[TCA_RED_MAX_P]) : 0;
   ctl = nla_data(tb[TCA_RED_PARMS]);
   if (!red_check_params(ctl->qth_min, ctl->qth_max, ctl->Wlog)) return -EINVAL;
   if (ctl->limit > 0) {
     child = fifo_create_dflt(sch, &bfifo_qdisc_ops, ctl->limit, extack);
     if (IS_ERR(child)) return PTR_ERR(child);
     /* child is fifo, no need to check for noop_qdisc */
     qdisc_hash_add(child, true);
   }
   sch_tree_lock(sch);
   q->flags = ctl->flags;
   q->limit = ctl->limit;
   if (child) {
     qdisc_tree_reduce_backlog(q->qdisc, q->qdisc->q.qlen, q->qdisc->qstats.backlog);
-    qdisc_destroy(q->qdisc);
+    qdisc_put(q->qdisc);
     q->qdisc = child;
   }
   red_set_parms(&q->parms, ctl->qth_min, ctl->qth_max, ctl->Wlog, ctl->Plog, ctl->Scell_log, nla_data(tb[TCA_RED_STAB]), max_P);
   red_set_vars(&q->vars);
   del_timer(&q->adapt_timer);
   if (ctl->flags & TC_RED_ADAPTATIVE) mod_timer(&q->adapt_timer, jiffies + HZ / 2);
   if (!q->qdisc->q.qlen) red_start_of_idle_period(&q->vars);
   sch_tree_unlock(sch);
   red_offload(sch, true);
   return 0;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,6 +1,6 @@
 static void red_destroy(struct Qdisc *sch) {
   struct red_sched_data *q = qdisc_priv(sch);
   del_timer_sync(&q->adapt_timer);
   red_offload(sch, false);
-  qdisc_destroy(q->qdisc);
+  qdisc_put(q->qdisc);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,42 +1,42 @@
 static int sfb_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) {
   struct sfb_sched_data *q = qdisc_priv(sch);
   struct Qdisc *child;
   struct nlattr *tb[TCA_SFB_MAX + 1];
   const struct tc_sfb_qopt *ctl = &sfb_default_ops;
   u32 limit;
   int err;
   if (opt) {
     err = nla_parse_nested(tb, TCA_SFB_MAX, opt, sfb_policy, NULL);
     if (err < 0) return -EINVAL;
     if (tb[TCA_SFB_PARMS] == NULL) return -EINVAL;
     ctl = nla_data(tb[TCA_SFB_PARMS]);
   }
   limit = ctl->limit;
   if (limit == 0) limit = qdisc_dev(sch)->tx_queue_len;
   child = fifo_create_dflt(sch, &pfifo_qdisc_ops, limit, extack);
   if (IS_ERR(child)) return PTR_ERR(child);
   if (child != &noop_qdisc) qdisc_hash_add(child, true);
   sch_tree_lock(sch);
   qdisc_tree_reduce_backlog(q->qdisc, q->qdisc->q.qlen, q->qdisc->qstats.backlog);
-  qdisc_destroy(q->qdisc);
+  qdisc_put(q->qdisc);
   q->qdisc = child;
   q->rehash_interval = msecs_to_jiffies(ctl->rehash_interval);
   q->warmup_time = msecs_to_jiffies(ctl->warmup_time);
   q->rehash_time = jiffies;
   q->limit = limit;
   q->increment = ctl->increment;
   q->decrement = ctl->decrement;
   q->max = ctl->max;
   q->bin_size = ctl->bin_size;
   q->penalty_rate = ctl->penalty_rate;
   q->penalty_burst = ctl->penalty_burst;
   q->tokens_avail = ctl->penalty_burst;
   q->token_time = jiffies;
   q->slot = 0;
   q->double_buffering = false;
   sfb_zero_all_buckets(q);
   sfb_init_perturbation(0, q);
   sfb_init_perturbation(1, q);
   sch_tree_unlock(sch);
   return 0;
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void sfb_destroy(struct Qdisc *sch) {
   struct sfb_sched_data *q = qdisc_priv(sch);
   tcf_block_put(q->block);
-  qdisc_destroy(q->qdisc);
+  qdisc_put(q->qdisc);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1,5 +1,5 @@
 static void tbf_destroy(struct Qdisc *sch) {
   struct tbf_sched_data *q = qdisc_priv(sch);
   qdisc_watchdog_cancel(&q->watchdog);
-  qdisc_destroy(q->qdisc);
+  qdisc_put(q->qdisc);
 }<sep>@@
expression old;
@@
-                               qdisc_destroy(old);
+                               qdisc_put(old);
--- initial
+++ final
@@ -1 +1 @@
-static inline void alloc_per_cpu_data(void) { cpu_data = __alloc_bootmem(PERCPU_PAGE_SIZE * num_possible_cpus(), PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); }
+static inline void alloc_per_cpu_data(void) { cpu_data = memblock_alloc_from(PERCPU_PAGE_SIZE * num_possible_cpus(), PERCPU_PAGE_SIZE, __pa(MAX_DMA_ADDRESS)); }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,12 +1,12 @@
 static inline void cia_prepare_tbia_workaround(int window) {
   unsigned long *ppte, pte;
   long i;
   /* Use minimal 1K map. */
-  ppte = __alloc_bootmem(CIA_BROKEN_TBIA_SIZE, 32768, 0);
+  ppte = memblock_alloc_from(CIA_BROKEN_TBIA_SIZE, 32768, 0);
   pte = (virt_to_phys(ppte) >> (PAGE_SHIFT - 1)) | 1;
   for (i = 0; i < CIA_BROKEN_TBIA_SIZE / sizeof(unsigned long); ++i)
     ppte[i] = pte;
   *(vip)CIA_IOC_PCI_Wn_BASE(window) = CIA_BROKEN_TBIA_BASE | 3;
   *(vip)CIA_IOC_PCI_Wn_MASK(window) = (CIA_BROKEN_TBIA_SIZE * 1024 - 1) & 0xfff00000;
   *(vip)CIA_IOC_PCI_Tn_BASE(window) = virt_to_phys(ppte) >> 2;
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)
--- initial
+++ final
@@ -1,31 +1,31 @@
 void __init mem_init(void) {
   int i;
   if (PKMAP_BASE + LAST_PKMAP * PAGE_SIZE >= FIXADDR_START) {
     prom_printf("BUG: fixmap and pkmap areas overlap\n");
     prom_printf("pkbase: 0x%lx pkend: 0x%lx fixstart 0x%lx\n", PKMAP_BASE, (unsigned long)PKMAP_BASE + LAST_PKMAP * PAGE_SIZE, FIXADDR_START);
     prom_printf("Please mail sparclinux@vger.kernel.org.\n");
     prom_halt();
   }
   /* Saves us work later. */
   memset((void *)empty_zero_page, 0, PAGE_SIZE);
   i = last_valid_pfn >> ((20 - PAGE_SHIFT) + 5);
   i += 1;
-  sparc_valid_addr_bitmap = (unsigned long *)__alloc_bootmem(i << 2, SMP_CACHE_BYTES, 0UL);
+  sparc_valid_addr_bitmap = (unsigned long *)memblock_alloc_from(i << 2, SMP_CACHE_BYTES, 0UL);
   if (sparc_valid_addr_bitmap == NULL) {
     prom_printf("mem_init: Cannot alloc valid_addr_bitmap.\n");
     prom_halt();
   }
   memset(sparc_valid_addr_bitmap, 0, i << 2);
   taint_real_pages();
   max_mapnr = last_valid_pfn - pfn_base;
   high_memory = __va(max_low_pfn << PAGE_SHIFT);
   free_all_bootmem();
   for (i = 0; sp_banks[i].num_bytes != 0; i++) {
     unsigned long start_pfn = sp_banks[i].base_addr >> PAGE_SHIFT;
     unsigned long end_pfn = (sp_banks[i].base_addr + sp_banks[i].num_bytes) >> PAGE_SHIFT;
     if (end_pfn <= highstart_pfn) continue;
     if (start_pfn < highstart_pfn) start_pfn = highstart_pfn;
     map_high_region(start_pfn, end_pfn);
   }
   mem_init_print_info(NULL);
 }<sep>@@
expression size, align, goal;
@@
- __alloc_bootmem(size, align, goal)
+ memblock_alloc_from(size, align, goal)