intel / thermal_daemon

Thermal daemon for IA
GNU General Public License v2.0
539 stars 117 forks source link

duplicate type_type == HOT comparison in src/thd_zone.h #404

Closed ColinIanKing closed 1 year ago

ColinIanKing commented 1 year ago

In src/thd_zone.h in lines 182..190 we have a duplicated trip_type == HOT comparison. Either one is redundant or perhaps there is a different type that was meant to be compared.

                for (unsigned int i = 0; i < trip_points.size(); ++i) {
                        trip_point_type_t trip_type = trip_points[i].get_trip_type();
                        if (trip_type==HOT|| trip_type==HOT || trip_type==MAX )
                        {
                                thd_log_info("keep cdev trip_point %d temp=%d\n", i, trip_points[i].get_trip_temp());
                        }
                        else
                                trip_points[i].delete_cdevs();
                }
spandruvada commented 1 year ago

Fixed. Thanks for reporting.