lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohpo=-Oxu6ZoB4B2H4552meq46iXrVzKbP5ZwnG==sCc2_MA@mail.gmail.com>
Date:	Mon, 21 Apr 2014 11:35:19 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Chanwoo Choi <cw00.choi@...sung.com>,
	Tomasz Figa <t.figa@...sung.com>,
	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Kukjin Kim <kgene.kim@...sung.com>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"cpufreq@...r.kernel.org" <cpufreq@...r.kernel.org>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	linux-samsung-soc <linux-samsung-soc@...r.kernel.org>
Subject: Re: [PATCH 1/2] cpufreq: exynos: Use dev_err/info function instead of pr_err/info

On 18 April 2014 07:50, Chanwoo Choi <cw00.choi@...sung.com> wrote:
> This patch uses dev_err/info function to show accurate log message with device name
> instead of pr_err/info function.
>
> Signed-off-by: Chanwoo Choi <cw00.choi@...sung.com>
> Acked-by: Kyungmin Park <kyungmin.park@...sung.com>
> ---
>  drivers/cpufreq/exynos-cpufreq.c | 21 ++++++++++++---------
>  drivers/cpufreq/exynos-cpufreq.h |  1 +
>  2 files changed, 13 insertions(+), 9 deletions(-)

This still looks fine even if we don't take the new driver ?

Acked-by: Viresh Kumar <viresh.kumar@...aro.org>

> diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
> index f99cfe2..8b4bb4a 100644
> --- a/drivers/cpufreq/exynos-cpufreq.c
> +++ b/drivers/cpufreq/exynos-cpufreq.c
> @@ -49,6 +49,7 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
>         struct cpufreq_policy *policy = cpufreq_cpu_get(0);
>         unsigned int arm_volt, safe_arm_volt = 0;
>         unsigned int mpll_freq_khz = exynos_info->mpll_freq_khz;
> +       struct device *dev = exynos_info->dev;
>         unsigned int old_freq;
>         int index, old_index;
>         int ret = 0;
> @@ -90,8 +91,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
>                 /* Firstly, voltage up to increase frequency */
>                 ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt);
>                 if (ret) {
> -                       pr_err("%s: failed to set cpu voltage to %d\n",
> -                               __func__, arm_volt);
> +                       dev_err(dev, "failed to set cpu voltage to %d\n",
> +                               arm_volt);
>                         return ret;
>                 }
>         }
> @@ -100,8 +101,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
>                 ret = regulator_set_voltage(arm_regulator, safe_arm_volt,
>                                       safe_arm_volt);
>                 if (ret) {
> -                       pr_err("%s: failed to set cpu voltage to %d\n",
> -                               __func__, safe_arm_volt);
> +                       dev_err(dev, "failed to set cpu voltage to %d\n",
> +                               safe_arm_volt);
>                         return ret;
>                 }
>         }
> @@ -115,8 +116,8 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
>                 ret = regulator_set_voltage(arm_regulator, arm_volt,
>                                 arm_volt);
>                 if (ret) {
> -                       pr_err("%s: failed to set cpu voltage to %d\n",
> -                               __func__, arm_volt);
> +                       dev_err(dev, "failed to set cpu voltage to %d\n",
> +                               arm_volt);
>                         goto out;
>                 }
>         }
> @@ -163,6 +164,8 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
>         if (!exynos_info)
>                 return -ENOMEM;
>
> +       exynos_info->dev = &pdev->dev;
> +
>         if (soc_is_exynos4210())
>                 ret = exynos4210_cpufreq_init(exynos_info);
>         else if (soc_is_exynos4212() || soc_is_exynos4412())
> @@ -176,13 +179,13 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
>                 goto err_vdd_arm;
>
>         if (exynos_info->set_freq == NULL) {
> -               pr_err("%s: No set_freq function (ERR)\n", __func__);
> +               dev_err(&pdev->dev, "No set_freq function (ERR)\n");
>                 goto err_vdd_arm;
>         }
>
>         arm_regulator = regulator_get(NULL, "vdd_arm");
>         if (IS_ERR(arm_regulator)) {
> -               pr_err("%s: failed to get resource vdd_arm\n", __func__);
> +               dev_err(&pdev->dev, "failed to get resource vdd_arm\n");
>                 goto err_vdd_arm;
>         }
>
> @@ -192,7 +195,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
>         if (!cpufreq_register_driver(&exynos_driver))
>                 return 0;
>
> -       pr_err("%s: failed to register cpufreq driver\n", __func__);
> +       dev_err(&pdev->dev, "failed to register cpufreq driver\n");
>         regulator_put(arm_regulator);
>  err_vdd_arm:
>         kfree(exynos_info);
> diff --git a/drivers/cpufreq/exynos-cpufreq.h b/drivers/cpufreq/exynos-cpufreq.h
> index 3ddade8..b72ff10 100644
> --- a/drivers/cpufreq/exynos-cpufreq.h
> +++ b/drivers/cpufreq/exynos-cpufreq.h
> @@ -34,6 +34,7 @@ struct apll_freq {
>  };
>
>  struct exynos_dvfs_info {
> +       struct device   *dev;
>         unsigned long   mpll_freq_khz;
>         unsigned int    pll_safe_idx;
>         struct clk      *cpu_clk;
> --
> 1.8.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ