Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2408779rdb; Mon, 12 Feb 2024 04:09:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUb8URwRWmu7XJae+65u0Rb9FEfVc5Jx3iVDvlbbiCS/sHdLuugK5OFLqYNAwBUjzMKAW3JdabmdVC+JpTqyXqUgYxOHtSPMR3GSuypSg== X-Google-Smtp-Source: AGHT+IGAvYjMskI0RXpZ7Sb4nkTiUxenQ7nqkc3h03H8Tpj2jA1A3WmWzj8WXgYSy9vjSd5F/U7Q X-Received: by 2002:a05:6a20:c991:b0:19e:378a:124c with SMTP id gy17-20020a056a20c99100b0019e378a124cmr9349662pzb.12.1707739755516; Mon, 12 Feb 2024 04:09:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707739755; cv=pass; d=google.com; s=arc-20160816; b=o84rIsDFXSHxSIUK84ckwu2xkc52nYpnnU236zPJQva7zFFwixLeP1DMfKp0NaAib3 hveEowUe2oKvFlc5FlpwI4QbTnIxhjlFVMJKxHX3r5USolBsXeWvv81uzvvBd0T24jnx sUX5aYCvEK8J8ZuL88okUVUrnTv2aT4hH/g8LgUb64otGet1/gOBB29DlUe10K+P1ns3 PYKCBFVISwBCF8w5JcpLdYgXMm9cXbN1OaJal7hh3TrsOWx4aX48Qp28fQmYtVieA8yZ bg/gfMOhXzOj1Dn2B7BLHQ5BBzNBq93dKaEuB7iG1FbLClzgd4uJxvKmwQbGbl6LhuUb 3zMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=UOYodCfh0GuqCNxZvnHyKyee8GZYuYBo58cLH6hYt/c=; fh=DKQPTvQ8xoS9HSjJezvk6pII0K9T8xLVGisqJxHqJos=; b=nk2bbExxfew4k59CBYTRFHKX3kwiGqbZTJHDHEeEb9MQCyAICXNxbEyOltHwk0Nw9v bVhlGxcudJWBXkzUkNWb8H7TLanENrM+1rrC6KEx8JeDAHQllFys6RBZKG7rht81w73w Pg9axeoR4EU9lebC5TTjtYbLjtHsv5NwxdNq79agKx/iVfvXJqH2wPBK/tfwmeVY+zDV ZlgXVT0AoCjx3GDRhXYlv5+S2gLwDJ7Dz/18nIsQ6Rae7ae9rBrlI90zLQtDgm3bv1Ai JRcQ7RDosXO2t32l72m49n6kdBhqaSbt/PxZxFaNYLXEd5jd2k5aIcBfGAqfTTS/nCXA /8Ew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-61510-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCW1Ce0AQGZdaK0tpY5TVNSnwcY7T6k0RLIL31XexmSS9HOWH8d1/mAB1aCPD38qtb6aiaUaJMY1VhyLL7V4/25BzG0DLDktX5BAfIP2xQ== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id kq16-20020a056a004b1000b006da83a2ceadsi4841315pfb.328.2024.02.12.04.09.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Feb 2024 04:09:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-61510-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-61510-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-61510-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3041A2821CB for ; Mon, 12 Feb 2024 12:09:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1CC2B39FF5; Mon, 12 Feb 2024 12:03:23 +0000 (UTC) Received: from mail-oa1-f46.google.com (mail-oa1-f46.google.com [209.85.160.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12D053D964; Mon, 12 Feb 2024 12:03:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707739402; cv=none; b=cCR1OW/rJs0JBmc8wzVUIOHKQH14P1xyGp0LurSweP4lmj0Hj85idnXMrg63klJAOasvPJRSmI4gZRDrWlyGSrbGj1LPOrNE0vxIYD4e0H6IvaD61puHaVti8TiSVqeBtSEsVt6P03eC6gGwQ0m6xSA9kgPN9uIIeqm+NtaQCA8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707739402; c=relaxed/simple; bh=rfED2IXGqOBD+K1HnRdLQdhtHs14ZMAFcdInDfpTlXw=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=gEmRuP4jJlvPE7P4cAM3fNZa+Jf6j+QNFL3nA0BM4h/VHA77MRZcw0+XQlzQaoLOKBidx10aXiIoLu8D89OBNFBO/Ky56O1HuEva7v0qq60nApgiK+jEHTQTl5awQ9Y0D6SwtVAWBs0D/TXAcSAJDRf+oOq873KIo8aBLvq8ZVk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.160.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-f46.google.com with SMTP id 586e51a60fabf-218e7bb0034so752005fac.0; Mon, 12 Feb 2024 04:03:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707739400; x=1708344200; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UOYodCfh0GuqCNxZvnHyKyee8GZYuYBo58cLH6hYt/c=; b=j8dsYKWC5SmOnPXgIteRWMuXUiK3Oa69EZdy3xxr+CaRv7HrsuU/+P2GL3a8Oq/4Pi a1xxvCs0HceZQE9mENQPwOFLRC6YnVJ1lo8GbjZ8BukPzna5kN0Ms+SLBSNZ+5JXsLc8 O1TwyA3rEvSUFzfgmf7nBzxK6RFquIOZNra/0DREkdZRzm4j7STjUfNguxU+SMvEhls6 jwgt+Nal+8E1vazXC7Nosm8YSDbGNzO2OdnkrMQmgpfghcTdrPleSaoXGDNXQ3VXk2OK SMW0rOdNeifn72DwxLxWFqacA6ptVy4uLW7LOzGaAj44yGAtnRN1IJhXR41Bbi8XU3sB yzfw== X-Forwarded-Encrypted: i=1; AJvYcCXd9I5Wzwk+78IewwEkzmnfmWdoV9VEpUlH6FYMllkeI26FsVR+2qExolBhZ4WcX+sjQg2jvUro7QfcOWi2XfkOEnvoBNOuKnrmHACspPgLPWQbns+v1kN5GcTKbu0BtkFD46ABQXdRPShhukW+PPMAV33jGJptkcIh/G+XtxUZnaR57M+CH7eVEdvQbOBGEFPDxhFSSK58WK4M5OtiOw== X-Gm-Message-State: AOJu0YzKY1mQHkZwqDppSficfX9XqaCNdfHVh4KqMsb1n2ggp4b/L0EP BGMAMZQ4pW0frPXlwMktMcVzw/Rade+u+IrGFbxp3k4jsMpBrgR3GTWx1CNVdov+pXSACxDf0Ie O2Kj5v2k4bO8OgSkIUwpkGt4//xI= X-Received: by 2002:a4a:a6cd:0:b0:59c:d8cd:ecee with SMTP id i13-20020a4aa6cd000000b0059cd8cdeceemr5262334oom.1.1707739399881; Mon, 12 Feb 2024 04:03:19 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <3232442.5fSG56mABF@kreacher> <3757041.MHq7AAxBmi@kreacher> <35d4ae8f4c5157e3d0da39295a5b15eced367ab6.camel@sipsolutions.net> In-Reply-To: <35d4ae8f4c5157e3d0da39295a5b15eced367ab6.camel@sipsolutions.net> From: "Rafael J. Wysocki" Date: Mon, 12 Feb 2024 13:03:08 +0100 Message-ID: Subject: Re: [PATCH v1 6/9] iwlwifi: mvm: Set THERMAL_TRIP_WRITABLE_TEMP directly To: Johannes Berg Cc: "Rafael J. Wysocki" , Stanislaw Gruszka , "Rafael J. Wysocki" , Linux PM , Miri Korenblit , Lukasz Luba , LKML , Daniel Lezcano , Srinivas Pandruvada , Zhang Rui , netdev@vger.kernel.org, Ido Schimmel , Petr Machata , linux-wireless@vger.kernel.org, Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Manaf Meethalavalappu Pallikunhi Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 12, 2024 at 11:31=E2=80=AFAM Johannes Berg wrote: > > On Fri, 2024-02-09 at 17:15 +0100, Rafael J. Wysocki wrote: > > > > for (i =3D 0 ; i < IWL_MAX_DTS_TRIPS; i++) { > > > > mvm->tz_device.trips[i].temperature =3D THERMAL_TEMP_= INVALID; > > > > mvm->tz_device.trips[i].type =3D THERMAL_TRIP_PASSIVE= ; > > > > + mvm->tz_device.trips[i].type =3D THERMAL_TRIP_WRITABL= E_TEMP; > > > > > > mvm->tz_device.trips[i].flags =3D THERMAL_TRIP_WRITAB= LE_TEMP; > > > > > > Consider using diffrent prefix for constants to diffrenciate flags an= d 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!