imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,27 +1,26 @@
 static int bL_cpufreq_init(struct cpufreq_policy *policy) {
   u32 cur_cluster = cpu_to_cluster(policy->cpu);
   struct device *cpu_dev;
   int ret;
   cpu_dev = get_cpu_device(policy->cpu);
   if (!cpu_dev) {
     pr_err("%s: failed to get cpu%d device\n", __func__, policy->cpu);
     return -ENODEV;
   }
   ret = get_cluster_clk_and_freq_table(cpu_dev);
   if (ret) return ret;
-  ret = cpufreq_frequency_table_cpuinfo(policy, freq_table[cur_cluster]);
+  ret = cpufreq_table_validate_and_show(policy, freq_table[cur_cluster]);
   if (ret) {
     dev_err(cpu_dev, "CPU %d, cluster: %d invalid freq table\n", policy->cpu, cur_cluster);
     put_cluster_clk_and_freq_table(cpu_dev);
     return ret;
   }
-  cpufreq_frequency_table_get_attr(freq_table[cur_cluster], policy->cpu);
   if (arm_bL_ops->get_transition_latency)
     policy->cpuinfo.transition_latency = arm_bL_ops->get_transition_latency(cpu_dev);
   else
     policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
   policy->cur = bL_cpufreq_get(policy->cpu);
   cpumask_copy(policy->cpus, topology_core_cpumask(policy->cpu));
   dev_info(cpu_dev, "%s: CPU %d initialized\n", __func__, policy->cpu);
   return 0;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
...
-       cpufreq_frequency_table_get_attr(table, policy->cpu);
--- initial
+++ final
@@ -1,10 +1,9 @@
 static int __bfin_cpu_init(struct cpufreq_policy *policy) {
   unsigned long cclk, sclk;
   cclk = get_cclk() / 1000;
   sclk = get_sclk() / 1000;
   if (policy->cpu == CPUFREQ_CPU) bfin_init_tables(cclk, sclk);
   policy->cpuinfo.transition_latency = 50000; /* 50us assumed */
   policy->cur = cclk;
-  cpufreq_frequency_table_get_attr(bfin_freq_table, policy->cpu);
-  return cpufreq_frequency_table_cpuinfo(policy, bfin_freq_table);
+  return cpufreq_table_validate_and_show(policy, bfin_freq_table);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,18 +1,17 @@
 static int cpu0_cpufreq_init(struct cpufreq_policy *policy) {
   int ret;
-  ret = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+  ret = cpufreq_table_validate_and_show(policy, freq_table);
   if (ret) {
     pr_err("invalid frequency table: %d\n", ret);
     return ret;
   }
   policy->cpuinfo.transition_latency = transition_latency;
   policy->cur = clk_get_rate(cpu_clk) / 1000;
   /*
    * The driver only supports the SMP configuartion where all processors
    * share the clock and voltage and clock.  Use cpufreq affected_cpus
    * interface to have all CPUs scaled together.
    */
   cpumask_setall(policy->cpus);
-  cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
   return 0;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
...
-       cpufreq_frequency_table_get_attr(table, policy->cpu);
--- initial
+++ final
@@ -1,8 +1,7 @@
 static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   policy->cur = policy->min = policy->max = exynos_getspeed(policy->cpu);
-  cpufreq_frequency_table_get_attr(exynos_info->freq_table, policy->cpu);
   /* set the transition latency value */
   policy->cpuinfo.transition_latency = 100000;
   cpumask_setall(policy->cpus);
-  return cpufreq_frequency_table_cpuinfo(policy, exynos_info->freq_table);
+  return cpufreq_table_validate_and_show(policy, exynos_info->freq_table);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,13 +1,12 @@
 static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   int ret;
-  ret = cpufreq_frequency_table_cpuinfo(policy, dvfs_info->freq_table);
+  ret = cpufreq_table_validate_and_show(policy, dvfs_info->freq_table);
   if (ret) {
     dev_err(dvfs_info->dev, "Invalid frequency table: %d\n", ret);
     return ret;
   }
   policy->cur = dvfs_info->cur_frequency;
   policy->cpuinfo.transition_latency = dvfs_info->latency;
   cpumask_setall(policy->cpus);
-  cpufreq_frequency_table_get_attr(dvfs_info->freq_table, policy->cpu);
   return 0;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
...
-       cpufreq_frequency_table_get_attr(table, policy->cpu);
--- initial
+++ final
@@ -1,13 +1,12 @@
 static int imx6q_cpufreq_init(struct cpufreq_policy *policy) {
   int ret;
-  ret = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+  ret = cpufreq_table_validate_and_show(policy, freq_table);
   if (ret) {
     dev_err(cpu_dev, "invalid frequency table: %d\n", ret);
     return ret;
   }
   policy->cpuinfo.transition_latency = transition_latency;
   policy->cur = clk_get_rate(arm_clk) / 1000;
   cpumask_setall(policy->cpus);
-  cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
   return 0;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
...
-       cpufreq_frequency_table_get_attr(table, policy->cpu);
--- initial
+++ final
@@ -1,26 +1,25 @@
 static int loongson2_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   int i;
   unsigned long rate;
   int ret;
   cpuclk = clk_get(NULL, "cpu_clk");
   if (IS_ERR(cpuclk)) {
     printk(KERN_ERR "cpufreq: couldn't get CPU clk\n");
     return PTR_ERR(cpuclk);
   }
   rate = cpu_clock_freq / 1000;
   if (!rate) {
     clk_put(cpuclk);
     return -EINVAL;
   }
   /* clock table init */
   for (i = 2; (loongson2_clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++)
     loongson2_clockmod_table[i].frequency = (rate * i) / 8;
   ret = clk_set_rate(cpuclk, rate);
   if (ret) {
     clk_put(cpuclk);
     return ret;
   }
   policy->cur = loongson2_cpufreq_get(policy->cpu);
-  cpufreq_frequency_table_get_attr(&loongson2_clockmod_table[0], policy->cpu);
-  return cpufreq_frequency_table_cpuinfo(policy, &loongson2_clockmod_table[0]);
+  return cpufreq_table_validate_and_show(policy, &loongson2_clockmod_table[0]);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,10 +1,9 @@
 static int maple_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   policy->cpuinfo.transition_latency = 12000;
   policy->cur = maple_cpu_freqs[maple_scom_query_freq()].frequency;
   /* secondary CPUs are tied to the primary one by the
    * cpufreq core if in the secondary policy we tell it that
    * it actually must be one policy together with all others. */
   cpumask_setall(policy->cpus);
-  cpufreq_frequency_table_get_attr(maple_cpu_freqs, policy->cpu);
-  return cpufreq_frequency_table_cpuinfo(policy, maple_cpu_freqs);
+  return cpufreq_table_validate_and_show(policy, maple_cpu_freqs);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,36 +1,35 @@
 static int omap_cpu_init(struct cpufreq_policy *policy) {
   int result = 0;
   mpu_clk = clk_get(NULL, "cpufreq_ck");
   if (IS_ERR(mpu_clk)) return PTR_ERR(mpu_clk);
   if (policy->cpu >= NR_CPUS) {
     result = -EINVAL;
     goto fail_ck;
   }
   policy->cur = omap_getspeed(policy->cpu);
   if (!freq_table) result = opp_init_cpufreq_table(mpu_dev, &freq_table);
   if (result) {
     dev_err(mpu_dev, "%s: cpu%d: failed creating freq table[%d]\n", __func__, policy->cpu, result);
     goto fail_ck;
   }
   atomic_inc_return(&freq_table_users);
-  result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+  result = cpufreq_table_validate_and_show(policy, freq_table);
   if (result) goto fail_table;
-  cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
   policy->cur = omap_getspeed(policy->cpu);
   /*
    * On OMAP SMP configuartion, both processors share the voltage
    * and clock. So both CPUs needs to be scaled together and hence
    * needs software co-ordination. Use cpufreq affected_cpus
    * interface to handle this scenario. Additional is_smp() check
    * is to keep SMP_ON_UP build working.
    */
   if (is_smp()) cpumask_setall(policy->cpus);
   /* FIXME: what's the actual transition time? */
   policy->cpuinfo.transition_latency = 300 * 1000;
   return 0;
 fail_table:
   freq_table_free();
 fail_ck:
   clk_put(mpu_clk);
   return result;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
...
-       cpufreq_frequency_table_get_attr(table, policy->cpu);
--- initial
+++ final
@@ -1,38 +1,37 @@
 static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy) {
   struct cpuinfo_x86 *c = &cpu_data(policy->cpu);
   int cpuid = 0;
   unsigned int i;
 #ifdef CONFIG_SMP
   cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu));
 #endif
   /* Errata workaround */
   cpuid = (c->x86 << 8) | (c->x86_model << 4) | c->x86_mask;
   switch (cpuid) {
   case 0x0f07:
   case 0x0f0a:
   case 0x0f11:
   case 0x0f12: has_N44_O17_errata[policy->cpu] = 1; pr_debug("has errata -- disabling low frequencies\n");
   }
   if (speedstep_detect_processor() == SPEEDSTEP_CPU_P4D && c->x86_model < 2) {
     /* switch to maximum frequency and measure result */
     cpufreq_p4_setdc(policy->cpu, DC_DISABLE);
     recalibrate_cpu_khz();
   }
   /* get max frequency */
   stock_freq = cpufreq_p4_get_frequency(c);
   if (!stock_freq) return -EINVAL;
   /* table init */
   for (i = 1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) {
     if ((i < 2) && (has_N44_O17_errata[policy->cpu]))
       p4clockmod_table[i].frequency = CPUFREQ_ENTRY_INVALID;
     else
       p4clockmod_table[i].frequency = (stock_freq * i) / 8;
   }
-  cpufreq_frequency_table_get_attr(p4clockmod_table, policy->cpu);
   /* cpuinfo and default policy values */
   /* the transition latency is set to be 1 higher than the maximum
    * transition latency of the ondemand governor */
   policy->cpuinfo.transition_latency = 10000001;
   policy->cur = stock_freq;
-  return cpufreq_frequency_table_cpuinfo(policy, &p4clockmod_table[0]);
+  return cpufreq_table_validate_and_show(policy, &p4clockmod_table[0]);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, &table[0])
--- initial
+++ final
@@ -1,67 +1,66 @@
 static int pas_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   const u32 *max_freqp;
   u32 max_freq;
   int i, cur_astate;
   struct resource res;
   struct device_node *cpu, *dn;
   int err = -ENODEV;
   cpu = of_get_cpu_node(policy->cpu, NULL);
   if (!cpu) goto out;
   dn = of_find_compatible_node(NULL, NULL, "1682m-sdc");
   if (!dn) dn = of_find_compatible_node(NULL, NULL, "pasemi,pwrficient-sdc");
   if (!dn) goto out;
   err = of_address_to_resource(dn, 0, &res);
   of_node_put(dn);
   if (err) goto out;
   sdcasr_mapbase = ioremap(res.start + SDCASR_OFFSET, 0x2000);
   if (!sdcasr_mapbase) {
     err = -EINVAL;
     goto out;
   }
   dn = of_find_compatible_node(NULL, NULL, "1682m-gizmo");
   if (!dn) dn = of_find_compatible_node(NULL, NULL, "pasemi,pwrficient-gizmo");
   if (!dn) {
     err = -ENODEV;
     goto out_unmap_sdcasr;
   }
   err = of_address_to_resource(dn, 0, &res);
   of_node_put(dn);
   if (err) goto out_unmap_sdcasr;
   sdcpwr_mapbase = ioremap(res.start, 0x1000);
   if (!sdcpwr_mapbase) {
     err = -EINVAL;
     goto out_unmap_sdcasr;
   }
   pr_debug("init cpufreq on CPU %d\n", policy->cpu);
   max_freqp = of_get_property(cpu, "clock-frequency", NULL);
   if (!max_freqp) {
     err = -EINVAL;
     goto out_unmap_sdcpwr;
   }
   /* we need the freq in kHz */
   max_freq = *max_freqp / 1000;
   pr_debug("max clock-frequency is at %u kHz\n", max_freq);
   pr_debug("initializing frequency table\n");
   /* initialize frequency table */
   for (i = 0; pas_freqs[i].frequency != CPUFREQ_TABLE_END; i++) {
     pas_freqs[i].frequency = get_astate_freq(pas_freqs[i].driver_data) * 100000;
     pr_debug("%d: %d\n", i, pas_freqs[i].frequency);
   }
   policy->cpuinfo.transition_latency = get_gizmo_latency();
   cur_astate = get_cur_astate(policy->cpu);
   pr_debug("current astate is at %d\n", cur_astate);
   policy->cur = pas_freqs[cur_astate].frequency;
   cpumask_copy(policy->cpus, cpu_online_mask);
   ppc_proc_freq = policy->cur * 1000ul;
-  cpufreq_frequency_table_get_attr(pas_freqs, policy->cpu);
   /* this ensures that policy->cpuinfo_min and policy->cpuinfo_max
    * are set correctly
    */
-  return cpufreq_frequency_table_cpuinfo(policy, pas_freqs);
+  return cpufreq_table_validate_and_show(policy, pas_freqs);
 out_unmap_sdcpwr:
   iounmap(sdcpwr_mapbase);
 out_unmap_sdcasr:
   iounmap(sdcasr_mapbase);
 out:
   return err;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,7 +1,6 @@
 static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   if (policy->cpu != 0) return -ENODEV;
   policy->cpuinfo.transition_latency = transition_latency;
   policy->cur = cur_freq;
-  cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu);
-  return cpufreq_frequency_table_cpuinfo(policy, pmac_cpu_freqs);
+  return cpufreq_table_validate_and_show(policy, pmac_cpu_freqs);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,10 +1,9 @@
 static int g5_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   policy->cpuinfo.transition_latency = transition_latency;
   policy->cur = g5_cpu_freqs[g5_query_freq()].frequency;
   /* secondary CPUs are tied to the primary one by the
    * cpufreq core if in the secondary policy we tell it that
    * it actually must be one policy together with all others. */
   cpumask_copy(policy->cpus, cpu_online_mask);
-  cpufreq_frequency_table_get_attr(g5_cpu_freqs, policy->cpu);
-  return cpufreq_frequency_table_cpuinfo(policy, g5_cpu_freqs);
+  return cpufreq_table_validate_and_show(policy, g5_cpu_freqs);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,78 +1,77 @@
 static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   struct device_node *np;
   int i, count, ret;
   u32 freq, mask;
   struct clk *clk;
   struct cpufreq_frequency_table *table;
   struct cpu_data *data;
   unsigned int cpu = policy->cpu;
   np = of_get_cpu_node(cpu, NULL);
   if (!np) return -ENODEV;
   data = kzalloc(sizeof(*data), GFP_KERNEL);
   if (!data) {
     pr_err("%s: no memory\n", __func__);
     goto err_np;
   }
   data->clk = of_clk_get(np, 0);
   if (IS_ERR(data->clk)) {
     pr_err("%s: no clock information\n", __func__);
     goto err_nomem2;
   }
   data->parent = of_parse_phandle(np, "clocks", 0);
   if (!data->parent) {
     pr_err("%s: could not get clock information\n", __func__);
     goto err_nomem2;
   }
   count = of_property_count_strings(data->parent, "clock-names");
   table = kcalloc(count + 1, sizeof(*table), GFP_KERNEL);
   if (!table) {
     pr_err("%s: no memory\n", __func__);
     goto err_node;
   }
   if (fmask)
     mask = fmask[get_hard_smp_processor_id(cpu)];
   else
     mask = 0x0;
   for (i = 0; i < count; i++) {
     clk = of_clk_get(data->parent, i);
     freq = clk_get_rate(clk);
     /*
      * the clock is valid if its frequency is not masked
      * and large than minimum allowed frequency.
      */
     if (freq < min_cpufreq || (mask & (1 << i)))
       table[i].frequency = CPUFREQ_ENTRY_INVALID;
     else
       table[i].frequency = freq / 1000;
     table[i].driver_data = i;
   }
   freq_table_redup(table, count);
   freq_table_sort(table, count);
   table[i].frequency = CPUFREQ_TABLE_END;
   /* set the min and max frequency properly */
-  ret = cpufreq_frequency_table_cpuinfo(policy, table);
+  ret = cpufreq_table_validate_and_show(policy, table);
   if (ret) {
     pr_err("invalid frequency table: %d\n", ret);
     goto err_nomem1;
   }
   data->table = table;
   per_cpu(cpu_data, cpu) = data;
   /* update ->cpus if we have cluster, no harm if not */
   cpumask_copy(policy->cpus, per_cpu(cpu_mask, cpu));
   for_each_cpu(i, per_cpu(cpu_mask, cpu)) per_cpu(cpu_data, i) = data;
   policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL;
   policy->cur = corenet_cpufreq_get_speed(policy->cpu);
-  cpufreq_frequency_table_get_attr(table, cpu);
   of_node_put(np);
   return 0;
 err_nomem1:
   kfree(table);
 err_node:
   of_node_put(data->parent);
 err_nomem2:
   per_cpu(cpu_data, cpu) = NULL;
   kfree(data);
 err_np:
   of_node_put(np);
   return -ENODEV;
 }<sep>@@
expression policy,table,e1,e2;
identifier c;
@@

	unsigned int c = policy->cpu;
	... when != c = e1
-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
	... when != c = e2
-       cpufreq_frequency_table_get_attr(table, c);
--- initial
+++ final
@@ -1,41 +1,40 @@
 static int cbe_cpufreq_cpu_init(struct cpufreq_policy *policy) {
   const u32 *max_freqp;
   u32 max_freq;
   int i, cur_pmode;
   struct device_node *cpu;
   cpu = of_get_cpu_node(policy->cpu, NULL);
   if (!cpu) return -ENODEV;
   pr_debug("init cpufreq on CPU %d\n", policy->cpu);
   /*
    * Let's check we can actually get to the CELL regs
    */
   if (!cbe_get_cpu_pmd_regs(policy->cpu) || !cbe_get_cpu_mic_tm_regs(policy->cpu)) {
     pr_info("invalid CBE regs pointers for cpufreq\n");
     return -EINVAL;
   }
   max_freqp = of_get_property(cpu, "clock-frequency", NULL);
   of_node_put(cpu);
   if (!max_freqp) return -EINVAL;
   /* we need the freq in kHz */
   max_freq = *max_freqp / 1000;
   pr_debug("max clock-frequency is at %u kHz\n", max_freq);
   pr_debug("initializing frequency table\n");
   /* initialize frequency table */
   for (i = 0; cbe_freqs[i].frequency != CPUFREQ_TABLE_END; i++) {
     cbe_freqs[i].frequency = max_freq / cbe_freqs[i].driver_data;
     pr_debug("%d: %d\n", i, cbe_freqs[i].frequency);
   }
   /* if DEBUG is enabled set_pmode() measures the latency
    * of a transition */
   policy->cpuinfo.transition_latency = 25000;
   cur_pmode = cbe_cpufreq_get_pmode(policy->cpu);
   pr_debug("current pmode is at %d\n", cur_pmode);
   policy->cur = cbe_freqs[cur_pmode].frequency;
 #ifdef CONFIG_SMP
   cpumask_copy(policy->cpus, cpu_sibling_mask(policy->cpu));
 #endif
-  cpufreq_frequency_table_get_attr(cbe_freqs, policy->cpu);
   /* this ensures that policy->cpuinfo_min
    * and policy->cpuinfo_max are set correctly */
-  return cpufreq_frequency_table_cpuinfo(policy, cbe_freqs);
+  return cpufreq_table_validate_and_show(policy, cbe_freqs);
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,44 +1,43 @@
 static int __init s5pv210_cpu_init(struct cpufreq_policy *policy) {
   unsigned long mem_type;
   int ret;
   cpu_clk = clk_get(NULL, "armclk");
   if (IS_ERR(cpu_clk)) return PTR_ERR(cpu_clk);
   dmc0_clk = clk_get(NULL, "sclk_dmc0");
   if (IS_ERR(dmc0_clk)) {
     ret = PTR_ERR(dmc0_clk);
     goto out_dmc0;
   }
   dmc1_clk = clk_get(NULL, "hclk_msys");
   if (IS_ERR(dmc1_clk)) {
     ret = PTR_ERR(dmc1_clk);
     goto out_dmc1;
   }
   if (policy->cpu != 0) {
     ret = -EINVAL;
     goto out_dmc1;
   }
   /*
    * check_mem_type : This driver only support LPDDR & LPDDR2.
    * other memory type is not supported.
    */
   mem_type = check_mem_type(S5P_VA_DMC0);
   if ((mem_type != LPDDR) && (mem_type != LPDDR2)) {
     printk(KERN_ERR "CPUFreq doesn't support this memory type\n");
     ret = -EINVAL;
     goto out_dmc1;
   }
   /* Find current refresh counter and frequency each DMC */
   s5pv210_dram_conf[0].refresh = (__raw_readl(S5P_VA_DMC0 + 0x30) * 1000);
   s5pv210_dram_conf[0].freq = clk_get_rate(dmc0_clk);
   s5pv210_dram_conf[1].refresh = (__raw_readl(S5P_VA_DMC1 + 0x30) * 1000);
   s5pv210_dram_conf[1].freq = clk_get_rate(dmc1_clk);
   policy->cur = policy->min = policy->max = s5pv210_getspeed(0);
-  cpufreq_frequency_table_get_attr(s5pv210_freq_table, policy->cpu);
   policy->cpuinfo.transition_latency = 40000;
-  return cpufreq_frequency_table_cpuinfo(policy, s5pv210_freq_table);
+  return cpufreq_table_validate_and_show(policy, s5pv210_freq_table);
 out_dmc1:
   clk_put(dmc0_clk);
 out_dmc0:
   clk_put(cpu_clk);
   return ret;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_get_attr(table, policy->cpu);
	...
-       cpufreq_frequency_table_cpuinfo(policy, table)
+       cpufreq_table_validate_and_show(policy, table)
--- initial
+++ final
@@ -1,14 +1,13 @@
 static int tegra_cpu_init(struct cpufreq_policy *policy) {
   if (policy->cpu >= NUM_CPUS) return -EINVAL;
   clk_prepare_enable(emc_clk);
   clk_prepare_enable(cpu_clk);
-  cpufreq_frequency_table_cpuinfo(policy, freq_table);
-  cpufreq_frequency_table_get_attr(freq_table, policy->cpu);
+  cpufreq_table_validate_and_show(policy, freq_table);
   policy->cur = tegra_getspeed(policy->cpu);
   target_cpu_speed[policy->cpu] = policy->cur;
   /* FIXME: what's the actual transition time? */
   policy->cpuinfo.transition_latency = 300 * 1000;
   cpumask_copy(policy->cpus, cpu_possible_mask);
   if (policy->cpu == 0) register_pm_notifier(&tegra_cpu_pm_notifier);
   return 0;
 }<sep>@@
expression policy,table;
@@

-       cpufreq_frequency_table_cpuinfo
+       cpufreq_table_validate_and_show
		(policy, table)
...
-       cpufreq_frequency_table_get_attr(table, policy->cpu);