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: <3e782ac88cc28fb5fa7ed71e7573e60f.sboyd@kernel.org>
Date: Tue, 27 Aug 2024 17:21:00 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Michael Turquette <mturquette@...libre.com>
Subject: Re: [PATCH v1 1/2] clk: x86: lpss-atom: Use predefined constants from units.h

Quoting Andy Shevchenko (2024-08-22 09:14:07)
> diff --git a/drivers/clk/x86/clk-lpss-atom.c b/drivers/clk/x86/clk-lpss-atom.c
> index aa9d0bb98f8b..c70088be72d1 100644
> --- a/drivers/clk/x86/clk-lpss-atom.c
> +++ b/drivers/clk/x86/clk-lpss-atom.c
> @@ -12,20 +12,24 @@
>  #include <linux/module.h>
>  #include <linux/platform_data/x86/clk-lpss.h>
>  #include <linux/platform_device.h>
> +#include <linux/units.h>
>  
>  static int lpss_atom_clk_probe(struct platform_device *pdev)
>  {
>         struct lpss_clk_data *drvdata;
>         struct clk *clk;
> +       u32 rate;

Do we need a local variable?

>  
>         drvdata = devm_kzalloc(&pdev->dev, sizeof(*drvdata), GFP_KERNEL);
>         if (!drvdata)
>                 return -ENOMEM;
>  
> +       /* Default frequency is 100MHz */
> +       rate = 100 * HZ_PER_MHZ;
> +
>         /* LPSS free running clock */
>         drvdata->name = "lpss_clk";
> -       clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL,
> -                                     0, 100000000);
> +       clk = clk_register_fixed_rate(&pdev->dev, drvdata->name, NULL, 0, rate);

This should be a one line patch.

>         if (IS_ERR(clk))
>                 return PTR_ERR(clk);
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ