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: <35d4ae8f4c5157e3d0da39295a5b15eced367ab6.camel@sipsolutions.net>
Date: Mon, 12 Feb 2024 11:31:27 +0100
From: Johannes Berg <johannes@...solutions.net>
To: "Rafael J. Wysocki" <rafael@...nel.org>, Stanislaw Gruszka
	 <stanislaw.gruszka@...ux.intel.com>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>, Linux PM
 <linux-pm@...r.kernel.org>,  Miri Korenblit
 <miriam.rachel.korenblit@...el.com>, Lukasz Luba <lukasz.luba@....com>,
 LKML <linux-kernel@...r.kernel.org>, Daniel Lezcano
 <daniel.lezcano@...aro.org>,  Srinivas Pandruvada
 <srinivas.pandruvada@...ux.intel.com>, Zhang Rui <rui.zhang@...el.com>,
 netdev@...r.kernel.org, Ido Schimmel <idosch@...dia.com>, Petr Machata
 <petrm@...dia.com>, linux-wireless@...r.kernel.org,  Shawn Guo
 <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix
 Kernel Team <kernel@...gutronix.de>, Manaf Meethalavalappu Pallikunhi
 <quic_manafm@...cinc.com>
Subject: Re: [PATCH v1 6/9] iwlwifi: mvm: Set THERMAL_TRIP_WRITABLE_TEMP
 directly

On Fri, 2024-02-09 at 17:15 +0100, Rafael J. Wysocki wrote:
> > >       for (i = 0 ; i < IWL_MAX_DTS_TRIPS; i++) {
> > >               mvm->tz_device.trips[i].temperature = THERMAL_TEMP_INVALID;
> > >               mvm->tz_device.trips[i].type = THERMAL_TRIP_PASSIVE;
> > > +             mvm->tz_device.trips[i].type = THERMAL_TRIP_WRITABLE_TEMP;
> > 
> >                 mvm->tz_device.trips[i].flags = THERMAL_TRIP_WRITABLE_TEMP;
> > 
> > Consider using diffrent prefix for constants to diffrenciate flags and types.
> 
> Well, I can use THERMAL_TRIP_FLAG_RW_TEMP or similar, but is it really
> so confusing?
> 
> I'm wondering what others think.
> 

I'd tend to agree with Stanislaw. I did (eventually) notice the double
assignment to .type above, but had that not been visible in the context,
or you'd have removed the first one by accident, I'd really not have
thought about it twice.

The bug also makes it look like you even confused yourself ;-)

So having a clearer indication that it's a flag would make sense, I'd
say.

johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ