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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175834529869.4354.196538790945051595@lazor>
Date: Fri, 19 Sep 2025 22:14:58 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Benoît Monin <benoit.monin@...tlin.com>, Conor Dooley <conor+dt@...nel.org>, Gregory CLEMENT <gregory.clement@...tlin.com>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Michael Turquette <mturquette@...libre.com>, Philipp Zabel <p.zabel@...gutronix.de>, Rob Herring <robh@...nel.org>, Thomas Bogendoerfer <tsbogend@...ha.franken.de>, Théo Lebrun <theo.lebrun@...tlin.com>, Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>
Cc: Thomas Petazzoni <thomas.petazzoni@...tlin.com>, linux-mips@...r.kernel.org, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org, Tawfik Bayouk <tawfik.bayouk@...ileye.com>, Sari Khoury <sari.khoury@...ileye.com>, Benoît Monin <benoit.monin@...tlin.com>
Subject: Re: [PATCH 07/19] clk: fixed-factor: add clk_hw_register_fixed_factor_with_accuracy

Quoting Benoît Monin (2025-09-03 05:47:14)
> diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
> index e62ae8794d445f685156276d5135448f340fca3f..7c76658a725f9b268da2485769979e5ba213d25b 100644
> --- a/drivers/clk/clk-fixed-factor.c
> +++ b/drivers/clk/clk-fixed-factor.c
> @@ -217,6 +217,18 @@ struct clk_hw *clk_hw_register_fixed_factor(struct device *dev,
>  }
>  EXPORT_SYMBOL_GPL(clk_hw_register_fixed_factor);
>  
> +struct clk_hw *clk_hw_register_fixed_factor_with_accuracy(struct device *dev,
> +               const char *name, const char *parent_name, unsigned long flags,
> +               unsigned int mult, unsigned int div, unsigned long acc)
> +{
> +       const struct clk_parent_data pdata = { .index = -1 };

This is wrong. We're passing parent data and also setting the parent
name with a string the original way. Do you have a parent?

> +
> +       return __clk_hw_register_fixed_factor(dev, NULL, name, parent_name, NULL,
> +                                             &pdata, flags, mult, div, acc,
> +                                             CLK_FIXED_FACTOR_FIXED_ACCURACY, false);
> +}
> +EXPORT_SYMBOL_GPL(clk_hw_register_fixed_factor_with_accuracy);

There are a handful of these wrappers now. Can we have one function that
takes all possibilities and then static inline functions that call one
exported function?  We can pass some structs to that function to keep
the argument count "low", so those structs live on the stack for a short
time.

> +
>  struct clk_hw *clk_hw_register_fixed_factor_fwname(struct device *dev,
>                 struct device_node *np, const char *name, const char *fw_name,
>                 unsigned long flags, unsigned int mult, unsigned int div)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ