[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZywHgUHbMg-1gfBDPZ3uXHuBWMvkAUZgkDRbn6Hi2Ovg@mail.gmail.com>
Date: Tue, 2 Jun 2015 14:56:23 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
Cc: "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
Sören Brinkmann <soren.brinkmann@...inx.com>,
Arnd Bergmann <arnd@...db.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pinctrl: add pinctrl_register_reason() to return proper
error code
On Fri, May 29, 2015 at 1:30 PM, Masahiro Yamada
<yamada.masahiro@...ionext.com> wrote:
> The 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 actual cause of the error.
>
> This new function, pinctrl_register_reason(), helps the drivers get
> and return the appropriate error code.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@...ionext.com>
> Suggested-by: Arnd Bergmann <arnd@...db.de>
It should be named pinctrl_register_strict() or something.
"reason" is anyways wrong, should be "cause", but please
use _strict().
> If this patch is accepted, I can send a series to replace
> the pinctrl_register() in each driver with pinctrl_register_reason().
If it is replaced *everywhere* there is no point in keeping
a separate function. Then you should just do a big
patch changing all usage sites and the original function.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists