mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Zhang, Rui" <rui.zhang@intel.com>
To: "srinivas.pandruvada@linux.intel.com"
	<srinivas.pandruvada@linux.intel.com>,
	"lukasz.luba@arm.com" <lukasz.luba@arm.com>,
	"rafael@kernel.org" <rafael@kernel.org>,
	"daniel.lezcano@linaro.org" <daniel.lezcano@linaro.org>
Cc: "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] thermal: intel: int340x: Allow temperature override
Date: Fri, 6 Jun 2025 07:22:27 +0000	[thread overview]
Message-ID: <0fcd95bc6e9b300caa7d3029c9c43e9b5de6627e.camel@intel.com> (raw)
In-Reply-To: <63d616ac8bb1dbac9eebf10953886a5ce3274940.camel@linux.intel.com>

On Thu, 2025-06-05 at 10:20 -0700, srinivas pandruvada wrote:
> > >  
> > >  int proc_thermal_ptc_add(struct pci_dev *pdev, struct
> > > proc_thermal_device *proc_priv)
> > >  {
> > > @@ -230,10 +289,13 @@ int proc_thermal_ptc_add(struct pci_dev
> > > *pdev,
> > > struct proc_thermal_device *proc_
> > >  
> > >  		for (i = 0; i < PTC_MAX_INSTANCES; i++) {
> > >  			ptc_instance[i].offset = ptc_offsets[i];
> > > +			ptc_instance[i].pdev = pdev;
> > >  			ptc_create_groups(pdev, i,
> > > &ptc_instance[i]);
> > >  		}
> > >  	}
> > >  
> > > +	ptc_create_debugfs();
> > > +
> > 
> > should we create the debugfs only when PROC_THERMAL_FEATURE_PTC is
> > set?
> 
> This function is only called when
>  if (feature_mask & PROC_THERMAL_FEATURE_PTC) {
> }
> 
> 
right, then the
   if (proc_priv->mmio_feature_mask & PROC_THERMAL_FEATURE_PTC)
check in proc_thermal_ptc_add() is redundant.


BTW, in proc_thermal_mmio_add() and proc_thermal_mmio_remove(), we

1. call the rapl/ptc/rfim/wt_req/wt_hint .add() functions with the
feature mask check in proc_thermal_mmio_add()

2. call the .remove() functions without the feature mask check in failure
cases in proc_thermal_mmio_add().

3. call the .remove() functions with feature mask check in
proc_thermal_mmio_remove()

This is inconsistent. If you agree, I'd like to propose a cleanup patch
to make them work in a unified way.

thanks,
rui

  reply	other threads:[~2025-06-06  7:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-04 20:35 [PATCH 1/2] thermal: intel: int340x: Add performance control for platform temperature control Srinivas Pandruvada
2025-06-04 20:35 ` [PATCH 2/2] thermal: intel: int340x: Allow temperature override Srinivas Pandruvada
2025-06-05  2:18   ` Zhang, Rui
2025-06-05 17:20     ` srinivas pandruvada
2025-06-06  7:22       ` Zhang, Rui [this message]
2025-06-06 21:19         ` srinivas pandruvada
2025-06-04 20:55 ` [PATCH 1/2] thermal: intel: int340x: Add performance control for platform temperature control Rafael J. Wysocki
2025-06-04 21:40   ` srinivas pandruvada
2025-06-05  3:06 ` Zhang, Rui
2025-06-05 17:25   ` srinivas pandruvada
2025-06-06  7:34     ` Zhang, Rui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0fcd95bc6e9b300caa7d3029c9c43e9b5de6627e.camel@intel.com \
    --to=rui.zhang@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=rafael@kernel.org \
    --cc=srinivas.pandruvada@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®