Re: [PATCH] gpiolib: Add some warn print for easier to debug

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

 



On Fri, Jul 10, 2020 at 4:54 PM qiao mnlife <mnlife.qiao@xxxxxxxxx> wrote:
>
> It will print the truncated name in gpiolib-of.c line 246, but I think this is not straightforward, and I feel its printing level is wrong

So, it does its job:
- it's for development
- it gives developer and information when debugging feature is enabled
- it does show the issue

> From: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>> On Fri, Jul 10, 2020 at 6:11 AM qiao mnlife <mnlife.qiao@xxxxxxxxx> wrote:
> >
> > However, in development, it is not easy to know that this problem is caused, just looking at the documentation is not enough, I need to read the gpiolib source code more attentive
>
> Have you tried to enable CONFIG_GPIO_DEBUG?
>
> > From: linux-gpio-owner@xxxxxxxxxxxxxxx <linux-gpio-owner@xxxxxxxxxxxxxxx> on behalf of Andy Shevchenko <andy.shevchenko@xxxxxxxxx>
> > Sent: Thursday, July 9, 2020 11:40:52 PM
> > To: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>
> > Cc: mnlife <mnlife@xxxxxxxxxxx>; Linus Walleij <linus.walleij@xxxxxxxxxx>; linux-gpio <linux-gpio@xxxxxxxxxxxxxxx>
> > Subject: Re: [PATCH] gpiolib: Add some warn print for easier to debug
> >
> > On Thu, Jul 9, 2020 at 4:27 PM Bartosz Golaszewski
> > <bgolaszewski@xxxxxxxxxxxx> wrote:
> > > On Tue, Jul 7, 2020 at 5:09 PM mnlife <mnlife@xxxxxxxxxxx> wrote:
> >
> > ...
> >
> > > > +               if (size >= sizeof(prop_name))
> > > > +                       dev_warn(dev, "prop_name %s is truncated with size %d\n",
> > > > +                                prop_name, size);
> >
> > > To me this isn't a reason for a warning. If anything, this should
> > > simply be documented (if it's not already).
> >
> > +1. This can only be useful in the development cycle.
> >
> > CONFIG_DEBUG_GPIO easily catches this as well.
> >
> >
> > --
> > With Best Regards,
> > Andy Shevchenko
>
>
>
> --
> With Best Regards,
> Andy Shevchenko



-- 
With Best Regards,
Andy Shevchenko



[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