imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int hix5hd2_i2c_runtime_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct hix5hd2_i2c_priv *priv = platform_get_drvdata(pdev);
+  struct hix5hd2_i2c_priv *priv = dev_get_drvdata(dev);
   clk_disable_unprepare(priv->clk);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,7 +1,6 @@
 static int i2c_lpc2k_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct lpc2k_i2c *i2c = platform_get_drvdata(pdev);
+  struct lpc2k_i2c *i2c = dev_get_drvdata(dev);
   clk_enable(i2c->clk);
   i2c_lpc2k_reset(i2c);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int i2c_lpc2k_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct lpc2k_i2c *i2c = platform_get_drvdata(pdev);
+  struct lpc2k_i2c *i2c = dev_get_drvdata(dev);
   clk_disable(i2c->clk);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int mv64xxx_i2c_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct mv64xxx_i2c_data *drv_data = platform_get_drvdata(pdev);
+  struct mv64xxx_i2c_data *drv_data = dev_get_drvdata(dev);
   mv64xxx_i2c_hw_init(drv_data);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,7 +1,6 @@
 static int i2c_pxa_resume_noirq(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct pxa_i2c *i2c = platform_get_drvdata(pdev);
+  struct pxa_i2c *i2c = dev_get_drvdata(dev);
   clk_enable(i2c->clk);
   i2c_pxa_reset(i2c);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int i2c_pxa_suspend_noirq(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct pxa_i2c *i2c = platform_get_drvdata(pdev);
+  struct pxa_i2c *i2c = dev_get_drvdata(dev);
   clk_disable(i2c->clk);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,12 +1,11 @@
 static int s3c24xx_i2c_resume_noirq(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
+  struct s3c24xx_i2c *i2c = dev_get_drvdata(dev);
   int ret;
   if (!IS_ERR(i2c->sysreg)) regmap_write(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, i2c->sys_i2c_cfg);
   ret = clk_enable(i2c->clk);
   if (ret) return ret;
   s3c24xx_i2c_init(i2c);
   clk_disable(i2c->clk);
   i2c->suspended = 0;
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,7 +1,6 @@
 static int s3c24xx_i2c_suspend_noirq(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
+  struct s3c24xx_i2c *i2c = dev_get_drvdata(dev);
   i2c->suspended = 1;
   if (!IS_ERR(i2c->sysreg)) regmap_read(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, &i2c->sys_i2c_cfg);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,14 +1,13 @@
 static int i2c_sirfsoc_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct i2c_adapter *adapter = platform_get_drvdata(pdev);
+  struct i2c_adapter *adapter = dev_get_drvdata(dev);
   struct sirfsoc_i2c *siic = adapter->algo_data;
   clk_enable(siic->clk);
   writel(SIRFSOC_I2C_RESET, siic->base + SIRFSOC_I2C_CTRL);
   while (readl(siic->base + SIRFSOC_I2C_CTRL) & SIRFSOC_I2C_RESET)
     cpu_relax();
   writel(SIRFSOC_I2C_CORE_EN | SIRFSOC_I2C_MASTER_MODE, siic->base + SIRFSOC_I2C_CTRL);
   writel(siic->clk_div, siic->base + SIRFSOC_I2C_CLK_CTRL);
   writel(siic->sda_delay, siic->base + SIRFSOC_I2C_SDA_DELAY);
   clk_disable(siic->clk);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,10 +1,9 @@
 static int i2c_sirfsoc_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct i2c_adapter *adapter = platform_get_drvdata(pdev);
+  struct i2c_adapter *adapter = dev_get_drvdata(dev);
   struct sirfsoc_i2c *siic = adapter->algo_data;
   clk_enable(siic->clk);
   siic->sda_delay = readl(siic->base + SIRFSOC_I2C_SDA_DELAY);
   siic->clk_div = readl(siic->base + SIRFSOC_I2C_CLK_CTRL);
   clk_disable(siic->clk);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,7 +1,6 @@
 static int st_i2c_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct st_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
+  struct st_i2c_dev *i2c_dev = dev_get_drvdata(dev);
   if (i2c_dev->busy) return -EBUSY;
   pinctrl_pm_select_sleep_state(dev);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,11 +1,10 @@
 static int __maybe_unused cdns_i2c_runtime_resume(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct xiic_i2c *i2c = platform_get_drvdata(pdev);
+  struct xiic_i2c *i2c = dev_get_drvdata(dev);
   int ret;
   ret = clk_enable(i2c->clk);
   if (ret) {
     dev_err(dev, "Cannot enable clock.\n");
     return ret;
   }
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,6 +1,5 @@
 static int __maybe_unused cdns_i2c_runtime_suspend(struct device *dev) {
-  struct platform_device *pdev = to_platform_device(dev);
-  struct xiic_i2c *i2c = platform_get_drvdata(pdev);
+  struct xiic_i2c *i2c = dev_get_drvdata(dev);
   clk_disable(i2c->clk);
   return 0;
 }<sep>@@
identifier e1;
expression e2;
type T;
@@

(
- T e1 = to_platform_device(e2);
  ...
- platform_get_drvdata(e1)
+ dev_get_drvdata(e2)
  ... when any
&
  T e1 = to_platform_device(e2);
  <... when != e1
(
  platform_get_drvdata(e1)
|
- &e1->dev
+ e2
)
  ...>
)
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int bpf_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, bpf_net_id);
-  return tc_action_net_init(tn, &act_bpf_ops, net);
+  return tc_action_net_init(tn, &act_bpf_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int connmark_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, connmark_net_id);
-  return tc_action_net_init(tn, &act_connmark_ops, net);
+  return tc_action_net_init(tn, &act_connmark_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int csum_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, csum_net_id);
-  return tc_action_net_init(tn, &act_csum_ops, net);
+  return tc_action_net_init(tn, &act_csum_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int gact_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, gact_net_id);
-  return tc_action_net_init(tn, &act_gact_ops, net);
+  return tc_action_net_init(tn, &act_gact_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int ife_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, ife_net_id);
-  return tc_action_net_init(tn, &act_ife_ops, net);
+  return tc_action_net_init(tn, &act_ife_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int ipt_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, ipt_net_id);
-  return tc_action_net_init(tn, &act_ipt_ops, net);
+  return tc_action_net_init(tn, &act_ipt_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int xt_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, xt_net_id);
-  return tc_action_net_init(tn, &act_xt_ops, net);
+  return tc_action_net_init(tn, &act_xt_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int mirred_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, mirred_net_id);
-  return tc_action_net_init(tn, &act_mirred_ops, net);
+  return tc_action_net_init(tn, &act_mirred_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int nat_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, nat_net_id);
-  return tc_action_net_init(tn, &act_nat_ops, net);
+  return tc_action_net_init(tn, &act_nat_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int pedit_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, pedit_net_id);
-  return tc_action_net_init(tn, &act_pedit_ops, net);
+  return tc_action_net_init(tn, &act_pedit_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int police_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, police_net_id);
-  return tc_action_net_init(tn, &act_police_ops, net);
+  return tc_action_net_init(tn, &act_police_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int sample_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, sample_net_id);
-  return tc_action_net_init(tn, &act_sample_ops, net);
+  return tc_action_net_init(tn, &act_sample_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int simp_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, simp_net_id);
-  return tc_action_net_init(tn, &act_simp_ops, net);
+  return tc_action_net_init(tn, &act_simp_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int skbedit_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, skbedit_net_id);
-  return tc_action_net_init(tn, &act_skbedit_ops, net);
+  return tc_action_net_init(tn, &act_skbedit_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int skbmod_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, skbmod_net_id);
-  return tc_action_net_init(tn, &act_skbmod_ops, net);
+  return tc_action_net_init(tn, &act_skbmod_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int tunnel_key_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, tunnel_key_net_id);
-  return tc_action_net_init(tn, &act_tunnel_key_ops, net);
+  return tc_action_net_init(tn, &act_tunnel_key_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,4 +1,4 @@
 static __net_init int vlan_init_net(struct net *net) {
   struct tc_action_net *tn = net_generic(net, vlan_net_id);
-  return tc_action_net_init(tn, &act_vlan_ops, net);
+  return tc_action_net_init(tn, &act_vlan_ops);
 }<sep>@@
expression e1,e2,net;
@@

        tc_action_net_init(e1,e2
-            , net
        )
--- initial
+++ final
@@ -1,45 +1,45 @@
 static int cvm_mmc_of_parse(struct device *dev, struct cvm_mmc_slot *slot) {
   u32 id, cmd_skew = 0, dat_skew = 0, bus_width = 0;
   struct device_node *node = dev->of_node;
   struct mmc_host *mmc = slot->mmc;
   u64 clock_period;
   int ret;
   ret = of_property_read_u32(node, "reg", &id);
   if (ret) {
     dev_err(dev, "Missing or invalid reg property on %pOF\n", node);
     return ret;
   }
   if (id >= CAVIUM_MAX_MMC || slot->host->slot[id]) {
     dev_err(dev, "Invalid reg property on %pOF\n", node);
     return -EINVAL;
   }
   ret = mmc_regulator_get_supply(mmc);
-  if (ret == -EPROBE_DEFER) return ret;
+  if (ret) return ret;
   /*
    * Legacy Octeon firmware has no regulator entry, fall-back to
    * a hard-coded voltage to get a sane OCR.
    */
   if (IS_ERR(mmc->supply.vmmc)) mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
   /* Common MMC bindings */
   ret = mmc_of_parse(mmc);
   if (ret) return ret;
   /* Set bus width */
   if (!(mmc->caps & (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA))) {
     of_property_read_u32(node, "cavium,bus-max-width", &bus_width);
     if (bus_width == 8)
       mmc->caps |= MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA;
     else if (bus_width == 4)
       mmc->caps |= MMC_CAP_4_BIT_DATA;
   }
   /* Set maximum and minimum frequency */
   if (!mmc->f_max) of_property_read_u32(node, "spi-max-frequency", &mmc->f_max);
   if (!mmc->f_max || mmc->f_max > 52000000) mmc->f_max = 52000000;
   mmc->f_min = 400000;
   /* Sampling register settings, period in picoseconds */
   clock_period = 1000000000000ull / slot->host->sys_freq;
   of_property_read_u32(node, "cavium,cmd-clk-skew", &cmd_skew);
   of_property_read_u32(node, "cavium,dat-clk-skew", &dat_skew);
   slot->cmd_cnt = (cmd_skew + clock_period / 2) / clock_period;
   slot->dat_cnt = (dat_skew + clock_period / 2) / clock_period;
   return id;
 }<sep>@@
expression ret,mmc,e;
statement S1,S2;
@@

        ret = mmc_regulator_get_supply(mmc);
	... when != ret = e
	if (
-           ret == -EPROBE_DEFER
+           ret
	   ) S1 else S2
--- initial
+++ final
@@ -1,78 +1,78 @@
 static int dw_mci_init_slot(struct dw_mci *host) {
   struct mmc_host *mmc;
   struct dw_mci_slot *slot;
   const struct dw_mci_drv_data *drv_data = host->drv_data;
   int ctrl_id, ret;
   u32 freq[2];
   mmc = mmc_alloc_host(sizeof(struct dw_mci_slot), host->dev);
   if (!mmc) return -ENOMEM;
   slot = mmc_priv(mmc);
   slot->id = 0;
   slot->sdio_id = host->sdio_id0 + slot->id;
   slot->mmc = mmc;
   slot->host = host;
   host->slot = slot;
   mmc->ops = &dw_mci_ops;
   if (device_property_read_u32_array(host->dev, "clock-freq-min-max", freq, 2)) {
     mmc->f_min = DW_MCI_FREQ_MIN;
     mmc->f_max = DW_MCI_FREQ_MAX;
   } else {
     dev_info(host->dev, "'clock-freq-min-max' property was deprecated.\n");
     mmc->f_min = freq[0];
     mmc->f_max = freq[1];
   }
   /*if there are external regulators, get them*/
   ret = mmc_regulator_get_supply(mmc);
-  if (ret == -EPROBE_DEFER) goto err_host_allocated;
+  if (ret) goto err_host_allocated;
   if (!mmc->ocr_avail) mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
   if (host->pdata->caps) mmc->caps = host->pdata->caps;
   /*
    * Support MMC_CAP_ERASE by default.
    * It needs to use trim/discard/erase commands.
    */
   mmc->caps |= MMC_CAP_ERASE;
   if (host->pdata->pm_caps) mmc->pm_caps = host->pdata->pm_caps;
   if (host->dev->of_node) {
     ctrl_id = of_alias_get_id(host->dev->of_node, "mshc");
     if (ctrl_id < 0) ctrl_id = 0;
   } else {
     ctrl_id = to_platform_device(host->dev)->id;
   }
   if (drv_data && drv_data->caps) mmc->caps |= drv_data->caps[ctrl_id];
   if (host->pdata->caps2) mmc->caps2 = host->pdata->caps2;
   ret = mmc_of_parse(mmc);
   if (ret) goto err_host_allocated;
   /* Process SDIO IRQs through the sdio_irq_work. */
   if (mmc->caps & MMC_CAP_SDIO_IRQ) mmc->caps2 |= MMC_CAP2_SDIO_IRQ_NOTHREAD;
   /* Useful defaults if platform data is unset. */
   if (host->use_dma == TRANS_MODE_IDMAC) {
     mmc->max_segs = host->ring_size;
     mmc->max_blk_size = 65535;
     mmc->max_seg_size = 0x1000;
     mmc->max_req_size = mmc->max_seg_size * host->ring_size;
     mmc->max_blk_count = mmc->max_req_size / 512;
   } else if (host->use_dma == TRANS_MODE_EDMAC) {
     mmc->max_segs = 64;
     mmc->max_blk_size = 65535;
     mmc->max_blk_count = 65535;
     mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
     mmc->max_seg_size = mmc->max_req_size;
   } else {
     /* TRANS_MODE_PIO */
     mmc->max_segs = 64;
     mmc->max_blk_size = 65535; /* BLKSIZ is 16 bits */
     mmc->max_blk_count = 512;
     mmc->max_req_size = mmc->max_blk_size * mmc->max_blk_count;
     mmc->max_seg_size = mmc->max_req_size;
   }
   dw_mci_get_cd(mmc);
   ret = mmc_add_host(mmc);
   if (ret) goto err_host_allocated;
 #if defined(CONFIG_DEBUG_FS)
   dw_mci_init_debugfs(slot);
 #endif
   return 0;
 err_host_allocated:
   mmc_free_host(mmc);
   return ret;
 }<sep>@@
expression ret,mmc,e;
statement S1,S2;
@@

        ret = mmc_regulator_get_supply(mmc);
	... when != ret = e
	if (
-           ret == -EPROBE_DEFER
+           ret
	   ) S1 else S2
--- initial
+++ final
@@ -1,32 +1,32 @@
 static int meson_mx_mmc_add_host(struct meson_mx_mmc_host *host) {
   struct mmc_host *mmc = host->mmc;
   struct device *slot_dev = mmc_dev(mmc);
   int ret;
   if (of_property_read_u32(slot_dev->of_node, "reg", &host->slot_id)) {
     dev_err(slot_dev, "missing 'reg' property\n");
     return -EINVAL;
   }
   if (host->slot_id >= MESON_MX_SDIO_MAX_SLOTS) {
     dev_err(slot_dev, "invalid 'reg' property value %d\n", host->slot_id);
     return -EINVAL;
   }
   /* Get regulators and the supported OCR mask */
   ret = mmc_regulator_get_supply(mmc);
-  if (ret == -EPROBE_DEFER) return ret;
+  if (ret) return ret;
   mmc->max_req_size = MESON_MX_SDIO_BOUNCE_REQ_SIZE;
   mmc->max_seg_size = mmc->max_req_size;
   mmc->max_blk_count = FIELD_GET(MESON_MX_SDIO_SEND_REPEAT_PACKAGE_TIMES_MASK, 0xffffffff);
   mmc->max_blk_size = FIELD_GET(MESON_MX_SDIO_EXT_DATA_RW_NUMBER_MASK, 0xffffffff);
   mmc->max_blk_size -= (4 * MESON_MX_SDIO_RESPONSE_CRC16_BITS);
   mmc->max_blk_size /= BITS_PER_BYTE;
   /* Get the min and max supported clock rates */
   mmc->f_min = clk_round_rate(host->cfg_div_clk, 1);
   mmc->f_max = clk_round_rate(host->cfg_div_clk, clk_get_rate(host->parent_clk));
   mmc->caps |= MMC_CAP_ERASE | MMC_CAP_CMD23;
   mmc->ops = &meson_mx_mmc_ops;
   ret = mmc_of_parse(mmc);
   if (ret) return ret;
   ret = mmc_add_host(mmc);
   if (ret) return ret;
   return 0;
 }<sep>@@
expression ret,mmc,e;
statement S1,S2;
@@

        ret = mmc_regulator_get_supply(mmc);
	... when != ret = e
	if (
-           ret == -EPROBE_DEFER
+           ret
	   ) S1 else S2
--- initial
+++ final
@@ -1,29 +1,29 @@
 static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) {
   int ret;
   struct mmc_host *mmc = host->mmc;
   ret = mmc_regulator_get_supply(mmc);
-  if (ret == -EPROBE_DEFER) return ret;
+  if (ret) return ret;
   /* Allow an aux regulator */
   if (IS_ERR(mmc->supply.vqmmc)) {
     mmc->supply.vqmmc = devm_regulator_get_optional(host->dev, "vmmc_aux");
     if (IS_ERR(mmc->supply.vqmmc)) {
       ret = PTR_ERR(mmc->supply.vqmmc);
       if ((ret != -ENODEV) && host->dev->of_node) return ret;
       dev_dbg(host->dev, "unable to get vmmc_aux regulator %ld\n", PTR_ERR(mmc->supply.vqmmc));
     }
   }
   host->pbias = devm_regulator_get_optional(host->dev, "pbias");
   if (IS_ERR(host->pbias)) {
     ret = PTR_ERR(host->pbias);
     if ((ret != -ENODEV) && host->dev->of_node) {
       dev_err(host->dev, "SD card detect fail? enable CONFIG_REGULATOR_PBIAS\n");
       return ret;
     }
     dev_dbg(host->dev, "unable to get pbias regulator %ld\n", PTR_ERR(host->pbias));
   }
   /* For eMMC do not power off when not in sleep state */
   if (mmc_pdata(host)->no_regulator_off_init) return 0;
   ret = omap_hsmmc_disable_boot_regulators(host);
   if (ret) return ret;
   return 0;
 }<sep>@@
expression ret,mmc,e;
statement S1,S2;
@@

        ret = mmc_regulator_get_supply(mmc);
	... when != ret = e
	if (
-           ret == -EPROBE_DEFER
+           ret
	   ) S1 else S2
--- initial
+++ final
@@ -1,38 +1,38 @@
 static int __vme_register_driver_bus(struct vme_driver *drv, struct vme_bridge *bridge, unsigned int ndevs) {
   int err;
   unsigned int i;
   struct vme_dev *vdev;
   struct vme_dev *tmp;
   for (i = 0; i < ndevs; i++) {
-    vdev = kzalloc(sizeof(struct vme_dev), GFP_KERNEL);
+    vdev = kzalloc(sizeof(*vdev), GFP_KERNEL);
     if (!vdev) {
       err = -ENOMEM;
       goto err_devalloc;
     }
     vdev->num = i;
     vdev->bridge = bridge;
     vdev->dev.platform_data = drv;
     vdev->dev.release = vme_dev_release;
     vdev->dev.parent = bridge->parent;
     vdev->dev.bus = &vme_bus_type;
     dev_set_name(&vdev->dev, "%s.%u-%u", drv->name, bridge->num, vdev->num);
     err = device_register(&vdev->dev);
     if (err) goto err_reg;
     if (vdev->dev.platform_data) {
       list_add_tail(&vdev->drv_list, &drv->devices);
       list_add_tail(&vdev->bridge_list, &bridge->devices);
     } else
       device_unregister(&vdev->dev);
   }
   return 0;
 err_reg:
   put_device(&vdev->dev);
   kfree(vdev);
 err_devalloc:
   list_for_each_entry_safe(vdev, tmp, &drv->devices, drv_list) {
     list_del(&vdev->drv_list);
     list_del(&vdev->bridge_list);
     device_unregister(&vdev->dev);
   }
   return err;
 }<sep>@@
expression e1,e2;
type T;
@@

e1 = kzalloc (
- sizeof(T)
+ sizeof(*e1)
  ,e2)