Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1015299rdb; Fri, 9 Feb 2024 07:55:16 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX4tDD/2P4GlXgz4x0UeSIP81640vwZQzcuE/IBFxXeO94CBPHOn2OBz8NO9B5XhY4WlLiPBNfVHxCEPi7i+ISJVRBTJYHOSYhxoz6U1A== X-Google-Smtp-Source: AGHT+IFfGgnSpszUIr+eMGncMnCSTwwyYe1wNXnk1uP0ia+udHkL9BHSxFlR77nEwbWSZWy0tUs8 X-Received: by 2002:a05:6214:3292:b0:68c:91be:68ea with SMTP id mu18-20020a056214329200b0068c91be68eamr2164005qvb.38.1707494116034; Fri, 09 Feb 2024 07:55:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707494116; cv=pass; d=google.com; s=arc-20160816; b=XMvv44Lzm4G9CueKk26bbol6JD5BQLHIa0moCmjwKPho1N8xISY2ROf0JSxpp/aAKD Bv6+zY+WE1J5xeKCic/fiPhyRosf0P4t7qtbk/AXDcWLKmTUjRpJkn5gHbrdqw7ueXPf NnYnWSzC5jOQ21GfX/m1Sqy2ExefH8uz23lu8O9AIEX9uPKjAtU0yveVLg2y9dxpt4iA mp5eNhy4JLnAbbh82obTCLs6Sz+eWvNRsgHz+x2bbZGztwjSMHZFOUT8k5pxpQnFRwb4 cwYygwe5s3cDbKsjZ8gz+OqEtcLy6ckA3SbAQuE/rm8rjBkgynD37AjuaR51yt+s1y79 mTnw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/uOrjB57bl0ZVSTB00pin0maWeg4PGP+2nTNVP+KGUs=; fh=SRn9y2j2uKIbl7pprkgbyYXv6nipH31JPp+z+8ZypvU=; b=UuLNYPtS6n8KkJKJFkyYEDMzZBq3pF5f+s5/bxmz6cgw6xlxjrsm+AATXX5rLDByIL s4Dhw3PInpizPFGQfc86hqhb2QhvyeAoUVmFfPiUlLmcGHlos/P3fs1MTkTOLsNUeDXG pm0MuixCiTrk2FxUUzkS9xGba7Nin6kpTyxoKUs82vX3jUwBvoZ9kvMhMvaqij3hS1Np nUty4Gn6unmEhNKUio31MI61ekMRibVt/2MZy6dtz/5LTZ3ScgrV+4hc1lOMz2/9XGhE 805cqjCz2WUGvCdMngzrdcXAeiflX0DpacMGfhYDFoGsEIwzcJPLBKdRGAvM7GJkyRle MReA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Xba1DbnX; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-wireless+bounces-3400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=2; AJvYcCVI1SBStHqOUfVqZ3vC763JnXFSvHVXaL+Koy4wPm7a471bbgszfSBHkS46UGCrBExu25gg3XqhnkF9sdtH9dAfxwgyESpKmtNJPo2TkQ== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id pz15-20020ad4550f000000b0068cd3736ae3si1478523qvb.91.2024.02.09.07.55.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 07:55:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Xba1DbnX; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-wireless+bounces-3400-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3400-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3638A1C22F96 for ; Fri, 9 Feb 2024 14:50:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 845196A028; Fri, 9 Feb 2024 14:50:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Xba1DbnX" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 98F1037145; Fri, 9 Feb 2024 14:50:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707490202; cv=none; b=LHnWLG0r7aciOsNDoNY2M7GP07jyAomzz7VPke2WRAKSerE9Fi11RJ3HHcZdtMSFpE+y/ImwdGquFXIk3s84/fZs5fqZPfDugYvj2n2PeVpRFKJM0ZeVMvlDI6PTGwepj5FwmgjQEY4uTRbMetl0lnOBc1xGlvzF9hl34Yme4JA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707490202; c=relaxed/simple; bh=BKZ2mtO8cS0Ik5dmaQV6ifo7dNShLGEHdT1wapWSz8M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YlGOSgQt5h56j4DoVSPScfLQw7vplYpkaF8NLVi5tIyeuk3HZ7FBY3Q1/DOIII7kGgD9dVyUnbvvTJ3Pl/KFi40732xANnUFmJhElQfVp6Zpxu6zIxTCGQWJjSYJpzhJsYNXZRkly5y0Ncahtj2xImjfzNrAI6EZXNvqpVpAnQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Xba1DbnX; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707490201; x=1739026201; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=BKZ2mtO8cS0Ik5dmaQV6ifo7dNShLGEHdT1wapWSz8M=; b=Xba1DbnXMnOwY7vxa+JxDvLFth77t3bFqcpyZcXR9znBRGEKkx9OTjrV 3Ubof3meJc3b37drBKBT0MMVuiPK5v5Q+WaVK1PS5gDGJNeU+PqGkC2mT 3sebE3uHJsSh7cIQbhSgb7+90/XAlPcOyfhQxEEDRkKmADRulK9pdp30i 9StDVcXuZOw/TIuLS8I85qS2dJlOnq/n5imAcMWI7fdbEDb/5qCxVjyUy 4pt7UM1ni2xiL/OlHOHpsF8Jxa6SaF9i0vHSipVb09hgK9Ze7OLXyE6L+ 4mZfo4Vs7+bi8N4rhPLDRcJuGKw0p8OvbO0oLUWuh3ERt/XKHkVGMe9cB Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="12810651" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="12810651" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 06:50:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10979"; a="825157463" X-IronPort-AV: E=Sophos;i="6.05,257,1701158400"; d="scan'208";a="825157463" Received: from sgruszka-mobl.ger.corp.intel.com (HELO localhost) ([10.252.43.96]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Feb 2024 06:49:53 -0800 Date: Fri, 9 Feb 2024 15:49:51 +0100 From: Stanislaw Gruszka To: "Rafael J. Wysocki" Cc: 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 Subject: Re: [PATCH v1 6/9] iwlwifi: mvm: Set THERMAL_TRIP_WRITABLE_TEMP directly Message-ID: References: <3232442.5fSG56mABF@kreacher> <3757041.MHq7AAxBmi@kreacher> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3757041.MHq7AAxBmi@kreacher> On Fri, Feb 09, 2024 at 03:10:24PM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > It is now possible to flag trip points with THERMAL_TRIP_WRITABLE_TEMP > to allow their temperature to be set from user space via sysfs instead > of using a nonzero writable trips mask during thermal zone registration, > so make the iwlwifi code do that. > > No intentional functional impact. > > Note that this change is requisite for dropping the mask argument from > thermal_zone_device_register_with_trips() going forward. > > Signed-off-by: Rafael J. Wysocki > --- > > This patch obviously depends on > > https://patchwork.kernel.org/project/linux-pm/patch/8346768.T7Z3S40VBb@kreacher/ > > which has been queued up for 6.9 already. > > --- > drivers/net/wireless/intel/iwlwifi/mvm/tt.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > Index: linux-pm/drivers/net/wireless/intel/iwlwifi/mvm/tt.c > =================================================================== > --- linux-pm.orig/drivers/net/wireless/intel/iwlwifi/mvm/tt.c > +++ linux-pm/drivers/net/wireless/intel/iwlwifi/mvm/tt.c > @@ -667,9 +667,6 @@ static struct thermal_zone_device_ops t > .set_trip_temp = iwl_mvm_tzone_set_trip_temp, > }; > > -/* make all trips writable */ > -#define IWL_WRITABLE_TRIPS_MSK (BIT(IWL_MAX_DTS_TRIPS) - 1) > - > static void iwl_mvm_thermal_zone_register(struct iwl_mvm *mvm) > { > int i, ret; > @@ -692,11 +689,12 @@ static void iwl_mvm_thermal_zone_registe > 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. Regards Stanislaw > } > mvm->tz_device.tzone = thermal_zone_device_register_with_trips(name, > mvm->tz_device.trips, > IWL_MAX_DTS_TRIPS, > - IWL_WRITABLE_TRIPS_MSK, > + 0, > mvm, &tzone_ops, > NULL, 0, 0); > if (IS_ERR(mvm->tz_device.tzone)) { > > >