Re: [PATCH v2 6/7] gpio: mockup: improve the error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 31, 2017 at 1:54 PM, Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
> 2017-05-30 20:59 GMT+02:00 Andy Shevchenko <andy.shevchenko@xxxxxxxxx>:
>> On Tue, May 30, 2017 at 11:58 AM, Bartosz Golaszewski <brgl@xxxxxxxx> wrote:
>>> Indicate the error number and make the message a bit more elaborate.
>>
>>> +                       dev_err(dev,
>>> +                               "adding gpiochip failed: %d (base: %d, ngpio: %d)\n",
>>> +                               ret, base, base < 0 ? ngpio : base + ngpio);
>>
>> You may consider to use
>> 'gpio_mockup_add' instead of 'adding gpiochip'. The latter points the
>> reader first to gpiochip_add family of functions while you run a
>> wrapper on top of it.
>>
>
> But this message can also be emitted if the module params are invalid,
> in which case we don't even enter gpio_mockup_add().

...which unveils bad phrasing in the message. In that case "adding
gpiochip" is also misleading.

I dunno if it requires separate patch to fix the phrasing, though it
would be nice to make it more clear for both cases, or even split to
two cases.

-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux