imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,83 +1,83 @@
 unsigned int nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum, struct sk_buff *skb) {
   struct nf_conn *ct, *tmpl;
   enum ip_conntrack_info ctinfo;
   struct nf_conntrack_l3proto *l3proto;
   struct nf_conntrack_l4proto *l4proto;
   unsigned int *timeouts;
   unsigned int dataoff;
   u_int8_t protonum;
   int set_reply = 0;
   int ret;
   tmpl = nf_ct_get(skb, &ctinfo);
   if (tmpl) {
     /* Previously seen (loopback or untracked)?  Ignore. */
     if (!nf_ct_is_template(tmpl)) {
       NF_CT_STAT_INC_ATOMIC(net, ignore);
       return NF_ACCEPT;
     }
     skb->nfct = NULL;
   }
   /* rcu_read_lock()ed by nf_hook_thresh */
   l3proto = __nf_ct_l3proto_find(pf);
   ret = l3proto->get_l4proto(skb, skb_network_offset(skb), &dataoff, &protonum);
   if (ret <= 0) {
     pr_debug("not prepared to track yet or error occurred\n");
     NF_CT_STAT_INC_ATOMIC(net, error);
     NF_CT_STAT_INC_ATOMIC(net, invalid);
     ret = -ret;
     goto out;
   }
   l4proto = __nf_ct_l4proto_find(pf, protonum);
   /* It may be an special packet, error, unclean...
    * inverse of the return code tells to the netfilter
    * core what to do with the packet. */
   if (l4proto->error != NULL) {
     ret = l4proto->error(net, tmpl, skb, dataoff, pf, hooknum);
     if (ret <= 0) {
       NF_CT_STAT_INC_ATOMIC(net, error);
       NF_CT_STAT_INC_ATOMIC(net, invalid);
       ret = -ret;
       goto out;
     }
     /* ICMP[v6] protocol trackers may assign one conntrack. */
-    if (skb->nfct) goto out;
+    if (skb_nfct(skb)) goto out;
   }
 repeat:
   ct = resolve_normal_ct(net, tmpl, skb, dataoff, pf, protonum, l3proto, l4proto, &set_reply, &ctinfo);
   if (!ct) {
     /* Not valid part of a connection */
     NF_CT_STAT_INC_ATOMIC(net, invalid);
     ret = NF_ACCEPT;
     goto out;
   }
   if (IS_ERR(ct)) {
     /* Too stressed to deal. */
     NF_CT_STAT_INC_ATOMIC(net, drop);
     ret = NF_DROP;
     goto out;
   }
   NF_CT_ASSERT(skb_nfct(skb));
   /* Decide what timeout policy we want to apply to this flow. */
   timeouts = nf_ct_timeout_lookup(net, ct, l4proto);
   ret = l4proto->packet(ct, skb, dataoff, ctinfo, pf, hooknum, timeouts);
   if (ret <= 0) {
     /* Invalid: inverse of the return code tells
      * the netfilter core what to do */
     pr_debug("nf_conntrack_in: Can't track with proto module\n");
     nf_conntrack_put(&ct->ct_general);
     skb->nfct = NULL;
     NF_CT_STAT_INC_ATOMIC(net, invalid);
     if (ret == -NF_DROP) NF_CT_STAT_INC_ATOMIC(net, drop);
     /* Special case: TCP tracker reports an attempt to reopen a
      * closed/aborted connection. We have to go back and create a
      * fresh conntrack.
      */
     if (ret == -NF_REPEAT) goto repeat;
     ret = -ret;
     goto out;
   }
   if (set_reply && !test_and_set_bit(IPS_SEEN_REPLY_BIT, &ct->status)) nf_conntrack_event_cache(IPCT_REPLY, ct);
 out:
   if (tmpl) nf_ct_put(tmpl);
   return ret;
 }<sep>@@
struct sk_buff *skb;
expression e;
statement S1, S2;
@@
(
  skb->nfct = e
|
-       skb->nfct
+       skb_nfct(skb)
)
--- initial
+++ final
@@ -1,21 +1,21 @@
 void nf_dup_ipv6(struct net *net, struct sk_buff *skb, unsigned int hooknum, const struct in6_addr *gw, int oif) {
   if (this_cpu_read(nf_skb_duplicated)) return;
   skb = pskb_copy(skb, GFP_ATOMIC);
   if (skb == NULL) return;
 #if IS_ENABLED(CONFIG_NF_CONNTRACK)
   nf_reset(skb);
   nf_ct_set(skb, nf_ct_untracked_get(), IP_CT_NEW);
-  nf_conntrack_get(skb->nfct);
+  nf_conntrack_get(skb_nfct(skb));
 #endif
   if (hooknum == NF_INET_PRE_ROUTING || hooknum == NF_INET_LOCAL_IN) {
     struct ipv6hdr *iph = ipv6_hdr(skb);
     --iph->hop_limit;
   }
   if (nf_dup_ipv6_route(net, skb, gw, oif)) {
     __this_cpu_write(nf_skb_duplicated, true);
     ip6_local_out(net, skb->sk, skb);
     __this_cpu_write(nf_skb_duplicated, false);
   } else {
     kfree_skb(skb);
   }
 }<sep>@@
struct sk_buff *skb;
expression e;
statement S1, S2;
@@
(
  skb->nfct = e
|
-       skb->nfct
+       skb_nfct(skb)
)
--- initial
+++ final
@@ -1,7 +1,7 @@
 static unsigned int notrack_tg(struct sk_buff *skb, const struct xt_action_param *par) {
   /* Previously seen (loopback)? Ignore. */
-  if (skb->nfct != NULL) return XT_CONTINUE;
+  if (skb_nfct(skb) != NULL) return XT_CONTINUE;
   nf_ct_set(skb, nf_ct_untracked_get(), IP_CT_NEW);
   nf_conntrack_get(skb_nfct(skb));
   return XT_CONTINUE;
 }<sep>@@
struct sk_buff *skb;
expression e;
statement S1, S2;
@@
(
  skb->nfct = e
|
-       skb->nfct
+       skb_nfct(skb)
)
--- initial
+++ final
@@ -1,9 +1,9 @@
 static inline int xt_ct_target(struct sk_buff *skb, struct nf_conn *ct) {
   /* Previously seen (loopback)? Ignore. */
-  if (skb->nfct != NULL) return XT_CONTINUE;
+  if (skb_nfct(skb) != NULL) return XT_CONTINUE;
   /* special case the untracked ct : we want the percpu object */
   if (!ct) ct = nf_ct_untracked_get();
   atomic_inc(&ct->ct_general.use);
   nf_ct_set(skb, ct, IP_CT_NEW);
   return XT_CONTINUE;
 }<sep>@@
struct sk_buff *skb;
expression e;
statement S1, S2;
@@
(
  skb->nfct = e
|
-       skb->nfct
+       skb_nfct(skb)
)
--- initial
+++ final
@@ -1,45 +1,45 @@
 static void _rtl_init_hw_ht_capab(struct ieee80211_hw *hw, struct ieee80211_sta_ht_cap *ht_cap) {
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   struct rtl_phy *rtlphy = &(rtlpriv->phy);
   ht_cap->ht_supported = true;
   ht_cap->cap = IEEE80211_HT_CAP_SUP_WIDTH_20_40 | IEEE80211_HT_CAP_SGI_40 | IEEE80211_HT_CAP_SGI_20 | IEEE80211_HT_CAP_DSSSCCK40 | IEEE80211_HT_CAP_MAX_AMSDU;
   if (rtlpriv->rtlhal.disable_amsdu_8k) ht_cap->cap &= ~IEEE80211_HT_CAP_MAX_AMSDU;
   /*
    *Maximum length of AMPDU that the STA can receive.
    *Length = 2 ^ (13 + max_ampdu_length_exp) - 1 (octets)
    */
   ht_cap->ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
   /*Minimum MPDU start spacing , */
   ht_cap->ampdu_density = IEEE80211_HT_MPDU_DENSITY_16;
   ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
   /*hw->wiphy->bands[NL80211_BAND_2GHZ]
    *base on ant_num
    *rx_mask: RX mask
    *if rx_ant = 1 rx_mask[0]= 0xff;==>MCS0-MCS7
    *if rx_ant = 2 rx_mask[1]= 0xff;==>MCS8-MCS15
    *if rx_ant >= 3 rx_mask[2]= 0xff;
    *if BW_40 rx_mask[4]= 0x01;
    *highest supported RX rate
    */
   if (rtlpriv->dm.supp_phymode_switch) {
-    RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Support phy mode switch\n");
+    pr_err("Support phy mode switch\n");
     ht_cap->mcs.rx_mask[0] = 0xFF;
     ht_cap->mcs.rx_mask[1] = 0xFF;
     ht_cap->mcs.rx_mask[4] = 0x01;
     ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
   } else {
     if (get_rf_type(rtlphy) == RF_1T2R || get_rf_type(rtlphy) == RF_2T2R) {
       RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "1T2R or 2T2R\n");
       ht_cap->mcs.rx_mask[0] = 0xFF;
       ht_cap->mcs.rx_mask[1] = 0xFF;
       ht_cap->mcs.rx_mask[4] = 0x01;
       ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS15);
     } else if (get_rf_type(rtlphy) == RF_1T1R) {
       RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "1T1R\n");
       ht_cap->mcs.rx_mask[0] = 0xFF;
       ht_cap->mcs.rx_mask[1] = 0x00;
       ht_cap->mcs.rx_mask[4] = 0x01;
       ht_cap->mcs.rx_highest = cpu_to_le16(MAX_BIT_RATE_40MHZ_MCS7);
     }
   }
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,11 +1,11 @@
 static u8 _rtl92s_firmware_header_map_rftype(struct ieee80211_hw *hw) {
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   struct rtl_phy *rtlphy = &(rtlpriv->phy);
   switch (rtlphy->rf_type) {
   case RF_1T1R: return 0x11;
   case RF_1T2R: return 0x12;
   case RF_2T2R: return 0x22;
-  default: RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Unknown RF type(%x)\n", rtlphy->rf_type); break;
+  default: pr_err("Unknown RF type(%x)\n", rtlphy->rf_type); break;
   }
   return 0x22;
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,42 +1,42 @@
 static bool _rtl92s_phy_bb_config_parafile(struct ieee80211_hw *hw) {
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   struct rtl_phy *rtlphy = &(rtlpriv->phy);
   struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
   bool rtstatus = true;
   /* 1. Read PHY_REG.TXT BB INIT!! */
   /* We will separate as 1T1R/1T2R/1T2R_GREEN/2T2R */
   if (rtlphy->rf_type == RF_1T2R || rtlphy->rf_type == RF_2T2R || rtlphy->rf_type == RF_1T1R || rtlphy->rf_type == RF_2T2R_GREEN) {
     rtstatus = _rtl92s_phy_config_bb(hw, BASEBAND_CONFIG_PHY_REG);
     if (rtlphy->rf_type != RF_2T2R && rtlphy->rf_type != RF_2T2R_GREEN)
       /* so we should reconfig BB reg with the right
        * PHY parameters. */
       rtstatus = _rtl92s_phy_set_bb_to_diff_rf(hw, BASEBAND_CONFIG_PHY_REG);
   } else {
     rtstatus = false;
   }
   if (!rtstatus) {
-    RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Write BB Reg Fail!!\n");
+    pr_err("Write BB Reg Fail!!\n");
     goto phy_BB8190_Config_ParaFile_Fail;
   }
   /* 2. If EEPROM or EFUSE autoload OK, We must config by
    *    PHY_REG_PG.txt */
   if (rtlefuse->autoload_failflag == false) {
     rtlphy->pwrgroup_cnt = 0;
     rtstatus = _rtl92s_phy_config_bb_with_pg(hw, BASEBAND_CONFIG_PHY_REG);
   }
   if (!rtstatus) {
-    RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "_rtl92s_phy_bb_config_parafile(): BB_PG Reg Fail!!\n");
+    pr_err("_rtl92s_phy_bb_config_parafile(): BB_PG Reg Fail!!\n");
     goto phy_BB8190_Config_ParaFile_Fail;
   }
   /* 3. BB AGC table Initialization */
   rtstatus = _rtl92s_phy_config_bb(hw, BASEBAND_CONFIG_AGC_TAB);
   if (!rtstatus) {
     pr_err("%s(): AGC Table Fail\n", __func__);
     goto phy_BB8190_Config_ParaFile_Fail;
   }
   /* Check if the CCK HighPower is turned ON. */
   /* This is used to calculate PWDB. */
   rtlphy->cck_high_power = (bool)(rtl92s_phy_query_bb_reg(hw, RFPGA0_XA_HSSIPARAMETER2, 0x200));
 phy_BB8190_Config_ParaFile_Fail:
   return rtstatus;
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,25 +1,25 @@
 bool rtl92s_phy_bb_config(struct ieee80211_hw *hw) {
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   struct rtl_phy *rtlphy = &(rtlpriv->phy);
   bool rtstatus = true;
   u8 pathmap, index, rf_num = 0;
   u8 path1, path2;
   _rtl92s_phy_init_register_definition(hw);
   /* Config BB and AGC */
   rtstatus = _rtl92s_phy_bb_config_parafile(hw);
   /* Check BB/RF confiuration setting. */
   /* We only need to configure RF which is turned on. */
   path1 = (u8)(rtl92s_phy_query_bb_reg(hw, RFPGA0_TXINFO, 0xf));
   mdelay(10);
   path2 = (u8)(rtl92s_phy_query_bb_reg(hw, ROFDM0_TRXPATHENABLE, 0xf));
   pathmap = path1 | path2;
   rtlphy->rf_pathmap = pathmap;
   for (index = 0; index < 4; index++) {
     if ((pathmap >> index) & 0x1) rf_num++;
   }
   if ((rtlphy->rf_type == RF_1T1R && rf_num != 1) || (rtlphy->rf_type == RF_1T2R && rf_num != 2) || (rtlphy->rf_type == RF_2T2R && rf_num != 2) || (rtlphy->rf_type == RF_2T2R_GREEN && rf_num != 2)) {
-    RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "RF_Type(%x) does not match RF_Num(%x)!!\n", rtlphy->rf_type, rf_num);
-    RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "path1 0x%x, path2 0x%x, pathmap 0x%x\n", path1, path2, pathmap);
+    pr_err("RF_Type(%x) does not match RF_Num(%x)!!\n", rtlphy->rf_type, rf_num);
+    pr_err("path1 0x%x, path2 0x%x, pathmap 0x%x\n", path1, path2, pathmap);
   }
   return rtstatus;
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,28 +1,28 @@
 static void _rtl92de_efuse_update_chip_version(struct ieee80211_hw *hw) {
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   enum version_8192d chipver = rtlpriv->rtlhal.version;
   u8 cutvalue[2];
   u16 chipvalue;
   rtlpriv->intf_ops->read_efuse_byte(hw, EEPROME_CHIP_VERSION_H, &cutvalue[1]);
   rtlpriv->intf_ops->read_efuse_byte(hw, EEPROME_CHIP_VERSION_L, &cutvalue[0]);
   chipvalue = (cutvalue[1] << 8) | cutvalue[0];
   switch (chipvalue) {
   case 0xAA55:
     chipver |= CHIP_92D_C_CUT;
     RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "C-CUT!!!\n");
     break;
   case 0x9966:
     chipver |= CHIP_92D_D_CUT;
     RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "D-CUT!!!\n");
     break;
   case 0xCC33:
     chipver |= CHIP_92D_E_CUT;
     RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "E-CUT!!!\n");
     break;
   default:
     chipver |= CHIP_92D_D_CUT;
-    RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Unknown CUT!\n");
+    pr_err("Unknown CUT!\n");
     break;
   }
   rtlpriv->rtlhal.version = chipver;
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static void _rtl92cu_init_chipN_three_out_ep_priority(struct ieee80211_hw *hw, bool wmm_enable, u8 queue_sel) {
   u16 beQ, bkQ, viQ, voQ, mgtQ, hiQ;
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   if (!wmm_enable) { /* typical setting */
     beQ = QUEUE_LOW;
     bkQ = QUEUE_LOW;
     viQ = QUEUE_NORMAL;
     voQ = QUEUE_HIGH;
     mgtQ = QUEUE_HIGH;
     hiQ = QUEUE_HIGH;
   } else { /* for WMM */
     beQ = QUEUE_LOW;
     bkQ = QUEUE_NORMAL;
     viQ = QUEUE_NORMAL;
     voQ = QUEUE_HIGH;
     mgtQ = QUEUE_HIGH;
     hiQ = QUEUE_HIGH;
   }
   _rtl92c_init_chipN_reg_priority(hw, beQ, bkQ, viQ, voQ, mgtQ, hiQ);
-  RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Tx queue select :0x%02x..\n", queue_sel);
+  pr_err("Tx queue select :0x%02x..\n", queue_sel);
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,26 +1,26 @@
 static void _rtl92cu_init_chipT_queue_priority(struct ieee80211_hw *hw, bool wmm_enable, u8 out_ep_num, u8 queue_sel) {
   u8 hq_sele = 0;
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   switch (out_ep_num) {
   case 2:            /* (TX_SELE_HQ|TX_SELE_LQ) */
     if (!wmm_enable) /* typical setting */
       hq_sele = HQSEL_VOQ | HQSEL_VIQ | HQSEL_MGTQ | HQSEL_HIQ;
     else /* for WMM */
       hq_sele = HQSEL_VOQ | HQSEL_BEQ | HQSEL_MGTQ | HQSEL_HIQ;
     break;
   case 1:
     if (TX_SELE_LQ == queue_sel) {
       /* map all endpoint to Low queue */
       hq_sele = 0;
     } else if (TX_SELE_HQ == queue_sel) {
       /* map all endpoint to High queue */
       hq_sele = HQSEL_VOQ | HQSEL_VIQ | HQSEL_BEQ | HQSEL_BKQ | HQSEL_MGTQ | HQSEL_HIQ;
     }
     break;
   default:
     WARN_ON(1); /* Shall not reach here! */
     break;
   }
   rtl_write_byte(rtlpriv, (REG_TRXDMA_CTRL + 1), hq_sele);
-  RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Tx queue select :0x%02x..\n", hq_sele);
+  pr_err("Tx queue select :0x%02x..\n", hq_sele);
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,66 +1,66 @@
 static int _rtl92cu_init_power_on(struct ieee80211_hw *hw) {
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   int status = 0;
   u16 value16;
   u8 value8;
   /*  polling autoload done. */
   u32 pollingCount = 0;
   do {
     if (rtl_read_byte(rtlpriv, REG_APS_FSMCO) & PFM_ALDN) {
       RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, "Autoload Done!\n");
       break;
     }
     if (pollingCount++ > 100) {
-      RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Failed to polling REG_APS_FSMCO[PFM_ALDN] done!\n");
+      pr_err("Failed to polling REG_APS_FSMCO[PFM_ALDN] done!\n");
       return -ENODEV;
     }
   } while (true);
   /* 0. RSV_CTRL 0x1C[7:0] = 0 unlock ISO/CLK/Power control register */
   rtl_write_byte(rtlpriv, REG_RSV_CTRL, 0x0);
   /* Power on when re-enter from IPS/Radio off/card disable */
   /* enable SPS into PWM mode */
   rtl_write_byte(rtlpriv, REG_SPS0_CTRL, 0x2b);
   udelay(100);
   value8 = rtl_read_byte(rtlpriv, REG_LDOV12D_CTRL);
   if (0 == (value8 & LDV12_EN)) {
     value8 |= LDV12_EN;
     rtl_write_byte(rtlpriv, REG_LDOV12D_CTRL, value8);
     RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, " power-on :REG_LDOV12D_CTRL Reg0x21:0x%02x\n", value8);
     udelay(100);
     value8 = rtl_read_byte(rtlpriv, REG_SYS_ISO_CTRL);
     value8 &= ~ISO_MD2PP;
     rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL, value8);
   }
   /*  auto enable WLAN */
   pollingCount = 0;
   value16 = rtl_read_word(rtlpriv, REG_APS_FSMCO);
   value16 |= APFM_ONMAC;
   rtl_write_word(rtlpriv, REG_APS_FSMCO, value16);
   do {
     if (!(rtl_read_word(rtlpriv, REG_APS_FSMCO) & APFM_ONMAC)) {
       pr_info("MAC auto ON okay!\n");
       break;
     }
     if (pollingCount++ > 1000) {
-      RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Failed to polling REG_APS_FSMCO[APFM_ONMAC] done!\n");
+      pr_err("Failed to polling REG_APS_FSMCO[APFM_ONMAC] done!\n");
       return -ENODEV;
     }
   } while (true);
   /* Enable Radio ,GPIO ,and LED function */
   rtl_write_word(rtlpriv, REG_APS_FSMCO, 0x0812);
   /* release RF digital isolation */
   value16 = rtl_read_word(rtlpriv, REG_SYS_ISO_CTRL);
   value16 &= ~ISO_DIOR;
   rtl_write_word(rtlpriv, REG_SYS_ISO_CTRL, value16);
   /* Reconsider when to do this operation after asking HWSD. */
   pollingCount = 0;
   rtl_write_byte(rtlpriv, REG_APSD_CTRL, (rtl_read_byte(rtlpriv, REG_APSD_CTRL) & ~BIT(6)));
   do {
     pollingCount++;
   } while ((pollingCount < 200) && (rtl_read_byte(rtlpriv, REG_APSD_CTRL) & BIT(7)));
   /* Enable MAC DMA/WMAC/SCHEDULE/SEC block */
   value16 = rtl_read_word(rtlpriv, REG_CR);
   value16 |= (HCI_TXDMA_EN | HCI_RXDMA_EN | TXDMA_EN | RXDMA_EN | PROTOCOL_EN | SCHEDULE_EN | MACTXEN | MACRXEN | ENSEC);
   rtl_write_word(rtlpriv, REG_CR, value16);
   return status;
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,43 +1,43 @@
 static enum version_8192c _rtl92ce_read_chip_version(struct ieee80211_hw *hw) {
   struct rtl_priv *rtlpriv = rtl_priv(hw);
   struct rtl_phy *rtlphy = &(rtlpriv->phy);
   enum version_8192c version = VERSION_UNKNOWN;
   u32 value32;
   const char *versionid;
   value32 = rtl_read_dword(rtlpriv, REG_SYS_CFG);
   if (value32 & TRP_VAUX_EN) {
     version = (value32 & TYPE_ID) ? VERSION_A_CHIP_92C : VERSION_A_CHIP_88C;
   } else {
     version = (enum version_8192c)(CHIP_VER_B | ((value32 & TYPE_ID) ? CHIP_92C_BITMASK : 0) | ((value32 & VENDOR_ID) ? CHIP_VENDOR_UMC : 0));
     if ((!IS_CHIP_VENDOR_UMC(version)) && (value32 & CHIP_VER_RTL_MASK)) { version = (enum version_8192c)(version | ((((value32 & CHIP_VER_RTL_MASK) == BIT(12)) ? CHIP_VENDOR_UMC_B_CUT : CHIP_UNKNOWN) | CHIP_VENDOR_UMC)); }
     if (IS_92C_SERIAL(version)) {
       value32 = rtl_read_dword(rtlpriv, REG_HPON_FSM);
       version = (enum version_8192c)(version | ((CHIP_BONDING_IDENTIFIER(value32) == CHIP_BONDING_92C_1T2R) ? RF_TYPE_1T2R : 0));
     }
   }
   switch (version) {
   case VERSION_B_CHIP_92C: versionid = "B_CHIP_92C"; break;
   case VERSION_B_CHIP_88C: versionid = "B_CHIP_88C"; break;
   case VERSION_A_CHIP_92C: versionid = "A_CHIP_92C"; break;
   case VERSION_A_CHIP_88C: versionid = "A_CHIP_88C"; break;
   case VERSION_NORMAL_UMC_CHIP_92C_1T2R_A_CUT: versionid = "A_CUT_92C_1T2R"; break;
   case VERSION_NORMAL_UMC_CHIP_92C_A_CUT: versionid = "A_CUT_92C"; break;
   case VERSION_NORMAL_UMC_CHIP_88C_A_CUT: versionid = "A_CUT_88C"; break;
   case VERSION_NORMAL_UMC_CHIP_92C_1T2R_B_CUT: versionid = "B_CUT_92C_1T2R"; break;
   case VERSION_NORMAL_UMC_CHIP_92C_B_CUT: versionid = "B_CUT_92C"; break;
   case VERSION_NORMAL_UMC_CHIP_88C_B_CUT: versionid = "B_CUT_88C"; break;
   default: versionid = "Unknown. Bug?"; break;
   }
-  RT_TRACE(rtlpriv, COMP_INIT, DBG_EMERG, "Chip Version ID: %s\n", versionid);
+  pr_err("Chip Version ID: %s\n", versionid);
   switch (version & 0x3) {
   case CHIP_88C: rtlphy->rf_type = RF_1T1R; break;
   case CHIP_92C: rtlphy->rf_type = RF_2T2R; break;
   case CHIP_92C_1T2R: rtlphy->rf_type = RF_1T2R; break;
   default:
     rtlphy->rf_type = RF_1T1R;
     RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "ERROR RF_Type is set!!\n");
     break;
   }
   RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "Chip RF Type: %s\n", rtlphy->rf_type == RF_2T2R ? "RF_2T2R" : "RF_1T1R");
   return version;
 }<sep>@@
expression e1;
expression list e2;
@@
-                       RT_TRACE(e1, COMP_INIT, DBG_EMERG, e2)
+                       pr_err(e2)
--- initial
+++ final
@@ -1,38 +1,38 @@
 void smp_callin(void) {
   int cpuid = hard_smp_processor_id();
   if (cpu_online(cpuid)) {
     printk("??, cpu 0x%x already present??\n", cpuid);
     BUG();
   }
   set_cpu_online(cpuid, true);
   /* Turn on machine checks.  */
   wrmces(7);
   /* Set trap vectors.  */
   trap_init();
   /* Set interrupt vector.  */
   wrent(entInt, 0);
   /* Get our local ticker going. */
   smp_setup_percpu_timer(cpuid);
   init_clockevent();
   /* Call platform-specific callin, if specified */
   if (alpha_mv.smp_callin) alpha_mv.smp_callin();
   /* All kernel threads share the same mm context.  */
-  atomic_inc(&init_mm.mm_count);
+  mmgrab(&init_mm);
   current->active_mm = &init_mm;
   /* inform the notifiers about the new cpu */
   notify_cpu_starting(cpuid);
   /* Must have completely accurate bogos.  */
   local_irq_enable();
   /* Wait boot CPU to stop with irq enabled before running
      calibrate_delay. */
   wait_boot_cpu_to_stop(cpuid);
   mb();
   calibrate_delay();
   smp_store_cpu_info(cpuid);
   /* Allow master to continue only after we written loops_per_jiffy.  */
   wmb();
   smp_secondary_alive = 1;
   DBGS(("smp_callin: commencing CPU %d current %p active_mm %p\n", cpuid, current, current->active_mm));
   preempt_disable();
   cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
 }<sep>@@
expression init_mm;
@@
-       atomic_inc(&init_mm.mm_count);
+       mmgrab(&init_mm);
--- initial
+++ final
@@ -1,19 +1,19 @@
 void start_kernel_secondary(void) {
   struct mm_struct *mm = &init_mm;
   unsigned int cpu = smp_processor_id();
   /* MMU, Caches, Vector Table, Interrupts etc */
   setup_processor();
   atomic_inc(&mm->mm_users);
-  atomic_inc(&mm->mm_count);
+  mmgrab(mm);
   current->active_mm = mm;
   cpumask_set_cpu(cpu, mm_cpumask(mm));
   /* Some SMP H/w setup - for each cpu */
   if (plat_smp_ops.init_per_cpu) plat_smp_ops.init_per_cpu(cpu);
   if (machine_desc->init_per_cpu) machine_desc->init_per_cpu(cpu);
   notify_cpu_starting(cpu);
   set_cpu_online(cpu, true);
   pr_info("## CPU%u LIVE ##: Executing Code...\n", cpu);
   local_irq_enable();
   preempt_disable();
   cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
 }<sep>@@
expression init_mm;
@@
-       atomic_inc(&init_mm->mm_count);
+       mmgrab(init_mm);