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: <CAJZ5v0jJzGR1LSDaXDCAeysCerT7A_OOyMKqJpLbxEBR4_HyqQ@mail.gmail.com>
Date: Mon, 12 Feb 2024 13:03:08 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Johannes Berg <johannes@...solutions.net>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, 
	Stanislaw Gruszka <stanislaw.gruszka@...ux.intel.com>, "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 Mon, Feb 12, 2024 at 11:31 AM Johannes Berg
<johannes@...solutions.net> wrote:
>
> 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 ;-)

No, that's just a mistake.

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

Sure, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ