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: <CANdKZ0f471hRgFJS1EDJ81xfaom6UKV+7RLVEC9T5x9vrt22Nw@mail.gmail.com>
Date:   Mon, 13 Jul 2020 16:55:56 +0800
From:   Pi-Hsun Shih <pihsun@...omium.org>
To:     Rikard Falkeborn <rikard.falkeborn@...il.com>
Cc:     Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Benson Leung <bleung@...omium.org>,
        Enric Balletbo i Serra <enric.balletbo@...labora.com>,
        Guenter Roeck <groeck@...omium.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] regulator: cros-ec: Constify cros_ec_regulator_voltage_ops

Acked-by: Pi-Hsun Shih <pihsun@...omium.org>

On Sat, Jul 11, 2020 at 7:44 PM Rikard Falkeborn
<rikard.falkeborn@...il.com> wrote:
>
> It is never modified, so make it const to allow the compiler to put it
> in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@...il.com>
> ---
>  drivers/regulator/cros-ec-regulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/regulator/cros-ec-regulator.c b/drivers/regulator/cros-ec-regulator.c
> index 35f97246bc48..eeed5aac3f32 100644
> --- a/drivers/regulator/cros-ec-regulator.c
> +++ b/drivers/regulator/cros-ec-regulator.c
> @@ -142,7 +142,7 @@ static int cros_ec_regulator_set_voltage(struct regulator_dev *dev, int min_uV,
>                            sizeof(cmd), NULL, 0);
>  }
>
> -static struct regulator_ops cros_ec_regulator_voltage_ops = {
> +static const struct regulator_ops cros_ec_regulator_voltage_ops = {
>         .enable = cros_ec_regulator_enable,
>         .disable = cros_ec_regulator_disable,
>         .is_enabled = cros_ec_regulator_is_enabled,
> --
> 2.27.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ