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