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] [day] [month] [year] [list]
Message-ID: <20241214141737.1c3a305e@jic23-huawei>
Date: Sat, 14 Dec 2024 14:17:37 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Daniel Lezcano
 <daniel.lezcano@...aro.org>, Zhang Rui <rui.zhang@...el.com>, Lukasz Luba
 <lukasz.luba@....com>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
 <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Lars-Peter
 Clausen <lars@...afoo.de>, Lee Jones <lee@...nel.org>, Stephen Boyd
 <sboyd@...nel.org>, Amit Kucheria <amitk@...nel.org>, Thara Gopinath
 <thara.gopinath@...il.com>, "Bjorn Andersson" <andersson@...nel.org>,
 Konrad Dybcio <konradybcio@...nel.org>, Ajit Pandey
 <quic_ajipan@...cinc.com>, Imran Shaik <quic_imrashai@...cinc.com>, Taniya
 Das <quic_tdas@...cinc.com>, "Jagadeesh Kona" <quic_jkona@...cinc.com>,
 <quic_kamalw@...cinc.com>, <quic_jprakash@...cinc.com>,
 <linux-arm-msm@...r.kernel.org>, <linux-pm@...r.kernel.org>,
 <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
 <linux-iio@...r.kernel.org>
Subject: Re: [PATCH RFC v2 3/5] thermal: qcom: Add support for MBG thermal
 monitoring

On Thu, 12 Dec 2024 21:41:22 +0530
Satya Priya Kakitapalli <quic_skakitap@...cinc.com> wrote:

> Add driver for the MBG thermal monitoring device. It monitors
> the die temperature, and when there is a level 1 upper threshold
> violation, it receives an interrupt over spmi. The driver reads
> the fault status register and notifies thermal accordingly.
> 
> Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>
Just a quick comment on consistency of formatting.

> +static int mbg_tm_set_trip_temp(struct thermal_zone_device *tz, int low_temp,
> +						int temp)
> +{
> +	struct mbg_tm_chip *chip = thermal_zone_device_priv(tz);
> +	int ret = 0;
> +
> +	guard(mutex)(&chip->lock);
> +
> +	/* The HW has a limitation that the trip set must be above 25C */
> +	if (temp > MBG_MIN_TRIP_TEMP && temp < MBG_MAX_SUPPORTED_TEMP) {
> +		regmap_set_bits(chip->map,
> +			chip->base + MBG_TEMP_MON2_MISC_CFG, MON2_UP_THRESH_EN);
> +		ret = regmap_write(chip->map, chip->base + MON2_LVL1_UP_THRESH,
> +						temp_to_vtemp(temp));
Alignment in this driver should be consistent / tidied up.

I'm not sure on style preferred in thermal, but I'd always default to align
after the opening bracket + wrap at 80 chars unless readability is hurt.


> +		if (ret < 0)
> +			return ret;
> +	} else {
> +		dev_dbg(chip->dev, "Set trip b/w 25C and 160C\n");
> +		regmap_clear_bits(chip->map,
> +			chip->base + MBG_TEMP_MON2_MISC_CFG, MON2_UP_THRESH_EN);
> +	}




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ