lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZCpC7wpDsUFZVWkQ@aschofie-mobl2>
Date:   Sun, 2 Apr 2023 20:07:27 -0700
From:   Alison Schofield <alison.schofield@...el.com>
To:     Khadija Kamran <kamrankhadijadj@...il.com>
Cc:     Ira Weiny <ira.weiny@...el.com>, outreachy@...ts.linux.dev,
        hvaibhav.linux@...il.com, johan@...nel.org, elder@...nel.org,
        gregkh@...uxfoundation.org, greybus-dev@...ts.linaro.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] staging: greybus: add a single exit path to
 arche_platform_wd_irq()

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@...el.com>
> > 
> > Reviewed-by: Ira Weiny <ira.weiny@...el.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@...il.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
> > > 
> > > 
> > 
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ