linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrice Chotard <patrice.chotard-qxv4g6HH51o@public.gmane.org>
To: Masahiro Yamada
	<yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>,
	linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Alessandro Rubini <rubini-9wsNiZum9E8@public.gmane.org>,
	Krzysztof Kozlowski
	<k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Maoguang Meng
	<maoguang.meng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linus Walleij
	<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Jason Uy <jasonuy-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Tomasz Figa <tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Stefan Agner <stefan-XLVq0VzYD2Y@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Heikki Krogerus
	<heikki.krogerus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
	Laurent Pinchart
	<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
	Chaotian Jing
	<chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	kernel-F5mvAk5X5gdBDgjK7y7TUQ@public.gmane.org,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	Rickard Strandqvist
	<rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org>,
	Hongzhou Yang
	<hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
	Varka Bhadram
	<varkabhadram-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Michal Simek
	<michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org>,
	linux-rockchip-IAPFreCvJWM@public.gmane.org
Subject: Re: [PATCH] pinctrl: make pinctrl_register() return proper error code
Date: Tue, 9 Jun 2015 09:29:59 +0200	[thread overview]
Message-ID: <557695F7.6050907@st.com> (raw)
In-Reply-To: <1433822476-26531-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>

Hi Masahiro

On 06/09/2015 06:01 AM, Masahiro Yamada wrote:
> Currently, pinctrl_register() just returns NULL on error, so the
> callers can not know the exact reason of the failure.
>
> Some of the pinctrl drivers return -EINVAL, some -ENODEV, and some
> -ENOMEM on error of pinctrl_register(), although the error code
> might be different from the real cause of the error.
>
> This commit reworks pinctrl_register() to return the appropriate
> error code and modifies all of the pinctrl drivers to use IS_ERR()
> for the error checking and PTR_ERR() for getting the error code.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> ---
>
> This patch is based on linux-pinctrl/devel
> (Commit 7164873e7c69d6bab74726debc3b495a86332b1f).
>
> I think I converted all of the pinctrl drivers, but just in case,
> I'd like the driver maintainers to check this patch out.
>
>
>   drivers/pinctrl/bcm/pinctrl-bcm281xx.c        |  4 ++--
>   drivers/pinctrl/bcm/pinctrl-bcm2835.c         |  4 ++--
>   drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c     |  4 ++--
>   drivers/pinctrl/bcm/pinctrl-cygnus-mux.c      |  4 ++--
>   drivers/pinctrl/berlin/berlin.c               |  4 ++--
>   drivers/pinctrl/core.c                        | 17 ++++++++++-------
>   drivers/pinctrl/freescale/pinctrl-imx.c       |  4 ++--
>   drivers/pinctrl/freescale/pinctrl-imx1-core.c |  4 ++--
>   drivers/pinctrl/freescale/pinctrl-mxs.c       |  4 ++--
>   drivers/pinctrl/intel/pinctrl-cherryview.c    |  4 ++--
>   drivers/pinctrl/intel/pinctrl-intel.c         |  4 ++--
>   drivers/pinctrl/mediatek/pinctrl-mtk-common.c |  4 ++--
>   drivers/pinctrl/meson/pinctrl-meson.c         |  4 ++--
>   drivers/pinctrl/mvebu/pinctrl-mvebu.c         |  4 ++--
>   drivers/pinctrl/nomadik/pinctrl-abx500.c      |  4 ++--
>   drivers/pinctrl/nomadik/pinctrl-nomadik.c     |  4 ++--
>   drivers/pinctrl/pinctrl-adi2.c                |  4 ++--
>   drivers/pinctrl/pinctrl-amd.c                 |  4 ++--
>   drivers/pinctrl/pinctrl-as3722.c              |  4 ++--
>   drivers/pinctrl/pinctrl-at91.c                |  4 ++--
>   drivers/pinctrl/pinctrl-lantiq.c              |  4 ++--
>   drivers/pinctrl/pinctrl-lpc18xx.c             |  4 ++--
>   drivers/pinctrl/pinctrl-palmas.c              |  4 ++--
>   drivers/pinctrl/pinctrl-pistachio.c           |  4 ++--
>   drivers/pinctrl/pinctrl-rockchip.c            |  4 ++--
>   drivers/pinctrl/pinctrl-single.c              |  4 ++--
>   drivers/pinctrl/pinctrl-st.c                  |  4 ++--
>   drivers/pinctrl/pinctrl-tb10x.c               |  4 ++--
>   drivers/pinctrl/pinctrl-tegra-xusb.c          |  4 ++--
>   drivers/pinctrl/pinctrl-tegra.c               |  4 ++--
>   drivers/pinctrl/pinctrl-tz1090-pdc.c          |  4 ++--
>   drivers/pinctrl/pinctrl-tz1090.c              |  4 ++--
>   drivers/pinctrl/pinctrl-u300.c                |  4 ++--
>   drivers/pinctrl/pinctrl-zynq.c                |  4 ++--
>   drivers/pinctrl/qcom/pinctrl-msm.c            |  4 ++--
>   drivers/pinctrl/qcom/pinctrl-spmi-gpio.c      |  4 ++--
>   drivers/pinctrl/qcom/pinctrl-spmi-mpp.c       |  4 ++--
>   drivers/pinctrl/samsung/pinctrl-exynos5440.c  |  4 ++--
>   drivers/pinctrl/samsung/pinctrl-samsung.c     |  4 ++--
>   drivers/pinctrl/sh-pfc/pinctrl.c              |  4 ++--
>   drivers/pinctrl/sirf/pinctrl-atlas7.c         |  4 ++--
>   drivers/pinctrl/sirf/pinctrl-sirf.c           |  4 ++--
>   drivers/pinctrl/spear/pinctrl-spear.c         |  4 ++--
>   drivers/pinctrl/sunxi/pinctrl-sunxi.c         |  4 ++--
>   drivers/pinctrl/vt8500/pinctrl-wmt.c          |  4 ++--
>   45 files changed, 98 insertions(+), 95 deletions(-)
>
> <snip>


for

  drivers/pinctrl/nomadik/pinctrl-abx500.c      |  4 ++--

and

  drivers/pinctrl/pinctrl-st.c                  |  4 ++--

Acked-by: Patrice Chotard <patrice.chotard-qxv4g6HH51o@public.gmane.org>

Thanks

Patrice

  parent reply	other threads:[~2015-06-09  7:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09  4:01 [PATCH] pinctrl: make pinctrl_register() return proper error code Masahiro Yamada
     [not found] ` <1433822476-26531-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2015-06-09  7:29   ` Patrice Chotard [this message]
2015-06-09  8:00   ` Thierry Reding
2015-06-09  8:03   ` Heiko Stübner
2015-06-09  9:52   ` Lee Jones
2015-06-09 15:48   ` Sören Brinkmann
2015-06-09 16:54   ` Laurent Pinchart
2015-06-09 17:55   ` Ray Jui
2015-06-09 18:10   ` Antoine Tenart
2015-06-09 19:08   ` Hongzhou Yang
2015-06-10  1:40   ` Wei Chen
2015-06-10 12:52   ` Linus Walleij

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=557695F7.6050907@st.com \
    --to=patrice.chotard-qxv4g6hh51o@public.gmane.org \
    --cc=axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org \
    --cc=chaotian.jing-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=heikki.krogerus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=hongzhou.yang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=jasonuy-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=k.kozlowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=kernel-F5mvAk5X5gdBDgjK7y7TUQ@public.gmane.org \
    --cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
    --cc=linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-gpio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM@public.gmane.org \
    --cc=linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=maoguang.meng-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org \
    --cc=michal.simek-gjFFaj9aHVfQT0dZR+AlfA@public.gmane.org \
    --cc=rickard_strandqvist-IW2WV5XWFqGZkjO+N0TKoMugMpMbD5Xr@public.gmane.org \
    --cc=rubini-9wsNiZum9E8@public.gmane.org \
    --cc=stefan-XLVq0VzYD2Y@public.gmane.org \
    --cc=tomasz.figa-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=varkabhadram-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org \
    /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;
as well as URLs for NNTP newsgroup(s).