lkml.org 
[lkml]   [2024]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 6/9] iwlwifi: mvm: Set THERMAL_TRIP_WRITABLE_TEMP directly
On Mon, Feb 12, 2024 at 11:31 AM Johannes Berg
<johannes@sipsolutions.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!

\
 
 \ /
  Last update: 2024-05-27 14:58    [W:0.083 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site