Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1615254

Re: [PATCH v1] reset: Make optional stuff optional for all users

From "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v1] reset: Make optional stuff optional for all users
Date 2017-04-03 16:40 +0200
Message-ID <tsbjc-84l-13@gated-at.bofh.it> (permalink)
References <ts9ho-6Oe-17@gated-at.bofh.it> <tsb9w-80W-3@gated-at.bofh.it> <tsbjc-84l-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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@intel.com>
Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v1] reset: Make optional stuff optional for all users Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-03 14:30 +0200
  Re: [PATCH v1] reset: Make optional stuff optional for all users Philipp Zabel <p.zabel@pengutronix.de> - 2017-04-03 16:30 +0200
    Re: [PATCH v1] reset: Make optional stuff optional for all users "Shevchenko, Andriy" <andriy.shevchenko@intel.com> - 2017-04-03 16:40 +0200
      Re: [PATCH v1] reset: Make optional stuff optional for all users Philipp Zabel <p.zabel@pengutronix.de> - 2017-04-03 17:20 +0200
        Re: [PATCH v1] reset: Make optional stuff optional for all users Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-03 17:30 +0200
          Re: [PATCH v1] reset: Make optional stuff optional for all users Philipp Zabel <p.zabel@pengutronix.de> - 2017-04-03 18:10 +0200
            Re: [PATCH v1] reset: Make optional stuff optional for all users Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-04-03 22:50 +0200
    Re: [PATCH v1] reset: Make optional stuff optional for all users Andy Shevchenko <andriy.shevchenko@linux.intel.com> - 2017-04-03 16:40 +0200

csiph-web