LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Matheus Castello <matheus@castello.eng.br>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] pinctrl: generic: improve apply_setting error verbosity
Date: Tue, 8 May 2018 01:27:31 -0400	[thread overview]
Message-ID: <938ef29c-a1e3-06e6-1c90-d2b933d2342f@castello.eng.br> (raw)
In-Reply-To: <CACRpkda0cztaOQb0yfC-s96Lyw4dyADJz_qWmg8dVuK-exp6nA@mail.gmail.com>

Hi Linus,

thanks for the tips, I will study this to break dependency from OF.

Best Regards,
Matheus Castello

On 05/02/2018 08:51 AM, Linus Walleij wrote:
> On Tue, May 1, 2018 at 9:10 PM, Matheus Castello
> <matheus@castello.eng.br> wrote:
> 
>> For generic pinconf: print the dev_error with the pinctrl vendor
>> driver name, error code, the sub-node property name used and the
>> pin that was tried to set.
>>
>> Improves the undestading of the error if use a generic sub-node
>> property that generic-pinconf can do parse but the vendor pinctrl
>> driver does not support.
>>
>> Signed-off-by: Matheus Castello <matheus@castello.eng.br>
> 
>> +#include <linux/pinctrl/pinconf-generic.h>
>>   #include "core.h"
>>   #include "pinconf.h"
>>
>> @@ -169,9 +170,21 @@ int pinconf_apply_setting(const struct pinctrl_setting *setting)
>>                                  setting->data.configs.configs,
>>                                  setting->data.configs.num_configs);
>>                  if (ret < 0) {
>> +#ifdef CONFIG_OF
> 
> This doesn't seem right.
> 
> If this is restricted for OF only the root cause to why it is
> like that needs to be found and the code refactored to fit anyone,
> there is also ACPI support in the works I think, surely they should
> be able to get verbose messages.
> 
>>                          dev_err(pctldev->dev,
>> -                               "pin_config_set op failed for pin %d\n",
>> +                               "%s error %d setting %s for pin %d\n",
>> +                               pctldev->desc->name, ret,
>> +                               pinconf_generic_get_param_property_name(
>> +                                       pctldev, setting->data.configs.num_configs,
>> +                                       setting->data.configs.configs),
>>                                  setting->data.configs.group_or_pin);
> 
> This doesn't seem right. First argument is a %d, yet this
> is pctldev->desc->name?
> 
> Something is fishy with the argument list.
> 
> Yours,
> Linus Walleij
> 

      reply	other threads:[~2018-05-08  5:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-01  7:40 [PATCH v1 0/2] " Matheus Castello
2018-05-01  7:40 ` [PATCH v1 1/2] pinctrl: generic: add API to solve generic sub-node property name Matheus Castello
2018-05-01  7:40 ` [PATCH v1 2/2] pinctrl: generic: improve apply_setting error verbosity Matheus Castello
2018-05-01  8:34   ` kbuild test robot
2018-05-01 10:05   ` kbuild test robot
2018-05-01 19:09     ` [PATCH v2 0/2] " Matheus Castello
2018-05-01 19:10       ` [PATCH v2 1/2] pinctrl: generic: add API to solve generic sub-node property name Matheus Castello
2018-05-02 12:56         ` Linus Walleij
2018-05-01 19:10       ` [PATCH v2 2/2] pinctrl: generic: improve apply_setting error verbosity Matheus Castello
2018-05-02 12:51         ` Linus Walleij
2018-05-08  5:27           ` Matheus Castello [this message]

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=938ef29c-a1e3-06e6-1c90-d2b933d2342f@castello.eng.br \
    --to=matheus@castello.eng.br \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH v2 2/2] pinctrl: generic: improve apply_setting error verbosity' \
    /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

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).