lkml.org 
[lkml]   [2022]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] HPE BMC GXP SUPPORT
From
Date
On Fri, 2022-02-04 at 12:05 +0000, Russell King (Oracle) wrote:
> On Wed, Feb 02, 2022 at 10:52:50AM -0600, nick.hawkins@hpe.com wrote:
[]
> > diff --git a/drivers/clocksource/Makefile b/drivers/clocksource/Makefile
[]
> > +static irqreturn_t gxp_time_interrupt(int irq, void *dev_id)
> > +{
> > + struct gxp_timer *timer = dev_id;
> > + void (*event_handler)(struct clock_event_device *timer);
> > +
> > +
>
> One too many blank lines.
>
> > + if (readb_relaxed(timer->control) & MASK_TCS_TC) {
> > + writeb_relaxed(MASK_TCS_TC, timer->control);
> > +
> > + event_handler = READ_ONCE(timer->evt.event_handler);
> > + if (event_handler)
> > + event_handler(&timer->evt);
> > + return IRQ_HANDLED;
> > + } else {
> > + return IRQ_NONE;
> > + }
> > +}

It's also less indented code and perhaps clearer to reverse the test

if (!readb_relaxed(timer->control) & MASK_TCS_TC)
return IRQ_NONE;

writeb_relaxed(MASK_TCS_TC, timer->control);

event_handler = READ_ONCE(timer->evt.event_handler);
if (event_handler)
event_handler(&timer->evt);

return IRQ_HANDLED;


\
 
 \ /
  Last update: 2022-02-04 13:19    [W:0.186 / U:0.124 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site