linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
	Linus Walleij <linus.walleij@linaro.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	Jianqun Xu <jay.xu@rock-chips.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] gpio: Drop CONFIG_DEBUG_GPIO
Date: Tue, 22 Mar 2022 09:31:01 -0700	[thread overview]
Message-ID: <CA+ASDXPncB=edDfXqkmWMqToQSt85UkAMzoApgyQATROoR1x9g@mail.gmail.com> (raw)
In-Reply-To: <CAHp75VcK0JDkTXuPc2N8G+OotXK0mqfQn7i4nDqXDODe1SqcrQ@mail.gmail.com>

On Tue, Mar 22, 2022 at 8:00 AM Andy Shevchenko
<andy.shevchenko@gmail.com> wrote:
> On Tue, Mar 22, 2022 at 4:49 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > On Tue, Mar 22, 2022 at 3:38 PM Andy Shevchenko
> > <andy.shevchenko@gmail.com> wrote:
> > > On Fri, Mar 11, 2022 at 4:55 AM Brian Norris <briannorris@chromium.org> wrote:
> > >
> > > ...
> > >
> > > > Description: it says nothing about enabling extra printk()s. But -DDEBUG
> > > > does just that; it turns on every dev_dbg()/pr_debug() that would
> > > > otherwise be silent.
> > >
> > > Which is what some and I are using a lot during development.

Well, we could fix that part by updating the documentation, so users
know what they're getting themselves into.

I'm also curious: does dynamic debug not suit you?
https://www.kernel.org/doc/html/v4.19/admin-guide/dynamic-debug-howto.html
TBH, I never remember its syntax, and it seems very easy to get wrong,
so I often throw in #define's myself, if I want it foolproof. But I'm
curious others thoughts too.

> > AFAIK this: https://www.kernel.org/doc/local/pr_debug.txt is the right
> > way to do it?
>
> Yes. But it means we need to have a separate option on a per driver
> (or group of drivers) basis. I don't think it's a good idea right now.

I'm not sure I understand this thought; isn't this the opposite of
what you're arguing above? (That drivers/gpio/ deserves its own
Kconfig option for enabling (non-dynamic) debug prints?)

> > https://www.kernel.org/doc/local/pr_debug.txt
> >
> > This doesn't mention adding Kconfig options just to enable debug messages.
> >
> > > ...
> > >
> > > > -ccflags-$(CONFIG_DEBUG_GPIO)   += -DDEBUG
> > > > -
> > >
> > > NAK to this change.
> > >
> > > I'm not against enabling might_sleep() unconditionally.
> > >
> >
> > These are already controlled by CONFIG_DEBUG_ATOMIC_SLEEP, no? Or
> > maybe I can't parse that double negation.
>
> The part of the patch that converts might_sleep_if():s is fine with me.

I'm fine with that approach (keep CONFIG_DEBUG_GPIO *only* as a
print-verbosity/DDEBUG control), even if I think it's a bit odd. My
main point in the patch is differentiating debug checks (that I want;
that are silent-by-default; that have their own Kconfig knobs) from
debug prints (that are noisy by default; that I don't want). So if you
convince Bartosz and/or Linus, you can get an Ack from me for a
partial revert.

Regards,
Brian

  reply	other threads:[~2022-03-22 16:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10 23:09 [PATCH] gpio: Drop CONFIG_DEBUG_GPIO Brian Norris
2022-03-14 15:00 ` Bartosz Golaszewski
2022-03-14 22:22   ` Linus Walleij
2022-03-14 22:34     ` Brian Norris
2022-03-22 13:14       ` Geert Uytterhoeven
2022-03-22 14:39   ` Andy Shevchenko
2022-03-22 14:37 ` Andy Shevchenko
2022-03-22 14:49   ` Bartosz Golaszewski
2022-03-22 14:59     ` Andy Shevchenko
2022-03-22 16:31       ` Brian Norris [this message]
2022-03-23 15:11         ` Bartosz Golaszewski
2022-03-23 20:44         ` Linus Walleij

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='CA+ASDXPncB=edDfXqkmWMqToQSt85UkAMzoApgyQATROoR1x9g@mail.gmail.com' \
    --to=briannorris@chromium.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=brgl@bgdev.pl \
    --cc=jay.xu@rock-chips.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).