public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Shevchenko, Andriy" <andriy.shevchenko@intel.com>
To: "p.zabel@pengutronix.de" <p.zabel@pengutronix.de>
Cc: "mika.westerberg@linux.intel.com"
	<mika.westerberg@linux.intel.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Ramiro.Oliveira@synopsys.com" <Ramiro.Oliveira@synopsys.com>
Subject: Re: [PATCH v1] reset: Make optional stuff optional for all users
Date: Mon, 3 Apr 2017 14:33:37 +0000	[thread overview]
Message-ID: <1491230017.708.108.camel@intel.com> (raw)
In-Reply-To: <1491229885.708.106.camel@linux.intel.com>

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

  reply	other threads:[~2017-04-03 14:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 12:26 [PATCH v1] reset: Make optional stuff optional for all users Andy Shevchenko
2017-04-03 14:27 ` Philipp Zabel
2017-04-03 14:31   ` Andy Shevchenko
2017-04-03 14:33     ` Shevchenko, Andriy [this message]
2017-04-03 15:09       ` Philipp Zabel
2017-04-03 15:23         ` Andy Shevchenko
2017-04-03 16:04           ` Philipp Zabel
2017-04-03 20:48             ` Andy Shevchenko

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=1491230017.708.108.camel@intel.com \
    --to=andriy.shevchenko@intel.com \
    --cc=Ramiro.Oliveira@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    --cc=p.zabel@pengutronix.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox