mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>
Cc: Amit Kucheria <amitk@kernel.org>,
	Thara Gopinath <thara.gopinath@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	Zhang Rui <rui.zhang@intel.com>,
	Lukasz Luba <lukasz.luba@arm.com>,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org, kamal.wadhwa@oss.qualcomm.com,
	Pankaj Patil <pankaj.patil@oss.qualcomm.com>
Subject: Re: [PATCH] thermal: qcom-spmi-adc-tm5-gen3: move hardirq actions into threaded handler
Date: Thu, 12 Nov 2026 15:39:19 +0200	[thread overview]
Message-ID: <avXBhyKMlqaLUeGQ@ashevche-desk.local> (raw)
In-Reply-To: <5c879271-6e88-4683-a280-eef292c442ba@oss.qualcomm.com>

On Thu, Nov 12, 2026 at 01:54:13PM +0530, Jishnu Prakash wrote:
> On 11/11/2026 7:53 PM, Andy Shevchenko wrote:
> > On Wed, Nov 11, 2026 at 02:12:01PM +0530, Jishnu Prakash wrote:

...

> >> -static irqreturn_t adctm5_gen3_isr(int irq, void *dev_id)
> >> +static irqreturn_t adctm5_gen3_isr_thread(int irq, void *dev_id)
> >>  {
> >>  	struct adc_tm5_gen3_chip *adc_tm5 = dev_id;
> >> -	int ret, sdam_num;
> >> +	int sdam_index, ret;
> > 
> > Was the variable rename so important for the fix? Can we defer it to the later
> > cleanups, if ever needed?
> > 
> >>  	u8 tm_status[2];
> >>  	u8 status, val;

...

> >> -	struct adc_tm5_gen3_chip *adc_tm5 = dev_id;
> >> -	u8 tm_status[2];
> >> -	int sdam_index;
> > 
> > Okay, I see the reason now why it's done, but I noticed no mention of this in
> > the commit message. Also it's unclear which variable is used more often and
> > what is the real semantics of its value. Is it number or index?

> > With all this
> > in mind, please at bare minimum elaborate in the commit message and, if it's
> > actually a number, replace the other part instead.

^^^

> In both adctm5_gen3_isr() and adctm5_gen3_isr_thread(), we needed a variable to
> store the index of the SDAM whose IRQ was triggered. We called it 'sdam_num'
> in adctm5_gen3_isr() and 'sdam_index' in adctm5_gen3_isr_thread(). In the rest
> of the file, it is called 'sdam_index', so ideally that same name should have
> been used in adctm5_gen3_isr() too, as it is more accurate than 'sdam_num'.
> 
> As I mentioned at the end of the commit message, I just meant to drop adctm5_gen3_isr()
> and expand adctm5_gen3_isr_thread() to include the actions formerly done in
> adctm5_gen3_isr(), but I see the diff makes it look more like I modified adctm5_gen3_isr()
> into adctm5_gen3_isr_thread() with a variable rename, which is a bit misleading.
> 
> I can add a line in the commit message to emphasize that 'sdam_num' is the same as
> 'sdam_index' if you think it helps.

Yes, see above.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2026-11-12 13:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  8:42 Jishnu Prakash
2026-11-11 14:23 ` Andy Shevchenko
2026-11-12  8:24   ` Jishnu Prakash
2026-11-12 13:39     ` Andy Shevchenko [this message]

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=avXBhyKMlqaLUeGQ@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=jishnu.prakash@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukasz.luba@arm.com \
    --cc=pankaj.patil@oss.qualcomm.com \
    --cc=rafael@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=thara.gopinath@gmail.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®