mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ayyathurai, Vijayakannan" <vijayakannan.ayyathurai@intel.com>
To: Daniel Lezcano <daniel.lezcano@linaro.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
	"will@kernel.org" <will@kernel.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"andriy.shevchenko@linux.intel.com" 
	<andriy.shevchenko@linux.intel.com>,
	"mgross@linux.intel.com" <mgross@linux.intel.com>,
	"Wan Mohamad,
	Wan Ahmad Zainie"  <wan.ahmad.zainie.wan.mohamad@intel.com>,
	"Raja Subramanian,
	Lakshmi Bai"  <lakshmi.bai.raja.subramanian@intel.com>,
	"Seow, Chen Yong" <chen.yong.seow@intel.com>
Subject: RE: [PATCH v2 2/2] clocksource: Add Intel Keem Bay Timer Support
Date: Tue, 19 Jan 2021 02:56:36 +0000	[thread overview]
Message-ID: <DM6PR11MB4250EB33E23178D211D0411DFBA30@DM6PR11MB4250.namprd11.prod.outlook.com> (raw)
In-Reply-To: <73330c8b-4633-4a13-b4b5-7405ff1661fe@linaro.org>

Hi Daniel,

> From: Daniel Lezcano <daniel.lezcano@linaro.org>
> > From: Vijayakannan Ayyathurai <vijayakannan.ayyathurai@intel.com>
> 
> [ ... ]
> 
> > +static struct timer_of keembay_ce_to = {
> > +	.flags	= TIMER_OF_IRQ | TIMER_OF_BASE | TIMER_OF_CLOCK,
> > +	.clkevt = {
> > +		.name			= "keembay_sys_clkevt",
> > +		.features		= CLOCK_EVT_FEAT_PERIODIC |
> > +					  CLOCK_EVT_FEAT_ONESHOT  |
> > +					  CLOCK_EVT_FEAT_DYNIRQ,
> > +		.rating			= TIM_RATING,
> > +		.set_next_event		=
> keembay_timer_set_next_event,
> > +		.set_state_periodic	= keembay_timer_periodic,
> > +		.set_state_shutdown	= keembay_timer_shutdown,
> > +	},
> > +	.of_base = {
> > +		.index = 0,
> > +	},
> > +	.of_irq = {
> > +		.handler = keembay_timer_isr,
> > +		.flags = IRQF_TIMER | IRQF_IRQPOLL,
> 
> Is the IRQPOLL flag really needed here ?
> 

Not really needed. I will remove this redundant Flag in my next version.

> > +static int __init keembay_timer_init(struct device_node *np)
> > +{
> > +	struct keembay_init_data data;
> > +	int ret;
> > +
> > +	data.base = of_iomap(np, 2);
> > +	if (!data.base)
> > +		return -ENXIO;
> > +
> > +	ret = keembay_clocksource_init(np, &data);
> > +	if (ret)
> > +		goto exit;
> > +
> > +	ret = keembay_clockevent_init(np, &data);
> 
> Is this missing ?
> 

Yes. Either case it goes to the exit path. So I thought of avoiding this error handling code.

> 	if (ret)
> 		goto exit;
> 
> 	return 0;
> 
> > +
> > +exit:
> > +	keembay_timer_cleanup(np, &data);
> > +
> > +	return ret;
> > +}
> > +
> > +TIMER_OF_DECLARE(keembay_timer, "intel,keembay-timer",
> keembay_timer_init);
> >
> 

Thanks,
Vijay

  reply	other threads:[~2021-01-19  2:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30  6:25 [PATCH v2 0/2] Add drivers for Intel Keem Bay SoC timer block vijayakannan.ayyathurai
2020-12-30  6:25 ` [PATCH v2 1/2] dt-bindings: timer: Add bindings for Intel Keem Bay SoC timer vijayakannan.ayyathurai
2020-12-31 15:34   ` Rob Herring
2021-01-01 16:12     ` Ayyathurai, Vijayakannan
2020-12-30  6:25 ` [PATCH v2 2/2] clocksource: Add Intel Keem Bay Timer Support vijayakannan.ayyathurai
2021-01-18 15:56   ` Daniel Lezcano
2021-01-19  2:56     ` Ayyathurai, Vijayakannan [this message]
2021-01-19  8:50       ` andriy.shevchenko
2021-01-20 19:18         ` Ayyathurai, Vijayakannan
2021-01-13 10:54 ` [PATCH v2 0/2] Add drivers for Intel Keem Bay SoC timer block Ayyathurai, Vijayakannan
2021-01-18 15:34   ` Daniel Lezcano
2021-01-19  1:55     ` Ayyathurai, Vijayakannan

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=DM6PR11MB4250EB33E23178D211D0411DFBA30@DM6PR11MB4250.namprd11.prod.outlook.com \
    --to=vijayakannan.ayyathurai@intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=catalin.marinas@arm.com \
    --cc=chen.yong.seow@intel.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lakshmi.bai.raja.subramanian@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgross@linux.intel.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=wan.ahmad.zainie.wan.mohamad@intel.com \
    --cc=will@kernel.org \
    /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®