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]
Date:   Mon, 01 Jun 2020 11:37:52 +0000
From:   "Peter Kästle" <peter@...e.net>
To:     "Andrzej Pietrasiewicz" <andrzej.p@...labora.com>,
        linux-pm@...r.kernel.org, linux-acpi@...r.kernel.org,
        netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
        platform-driver-x86@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-renesas-soc@...r.kernel.org,
        linux-rockchip@...ts.infradead.org
Cc:     "Rafael J . Wysocki" <rjw@...ysocki.net>,
        "Len Brown" <lenb@...nel.org>,
        "Vishal Kulkarni" <vishal@...lsio.com>,
        "David S . Miller" <davem@...emloft.net>,
        "Jiri Pirko" <jiri@...lanox.com>,
        "Ido Schimmel" <idosch@...lanox.com>,
        "Johannes Berg" <johannes.berg@...el.com>,
        "Emmanuel Grumbach" <emmanuel.grumbach@...el.com>,
        "Luca Coelho" <luciano.coelho@...el.com>,
        "Intel Linux Wireless" <linuxwifi@...el.com>,
        "Kalle Valo" <kvalo@...eaurora.org>,
        "Darren Hart" <dvhart@...radead.org>,
        "Andy Shevchenko" <andy@...radead.org>,
        "Sebastian Reichel" <sre@...nel.org>,
        "Miquel Raynal" <miquel.raynal@...tlin.com>,
        "Daniel Lezcano" <daniel.lezcano@...aro.org>,
        "Amit Kucheria" <amit.kucheria@...durent.com>,
        "Support Opensource" <support.opensource@...semi.com>,
        "Shawn Guo" <shawnguo@...nel.org>,
        "Sascha Hauer" <s.hauer@...gutronix.de>,
        "Pengutronix Kernel Team" <kernel@...gutronix.de>,
        "Fabio Estevam" <festevam@...il.com>,
        "NXP Linux Team" <linux-imx@....com>,
        "Niklas Söderlund" 
        <niklas.soderlund@...natech.se>,
        "Heiko Stuebner" <heiko@...ech.de>,
        "Orson Zhai" <orsonzhai@...il.com>,
        "Baolin Wang" <baolin.wang7@...il.com>,
        "Chunyan Zhang" <zhang.lyra@...il.com>,
        "Zhang Rui" <rui.zhang@...el.com>,
        "Allison Randal" <allison@...utok.net>,
        "Enrico Weigelt" <info@...ux.net>,
        "Gayatri Kammela" <gayatri.kammela@...el.com>,
        "Thomas Gleixner" <tglx@...utronix.de>,
        "Bartlomiej Zolnierkiewicz" <b.zolnierkie@...sung.com>,
        kernel@...labora.com
Subject: Re: [PATCH v4 07/11] thermal: Use mode helpers in drivers

28. Mai 2020 21:22, "Andrzej Pietrasiewicz" <andrzej.p@...labora.com> schrieb:

> Use thermal_zone_device_{en|dis}able() and thermal_zone_device_is_enabled().
> 
> Consequently, all set_mode() implementations in drivers:
> 
> - can stop modifying tzd's "mode" member,
> - shall stop taking tzd's lock, as it is taken in the helpers
> - shall stop calling thermal_zone_device_update() as it is called in the
> helpers
> - can assume they are called when the mode truly changes, so checks to
> verify that can be dropped
> 
> Not providing set_mode() by a driver no longer prevents the core from
> being able to set tzd's mode, so the relevant check in mode_store() is
> removed.
> 
> Other comments:
> 
> - acpi/thermal.c: tz->thermal_zone->mode will be updated only after we
> return from set_mode(), so use function parameter in thermal_set_mode()
> instead, no need to call acpi_thermal_check() in set_mode()
> - thermal/imx_thermal.c: regmap writes and mode assignment are done in
> thermal_zone_device_{en|dis}able() and set_mode() callback
> - thermal/intel/intel_quark_dts_thermal.c: soc_dts_{en|dis}able() are a
> part of set_mode() callback, so they don't need to modify tzd->mode, and
> don't need to fall back to the opposite mode if unsuccessful, as the return
> value will be propagated to thermal_zone_device_{en|dis}able() and
> ultimately tzd's member will not be changed in thermal_zone_device_set_mode().
> - thermal/of-thermal.c: no need to set zone->mode to DISABLED in
> of_parse_thermal_zones() as a tzd is kzalloc'ed so mode is DISABLED anyway
> 
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@...labora.com>
> ---

[...]

> drivers/platform/x86/acerhdf.c | 17 +++++----

Acked-by: Peter Kaestle <peter@...e.net>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ