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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 3 Apr 2017 14:33:37 +0000
From:   "Shevchenko, Andriy" <andriy.shevchenko@...el.com>
To:     "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>
CC:     "mika.westerberg@...ux.intel.com" <mika.westerberg@...ux.intel.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Ramiro.Oliveira@...opsys.com" <Ramiro.Oliveira@...opsys.com>
Subject: Re: [PATCH v1] reset: Make optional stuff optional for all users

On Mon, 2017-04-03 at 17:31 +0300, Andy Shevchenko wrote:
> On Mon, 2017-04-03 at 16:27 +0200, Philipp Zabel wrote:
> > 

> > >  	int rstc_id;
> > >  	int ret;
> > >  
> > > -	if (!node)
> > > -		return ERR_PTR(-EINVAL);
> > > -
> > 
> > This should be
> > 
> > 	if (!node)
> > 		return optional ? NULL : ERR_PTR(-EINVAL);
> > 
> > instead. Can you confirm this works for Intel boards with DW UART? I
> > can
> > fix it up when applying if you agree.
> 
> I don't think it worth to change. I specifically checked all of_*
> calls
> in that function and they cope pretty nice with node == NULL.
> 
> So, I rather to go with my initial change.
> 

Hit Enter before closing another thought.

When you come with solution where this __of_reset_control_get() will be
called only for node != NULL case you will not need that check either.

So, I would go my solution because of two benefits:
- it fixes bug
- if will not bring ping-ponging code

> Thanks for review!
> 

-- 
Andy Shevchenko <andriy.shevchenko@...el.com>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ