All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Mark Brown <broonie@kernel.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Maxime Ripard <maxime.ripard@free-electrons.com>
Subject: Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly
Date: Thu, 11 Jan 2018 23:30:59 +0200	[thread overview]
Message-ID: <4247973.Y2IEusv7l3@avalon> (raw)
In-Reply-To: <87zi5kii00.fsf@intel.com>

Hi Jani,

On Thursday, 11 January 2018 16:31:59 EET Jani Nikula wrote:
> On Thu, 11 Jan 2018, Laurent Pinchart wrote:
> > My preference, however, would be for devm_regulator_get_optional() to
> > return NULL when no regulator is present. The current implementation
> > returns -ENODEV in multiple cases, making it impossible to properly
> > discriminate between having no regulator and not being able to get the
> > regulator due to an error.
> 
> Just a word of warning, IS_ERR(NULL) is false, and your proposed change
> would apparently require quite a churn all over the kernel.

That's correct, but I still think that would make the API clearer. I don't 
want to block this patch until we make such a change, but it's a good 
opportunity to discuss it. I'd like to know what Mark's opinion is.

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH] drm/panel: lvds: Handle the optional regulator case properly
Date: Thu, 11 Jan 2018 23:30:59 +0200	[thread overview]
Message-ID: <4247973.Y2IEusv7l3@avalon> (raw)
In-Reply-To: <87zi5kii00.fsf@intel.com>

Hi Jani,

On Thursday, 11 January 2018 16:31:59 EET Jani Nikula wrote:
> On Thu, 11 Jan 2018, Laurent Pinchart wrote:
> > My preference, however, would be for devm_regulator_get_optional() to
> > return NULL when no regulator is present. The current implementation
> > returns -ENODEV in multiple cases, making it impossible to properly
> > discriminate between having no regulator and not being able to get the
> > regulator due to an error.
> 
> Just a word of warning, IS_ERR(NULL) is false, and your proposed change
> would apparently require quite a churn all over the kernel.

That's correct, but I still think that would make the API clearer. I don't 
want to block this patch until we make such a change, but it's a good 
opportunity to discuss it. I'd like to know what Mark's opinion is.

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2018-01-11 21:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-10 15:59 [PATCH] drm/panel: lvds: Handle the optional regulator case properly Maxime Ripard
2018-01-10 15:59 ` Maxime Ripard
2018-01-11 13:05 ` Laurent Pinchart
2018-01-11 13:12   ` Maxime Ripard
2018-01-11 22:06     ` Laurent Pinchart
2018-01-11 22:06       ` Laurent Pinchart
2018-01-11 22:09       ` Laurent Pinchart
2018-01-11 22:09         ` Laurent Pinchart
2018-01-15  9:18         ` Maxime Ripard
2018-01-11 14:31   ` Jani Nikula
2018-01-11 21:30     ` Laurent Pinchart [this message]
2018-01-11 21:30       ` Laurent Pinchart

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=4247973.Y2IEusv7l3@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=broonie@kernel.org \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    /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.