Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1775639pxb; Fri, 25 Mar 2022 05:31:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxoFTvmvuqRvcobGZNvkSaaxthBiH5OUEejhU+V1giDdbTeujqQXEmHnwsAtUgzzIK/MRhm X-Received: by 2002:a17:902:c401:b0:154:152a:7fb7 with SMTP id k1-20020a170902c40100b00154152a7fb7mr11748084plk.63.1648211475055; Fri, 25 Mar 2022 05:31:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648211475; cv=none; d=google.com; s=arc-20160816; b=SsCAGU03YkrWvM2/AehlJfQ7XAOd+UV/hAyW+r0H7AwH+UNnIROGrBQJPtD0V5Erm8 G6TbY3lUMbUIW4ybFvdhXO2E6Vzf0FUUoaQTeE9yiOTS4IOJagsjHH72+5NJRoqUn8bF N9AsT1smUc1GkOWWfqajC6Sg0k9NoiubyrnUiRmvOnqs2tYK4hb5TO9Tx9lSCvk0H+cL VjbEYsMkC9Ayt/lDhL/sI8mB3uvNE2uvNmIYStMDlqiJS42seyQfr+ly3/e721OBT+ry /7A3DLCqLUxJ1fJJ34Dg9/onTaWC//ql0B2MPGsWYVeU9U00xgIsbZVNU/sjGGRONO72 nSvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=K2Q8fm4v433hvdazdR8jN4FCBBlXzJ6xVhdcBHY1Ydo=; b=TKTFyfGSc4ZHmF957tMG20rj+aI35lnFCxMaCSJbAA2hJUVUuJtDyehdGssaJaRjY4 Nh8wAvA2ngu44UzJnURfJJo7VBkjYX75x74KV6qhonsgcyiWKI3E088qbH3OTgH/gVq/ TXVgLi1+9vlGUfSQu0vO0RdNIsECMh1IMahAQjYVKEatzWfgDryhaoFMxmAWLZf9hAmR zHs7rIIgr5nwt2oWZPRRl0C6T0gi3ERNU2b9dLEzsjz0il0jx+pECdGQ+bsL80MlbElo BnAAomLMq84gCI9S+CV1wVFoKtT0rVaf5kkKm0SYT/emZAcW3wcWR5+QL5VkGUkbMSgC J0Qw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=s5DhlRgR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq5-20020a17090b380500b001c67872070dsi7143351pjb.6.2022.03.25.05.31.02; Fri, 25 Mar 2022 05:31:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20210112.gappssmtp.com header.s=20210112 header.b=s5DhlRgR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245057AbiCWPNh (ORCPT + 99 others); Wed, 23 Mar 2022 11:13:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234324AbiCWPNg (ORCPT ); Wed, 23 Mar 2022 11:13:36 -0400 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E63A96F486 for ; Wed, 23 Mar 2022 08:12:02 -0700 (PDT) Received: by mail-ej1-x62a.google.com with SMTP id yy13so3491552ejb.2 for ; Wed, 23 Mar 2022 08:12:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=K2Q8fm4v433hvdazdR8jN4FCBBlXzJ6xVhdcBHY1Ydo=; b=s5DhlRgRd4bwJiFPDdkp1/YtgRn/fKyGuAKjuLkzAzggu77QQqyjPsvgsJTeQwnQfs l8Lnn4y7mWQxcyVQ+BUtrWjazQOXGSv71+vT2xv/r5uFTIHkh1OYl+vJGCc9kK2Jy06v sUsb7U4y9d5wINvjcgGwtUpMy1HBAgeynPcG8Mq6Pc+1X2YTdeSk9QUaGxmbS2CV0nQF zkttM4C7FOrP3vtn0276xQZNG2Bl9Y13lHFw9Ck6dwJDjinYjg3Fqv+lVAbEi2y32IQk hgsl+RQDj8GO6NDfdP2jcQOJG/4HS509Nv7DXrcAS69k/tlarbg90E7lOKnSQx39FOXq Iskw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=K2Q8fm4v433hvdazdR8jN4FCBBlXzJ6xVhdcBHY1Ydo=; b=LfGM0uMBIGF4M4fC6Y8NQB/yQbvNBI/F7j5NgnH/24Y58zS3DusE6eY4HReV34Z3+o 1UYHvRXPIz1Ut0fP2d9GAb3wu9dpEcEokugj8ha9xVHvCcnfCF6xMogVOdlE6IIJgkbo ynUGhXw/AkhuwFeutjHgEnsmc+ghxpg1Bnf6Kt+HUXypbJ7uu93zpBKGK3kUWcgzZK6H MvLCGDGdVJGszF6wh4fglt4p4et9TXJIbHFobJWM1copmgjYMi1PtrTpupq02xZSCgc+ j543tOphC1tLA3QW8x93BPsfCfO4xCi4uj/yr6DfkD3JD1XVY2PPV4s3aeHlwUFZMbfD IzIA== X-Gm-Message-State: AOAM530zssiohtsSItDaL44Wy8jR05bhTAd2n1159bLwxJVi+EbyxXHU WLvvNJ8MGhEIRfn4b9chUSiJlgKWp6gA8qRYnnwvAw== X-Received: by 2002:a17:907:6d0b:b0:6df:e54c:ad1d with SMTP id sa11-20020a1709076d0b00b006dfe54cad1dmr478779ejc.734.1648048321418; Wed, 23 Mar 2022 08:12:01 -0700 (PDT) MIME-Version: 1.0 References: <20220310150905.1.Ie0a005d7a763d501e03b7abe8ee968ca99d23282@changeid> In-Reply-To: From: Bartosz Golaszewski Date: Wed, 23 Mar 2022 16:11:50 +0100 Message-ID: Subject: Re: [PATCH] gpio: Drop CONFIG_DEBUG_GPIO To: Brian Norris Cc: Andy Shevchenko , Linus Walleij , "open list:GPIO SUBSYSTEM" , Jianqun Xu , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 22, 2022 at 5:31 PM Brian Norris wrote: > > On Tue, Mar 22, 2022 at 8:00 AM Andy Shevchenko > wrote: > > On Tue, Mar 22, 2022 at 4:49 PM Bartosz Golaszewski wrote: > > > On Tue, Mar 22, 2022 at 3:38 PM Andy Shevchenko > > > wrote: > > > > On Fri, Mar 11, 2022 at 4:55 AM Brian Norris 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 I'm about to send my PR for v5.18 so I'll remove this one from my for-next branch as it's not urgent. Let's discuss it during the next cycle. Bart