Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4603262rwl; Mon, 10 Apr 2023 13:54:23 -0700 (PDT) X-Google-Smtp-Source: AKy350ZOy2ZTq/TKk/GxBhs76vWEQXfCbIAhD3SwrVYLvGyFeZSNGBhRMw3qJqZPgF7vKoxs4Bp2 X-Received: by 2002:a05:6a20:3aa8:b0:da:39a5:6e66 with SMTP id d40-20020a056a203aa800b000da39a56e66mr236457pzh.18.1681160063160; Mon, 10 Apr 2023 13:54:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681160063; cv=none; d=google.com; s=arc-20160816; b=iCSsKa5WRsgN9nMVD1WUmILX+Bc2tqZlASsz14kOUV4jKp0uFma7iYc3ahO2Fti0r0 ZixqTeqqRop3mDGbitOitAsS9ShNS7uCTi4fDljFwhGHFFifStchoejvY1TAWR/SoAU0 35A51I/J6krygvooTmdnnw5UnXhnfMWAAxWHj0Hctm2/NHzAuQxXG27GyxVmtKgZ378h +9yCViSQFjjQ2hjUP+qWsI/9JHWuH/YP1CF7PYn6r+Dc52gG+ckVdoUxb+0cHa7cyJ8N 7C52qboq9DN+7caHicXDU4Z5iTIls7zq2x6UAkIGyEt/RzU3adJcE8H75jkIyB3dqh65 NPEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mIjogzcbB9NbNQDtYcUOxd5sO+Lh6rQ2yVngUMiZyBg=; b=zxvL/vRNqJo4Yf03PtcwAIbAjOaf8coxOCF3iymwr68iLQ4kr4og9n4u7cJdZWIboV Q8a8eb02bcCs9ig/50vdmjWxZvFaIIddX/LtdnuuRDrDPDEhhVWfiA580Yu0tjb7OL6j KRSUUOKRkf+oSWb8pOpmSPp/OxZMZ44QvB+I+V59cdIj+IFdnrmDk4PPthnfK92dG5+v kep8jKoU3+LcDoc2WTuznzkVNqlNdhclcJX/7pvfubGV+H0RIZO6DrfKNfYAZAnKlBUC nvPFJiZjF10CRbUpJXGw+nTC9mupGXVfo1i1D3vAogxXBpNq49kkD1zOCTcNjM/OXaFx FO8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xyL9hMXg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o7-20020a63f147000000b0050be2388723si11190990pgk.686.2023.04.10.13.54.11; Mon, 10 Apr 2023 13:54:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xyL9hMXg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229876AbjDJUxr (ORCPT + 99 others); Mon, 10 Apr 2023 16:53:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37454 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229839AbjDJUxn (ORCPT ); Mon, 10 Apr 2023 16:53:43 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E6EDAB for ; Mon, 10 Apr 2023 13:53:40 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id o18so5548364wro.12 for ; Mon, 10 Apr 2023 13:53:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681160019; x=1683752019; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mIjogzcbB9NbNQDtYcUOxd5sO+Lh6rQ2yVngUMiZyBg=; b=xyL9hMXg0TC02Yn0shvpreWa/MOZ4/qCU40KHDFzbPk+etV+QUJO8sEhYs7Mh+qN5n z5TJ456A6E4aXcNG8guYtLeuTgnNIZoQrAPuWXDhMxF2qi2tDteBqX8XUVWYuxZ4+Z5E zsG/hJcbj7+u8aPTR1PtZFNSRLLs0zNP0atsamdIbWdaqZqX4IQVevcLtf4QYIhoGi+o YeoxsZSweg1dEovNzju9QRZDjaNuqJiRtCXFiv0nGrlYeBNnuLe+HMJtSW7TnZVXIh6C zeqOndIytiIiRGgysHB/uOZiZs+x6LIceOoxamu3W5w2n2avV2dp59Wf9kXToT4NWx57 cA8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1681160019; x=1683752019; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mIjogzcbB9NbNQDtYcUOxd5sO+Lh6rQ2yVngUMiZyBg=; b=h90rkVsOQbx8G1yPvqdQKwycdcorN1DIFpRZG+rrngJ4KnrV15kBg9vxCyLTGsUy6j 13SnfI0CkN79BtJskBmCvTQyf9K8aOyGnrQQVL0QN27SboDAofn4vzXjBbo8apBMdOCv 2t069HwDylpjfQ26885q3GQSnB4kl0NEvj0TBw1hYaj49ntlgVBKqRKmO1wDtVK5lsWQ r1G1PvYD94DKDs0Cw82WZBvii4ek6PQOP0euoLBgKm5QS+SDts7EGsirzOC0SYlTQQay /LokJXJE0UBhdDCIYRxW1TlsTUC1KV2SLgWB2ZNeX7t1Qc35fuUzdqWWznlav0uO4t5K lkzA== X-Gm-Message-State: AAQBX9cLg5fApgyz8DZz0qgw6Ze/WmtPc0i4wtiFqMEeTZ9FZh3v9EFX WOqRQCSy2d8lHyqEuZVysUD+BCelap4LYD5JVVA= X-Received: by 2002:a05:6000:1b0c:b0:2ce:ada5:325d with SMTP id f12-20020a0560001b0c00b002ceada5325dmr7589428wrz.37.1681160018690; Mon, 10 Apr 2023 13:53:38 -0700 (PDT) Received: from mai.box.freepro.com ([2a05:6e02:1041:c10:2611:592:3b9e:d2ae]) by smtp.gmail.com with ESMTPSA id e17-20020adffc51000000b002ef2e148d59sm11966789wrs.16.2023.04.10.13.53.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Apr 2023 13:53:38 -0700 (PDT) From: Daniel Lezcano To: daniel.lezcano@linaro.org, rafael@kernel.org Cc: rui.zhang@intel.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Amit Kucheria , Kunihiko Hayashi , Tim Zimmermann Subject: [PATCH v2 1/7] thermal/drivers/intel_pch_thermal: Use thermal driver device to write a trace Date: Mon, 10 Apr 2023 22:52:59 +0200 Message-Id: <20230410205305.1649678-2-daniel.lezcano@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230410205305.1649678-1-daniel.lezcano@linaro.org> References: <20230410205305.1649678-1-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The pch_critical() callback accesses the thermal zone device structure internals, it dereferences the thermal zone struct device and the 'type'. For the former, the driver related device should be use instead and for the latter an accessor already exists. Use them instead of accessing the internals. Signed-off-by: Daniel Lezcano --- drivers/thermal/intel/intel_pch_thermal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/intel/intel_pch_thermal.c b/drivers/thermal/intel/intel_pch_thermal.c index dce50d239357..0de46057db2a 100644 --- a/drivers/thermal/intel/intel_pch_thermal.c +++ b/drivers/thermal/intel/intel_pch_thermal.c @@ -127,7 +127,10 @@ static int pch_thermal_get_temp(struct thermal_zone_device *tzd, int *temp) static void pch_critical(struct thermal_zone_device *tzd) { - dev_dbg(&tzd->device, "%s: critical temperature reached\n", tzd->type); + struct pch_thermal_device *ptd = thermal_zone_device_priv(tzd); + + dev_dbg(&ptd->pdev->dev, "%s: critical temperature reached\n", + thermal_zone_device_type(tzd)); } static struct thermal_zone_device_ops tzd_ops = { -- 2.34.1