All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Khadija Kamran <kamrankhadijadj@gmail.com>
Cc: Ira Weiny <ira.weiny@intel.com>,
	outreachy@lists.linux.dev, hvaibhav.linux@gmail.com,
	johan@kernel.org, elder@kernel.org, gregkh@linuxfoundation.org,
	greybus-dev@lists.linaro.org, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging: greybus: add a single exit path to arche_platform_wd_irq()
Date: Sun, 2 Apr 2023 20:07:27 -0700	[thread overview]
Message-ID: <ZCpC7wpDsUFZVWkQ@aschofie-mobl2> (raw)
In-Reply-To: <ZCoqMSy1Ary0sAp9@khadija-virtual-machine>

On Mon, Apr 03, 2023 at 06:21:53AM +0500, Khadija Kamran wrote:
> On Sun, Apr 02, 2023 at 05:37:48PM -0700, Ira Weiny wrote:
> > Khadija Kamran wrote:
> > > arche_platform_wd_irq() function has two exit paths. To make the code
> > > more readable, use only one exit path.
> > > 
> > > Suggested-by: Alison Schofield <alison.schofield@intel.com>
> > 
> > Reviewed-by: Ira Weiny <ira.weiny@intel.com>
> >
> 
> Okay, noted.
> 
> Also, would it be okay to send a patch revision with the changes or
> should I wait for the feedback on Dan's comment. Here is a link to it:
> https://lore.kernel.org/outreachy/6ce8aa34-e600-4d6a-adad-ead8255342e5@kili.mountain/

Khadija,

It's customary to wait for folks to respond to your follow ups, and
address  all the current feedback before sending out a new revision.

Ira asked a question about using positive instead of negative logic.
I probably steered you down the negative logic path, perhaps it can
be flipped to a more preferable positive logic. 

Alison



> 
> Thank you!
> Regards,
> Khadija 
> 
> > > Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
> > > ---
> > >  drivers/staging/greybus/arche-platform.c | 7 +++----
> > >  1 file changed, 3 insertions(+), 4 deletions(-)
> > > 
> > > diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
> > > index fcbd5f71eff2..a64c1af091b0 100644
> > > --- a/drivers/staging/greybus/arche-platform.c
> > > +++ b/drivers/staging/greybus/arche-platform.c
> > > @@ -153,6 +153,7 @@ static irqreturn_t arche_platform_wd_irq_thread(int irq, void *devid)
> > >  static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
> > >  {
> > >  	struct arche_platform_drvdata *arche_pdata = devid;
> > > +	irqreturn_t rc = IRQ_HANDLED;
> > >  	unsigned long flags;
> > >  
> > >  	spin_lock_irqsave(&arche_pdata->wake_lock, flags);
> > > @@ -180,9 +181,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
> > >  						WD_STATE_COLDBOOT_START) {
> > >  					arche_platform_set_wake_detect_state(arche_pdata,
> > >  									     WD_STATE_COLDBOOT_TRIG);
> > > -					spin_unlock_irqrestore(&arche_pdata->wake_lock,
> > > -							       flags);
> > > -					return IRQ_WAKE_THREAD;
> > > +					rc = IRQ_WAKE_THREAD;
> > >  				}
> > >  			}
> > >  		}
> > > @@ -204,7 +203,7 @@ static irqreturn_t arche_platform_wd_irq(int irq, void *devid)
> > >  
> > >  	spin_unlock_irqrestore(&arche_pdata->wake_lock, flags);
> > >  
> > > -	return IRQ_HANDLED;
> > > +	return rc;
> > >  }
> > >  
> > >  /*
> > > -- 
> > > 2.34.1
> > > 
> > > 
> > 
> > 

  reply	other threads:[~2023-04-03  3:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-30 14:11 [PATCH 0/2] improve arche_platform_wd_irq() function Khadija Kamran
2023-03-30 14:11 ` [PATCH 1/2] staging: greybus: add a single exit path to arche_platform_wd_irq() Khadija Kamran
2023-04-03  0:37   ` Ira Weiny
2023-04-03  1:21     ` Khadija Kamran
2023-04-03  3:07       ` Alison Schofield [this message]
2023-04-03  3:15         ` Alison Schofield
2023-04-03 14:59       ` Ira Weiny
2023-03-30 14:11 ` [PATCH 2/2] staging: greybus: refactor arche_platform_wd_irq() Khadija Kamran
2023-03-30 15:23   ` Dan Carpenter
2023-04-01 17:41     ` Khadija Kamran
2023-04-03  4:29       ` Dan Carpenter
2023-04-03 15:23         ` Dan Carpenter
2023-04-27  6:27         ` Khadija Kamran
2023-05-03 22:16           ` Alison Schofield
2023-04-03  2:18     ` Ira Weiny
2023-03-30 16:58   ` kernel test robot
2023-04-03  0:36 ` [PATCH 0/2] improve arche_platform_wd_irq() function Ira Weiny
2023-04-03  1:18   ` Khadija Kamran

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=ZCpC7wpDsUFZVWkQ@aschofie-mobl2 \
    --to=alison.schofield@intel.com \
    --cc=elder@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=greybus-dev@lists.linaro.org \
    --cc=hvaibhav.linux@gmail.com \
    --cc=ira.weiny@intel.com \
    --cc=johan@kernel.org \
    --cc=kamrankhadijadj@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.