Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp309796lqo; Tue, 7 May 2024 23:41:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkgKH5Pg3Ki0g3KXjGJRMTc74n3uEo68Il+0m0PyhbtYzZsGV3AX9rn1t4LfJKQPmkqqdQkoY4VrdBkjgKSYb7NMf6RhmEO2DdmvPt8Q== X-Google-Smtp-Source: AGHT+IGLE5yCDlhe1gMQEs2w7m1OJ6UJN6cSYL6ZuiMa8IOPajbZ3wvTe7OXS+rxYv4mdgfElIZg X-Received: by 2002:a17:902:b58e:b0:1e1:3300:702b with SMTP id d9443c01a7336-1eeb0396d02mr14518255ad.15.1715150512326; Tue, 07 May 2024 23:41:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715150512; cv=pass; d=google.com; s=arc-20160816; b=q4PrcUvnvC0GMf7TbnRVHqhiTnp6cy+VJHpiuQ2YJIFGnAV2V4wNBrSjPknmT6r7U2 ghdT83cS+5jCdXRjgnA+WUUP+vwjZP5Yg7TdxoqLIf0lPpdylOeuEDfEIXGI6IZkmEML 8rGG0/nPZP1Zft62+1+3xvgc2PbtY2ADCuCK0RN0jeQfoUchh6ok3ONySnXgAxRGl+zu KvUxUPMu+QizrZEbxIXD7QhH+trCR6eHQ9J2vmOnSZQaA7k8o4Tw2YZsn+Ed8RydT524 zND5K/qQT9w60zMK0LLwNUTCHTNZ/vd9uHrXBZCXzAFwIY9bQFXx5kzmKwvaqjpCitc/ 4NHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=wSuOlJBLfo6FL8PHAyqA6/rvBRbnO/E3/dtuw+wRk7w=; fh=mEh49SO2KtXzumLNTjzGK/xQv/Qr74JYyqrrI9PFq8E=; b=ZuSwR1cm6wls48/sP4hoDJEfX4GIR6FYK8/p3tjdv6Pm/qkZgdMHvfEgXWInOsgvt6 L1L7BQl4sGcuuJ29fIoDg1HMJAeSpGDp+/PdL9hwtJ4wMnHc8jpErrOlRlgbaDrIWKfZ XC3t8w/BYsfXs8vpQm4J2qrVAW1V/5R8//7glSXOykajcvrY4Ay2g46lUcAnvW35MheE DCX7/+O4ZITJMzNv3SRVMMpb2Xr9QUhvL5vBljklDr20t3eL6tsHtex8fg5xVWIaB/iR KrHSWgdPvOSUBMy/yvgmygrgkgAaF1dNBFrDhloOBbpeJEL2bNHHtuiAq6DjqqLJMuSX Hvrg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PWP4irtH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-172661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172661-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id n16-20020a170902f61000b001eb0f19ab6asi12290830plg.514.2024.05.07.23.41.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 May 2024 23:41:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-172661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=PWP4irtH; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-172661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-172661-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id AA5C0B23522 for ; Wed, 8 May 2024 03:37:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 809BA20300; Wed, 8 May 2024 03:37:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="PWP4irtH" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (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 49371171A2; Wed, 8 May 2024 03:37:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715139426; cv=none; b=ElKtybpoMkxXBgc2qUjlKgxaIbbJss5qFJS7E5tMUyg5zSfNVI0zwqIaBu9iymor7m0k++ik1LnDWVzWnSHll5bhSLLYAPF8I7z5c1ioLWX04ihQ6Yu3uzSAg4caAuLVVBMtftNRflu9FUH6icSrakLEhFs4hhVm/Hmct3ypKtM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715139426; c=relaxed/simple; bh=VX4j3o8PuAumvX98LolK5x0BnWOyxYhPrqsi65acJqo=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=H7QvClJp8UNtN9vRWX0Jkl8cWXZUAoklY5vEf7YZvkbqqi8A/D9o3rrYKoGzr6rL/7jd9R3In30qweLzcgXSh0dB4I6bjY69TE+vcZdqg9rn22OyaNbOFkIe1gtghY40lwitE3NC5YphznfDKa956cV7x64ZqtvkgyK13vXvHKo= 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=PWP4irtH; arc=none smtp.client-ip=192.198.163.18 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=1715139425; x=1746675425; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=VX4j3o8PuAumvX98LolK5x0BnWOyxYhPrqsi65acJqo=; b=PWP4irtHuQ108ZNBr7YuB4alK36lD8S9r+ieInP4BDA3WyOn8508usPG frfX8bA9ZekPjNQE0EwdmBtgW4YaS1MvnffTNG8JHDxVF3wOVYkGI9dZ2 07ZJIUgu7kD9oNZF2h4+eyHAUT3XfqdAxTLzfVZIviF0lL7sMHTluEaou 6oOdEFXVLsAqbyznPEu0h84CW2KLC0o+NjOwaGzDzojwAzGLGFIWRjmBX ESfnS5BfdfelUjiS5gRH/owDCG9PcPXN7KsBKLXn7HcfbmtJccf3gxVCP JitxFgm1k+72dlyViBeVInkJZuyU5cgsSNiymIy3pGcJJoQZEMG0WJsPa A==; X-CSE-ConnectionGUID: ZNtiUPYrS6unZkD3KADRkg== X-CSE-MsgGUID: Iq+ZyGcDSEegd77kbALTaQ== X-IronPort-AV: E=McAfee;i="6600,9927,11066"; a="10820910" X-IronPort-AV: E=Sophos;i="6.08,144,1712646000"; d="scan'208";a="10820910" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2024 20:36:54 -0700 X-CSE-ConnectionGUID: YyQ012U5RCqIHJrpvyf/sQ== X-CSE-MsgGUID: 98kccrMhRkq07nRyGxlmfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,144,1712646000"; d="scan'208";a="33551931" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orviesa005.jf.intel.com with ESMTP; 07 May 2024 20:36:53 -0700 From: Ricardo Neri To: "Rafael J. Wysocki" Cc: Zhang Rui , Srinivas Pandruvada , Len Brown , Stanislaw Gruszka , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Ricardo Neri Subject: [PATCH v2 3/4] thermal: intel: hfi: Rename HFI_MAX_THERM_NOTIFY_COUNT Date: Tue, 7 May 2024 20:43:51 -0700 Message-Id: <20240508034352.18414-4-ricardo.neri-calderon@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240508034352.18414-1-ricardo.neri-calderon@linux.intel.com> References: <20240508034352.18414-1-ricardo.neri-calderon@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: When processing a hardware update, HFI generates as many thermal netlink events as needed to relay all the updated CPU capabilities to user space. The constant HFI_MAX_THERM_NOTIFY_COUNT is the number of CPU capabilities updated per each of those events. Give this constant a more descriptive name. Signed-off-by: Ricardo Neri --- Cc: Len Brown Cc: Srinivas Pandruvada Cc: Stanislaw Gruszka Cc: Zhang Rui Cc: linux-pm@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- Changes since v1: * None --- drivers/thermal/intel/intel_hfi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/intel/intel_hfi.c b/drivers/thermal/intel/intel_hfi.c index d82b8788b0f8..c6658f8c5cca 100644 --- a/drivers/thermal/intel/intel_hfi.c +++ b/drivers/thermal/intel/intel_hfi.c @@ -167,7 +167,7 @@ static DEFINE_MUTEX(hfi_instance_lock); static struct workqueue_struct *hfi_updates_wq; #define HFI_UPDATE_DELAY_MS 100 -#define HFI_MAX_THERM_NOTIFY_COUNT 16 +#define HFI_THERMNL_CAPS_PER_EVENT 16 static void get_hfi_caps(struct hfi_instance *hfi_instance, struct thermal_genl_cpu_caps *cpu_caps) @@ -218,14 +218,14 @@ static void update_capabilities(struct hfi_instance *hfi_instance) get_hfi_caps(hfi_instance, cpu_caps); - if (cpu_count < HFI_MAX_THERM_NOTIFY_COUNT) + if (cpu_count < HFI_THERMNL_CAPS_PER_EVENT) goto last_cmd; - /* Process complete chunks of HFI_MAX_THERM_NOTIFY_COUNT capabilities. */ + /* Process complete chunks of HFI_THERMNL_CAPS_PER_EVENT capabilities. */ for (i = 0; - (i + HFI_MAX_THERM_NOTIFY_COUNT) <= cpu_count; - i += HFI_MAX_THERM_NOTIFY_COUNT) - thermal_genl_cpu_capability_event(HFI_MAX_THERM_NOTIFY_COUNT, + (i + HFI_THERMNL_CAPS_PER_EVENT) <= cpu_count; + i += HFI_THERMNL_CAPS_PER_EVENT) + thermal_genl_cpu_capability_event(HFI_THERMNL_CAPS_PER_EVENT, &cpu_caps[i]); cpu_count = cpu_count - i; -- 2.34.1