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: <722f31da34e5e1cfef05fb966f6c8c96.sboyd@kernel.org>
Date: Wed, 24 Apr 2024 11:33:32 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Conor Dooley <conor@...nel.org>, linux-riscv@...ts.infradead.org
Cc: conor@...nel.org, Conor Dooley <conor.dooley@...rochip.com>, Philipp Zabel <p.zabel@...gutronix.de>, Daire McNamara <daire.mcnamara@...rochip.com>, Michael Turquette <mturquette@...libre.com>, linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] clock, reset: microchip: move all mpfs reset code to the reset subsystem

Quoting Conor Dooley (2024-04-24 01:42:08)
> diff --git a/drivers/reset/reset-mpfs.c b/drivers/reset/reset-mpfs.c
> index 7f3fb2d472f4..710f9c1676f9 100644
> --- a/drivers/reset/reset-mpfs.c
> +++ b/drivers/reset/reset-mpfs.c
> @@ -121,11 +135,15 @@ static int mpfs_reset_probe(struct auxiliary_device *adev,
>  {
>         struct device *dev = &adev->dev;
>         struct reset_controller_dev *rcdev;
> +       struct mpfs_reset *rst;
>  
> -       rcdev = devm_kzalloc(dev, sizeof(*rcdev), GFP_KERNEL);
> -       if (!rcdev)
> +       rst = devm_kzalloc(dev, sizeof(*rst), GFP_KERNEL);
> +       if (!rst)
>                 return -ENOMEM;
>  
> +       rst->base = (void __iomem *)adev->dev.platform_data;

Can use dev_get_platdata() here?

	rst->base = (void __iomem *)dev_get_platdata(dev);

That's sad that a cast is necessary. Does it need __force as well? An
alternative would be to make a container struct for auxiliary_device and
put the pointer there.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ