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-next>] [day] [month] [year] [list]
Date:   Thu,  2 Dec 2021 15:37:32 +0100
From:   Rikard Falkeborn <rikard.falkeborn@...il.com>
To:     Daniel Lezcano <daniel.lezcano@...nel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Rikard Falkeborn <rikard.falkeborn@...il.com>
Subject: [PATCH 0/2] powercap/drivers/dtpm: Constify static ops structs

Constify a couple of static ops structs that are never modified, to allow
the compiler to put them in read-only memory.

The first patch constifies one powercap_zone_constraint_ops and one
powercap_zone_ops. These are only passed to powercap_register_zone()
which accepts const pointers.

The second patch constifies dtpm_ops. In order to do that, we need to add
const to an init function and in the dtpm struct, which is ok since noone
modifies the struct.

Rikard Falkeborn (2):
  powercap/drivers/dtpm: Constify powercap_zone_{,constraint_}ops
  powercap/drivers/dtpm: Constify dtpm_ops

 drivers/powercap/dtpm.c     | 6 +++---
 drivers/powercap/dtpm_cpu.c | 2 +-
 include/linux/dtpm.h        | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ