Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp902724pxp; Wed, 16 Mar 2022 20:43:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXZYoH9mGCmTpoPwR4aafnMdERtYggjSOM/RHGLy9XqpXphA4bMI1KASQkh16wXWVuiLYk X-Received: by 2002:a17:90b:3117:b0:1bf:70e7:2543 with SMTP id gc23-20020a17090b311700b001bf70e72543mr3053658pjb.37.1647488622622; Wed, 16 Mar 2022 20:43:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647488622; cv=none; d=google.com; s=arc-20160816; b=pb7eZuRlNU5bGcFmesDBNP2u1/kWCCwubU/CtWufTogEGgYaPKmZAwl4epXFRlVIUO By58N4DJZi+vIK1wF5cV4rdd5GSS3RSHYe+0MPcjzzOYi1+tRs/yIAkz1A8HGASztVg5 cuuaLbXfRpsCY4QwSsFI0p3/AVRDFhihpNl9IQwAg8CA68PZJrczdRU8y+aSO3sZ4ESO wC1I7Iwb/v1go1gUWFnsATUACakx0dUww2popPDuoLYsyEjKevi/lL0IYeUqg93ZbE6T VrT+LCm9baWjKxcWmSKbJnK/TBjXbe2fRFioWZwN1e2v6K0+n3p9OHzunSui6BahY2+9 MrGg== 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=rhuYdbrWYoIGnfqjj6FN2yUEIp0vHYyHRziBaZQGHB4=; b=VM0FOnhEc3dq6M8tgDTY1Z3eat/JymybnV6YUvicfA88udaWW+Js5ft+vs6cCRkLHg ld+PuwocLg/EZHCwpGxFA2C53BZHFyShyKrKDu4fW4QpXhEFYnqDasThiYnu3P5EgYQI caG6mq9sZe2MUVsMnFFLCOKfHOCZmgsSGbKP3WJlabNVN0eEOESkmjNMJvVfVL/HlJX+ Ogf81Dt+WuOj7aoC3vdsC+veZllNOZWdW0ijEXps+G/0OUmR4kaJU1w7wNzI04ql6amB CrKNueJ+h5rEUOelgtpZ5lyZ6fUxydXu51tnSB6tNCLiiMoS6DlWJmmylokMCR1rk1Ul GUcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VGtO2G0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v16-20020a63d550000000b003816cf040a4si883587pgi.377.2022.03.16.20.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 20:43:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VGtO2G0t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B023B6A06F; Wed, 16 Mar 2022 20:35:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241551AbiCNWYK (ORCPT + 99 others); Mon, 14 Mar 2022 18:24:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236637AbiCNWYJ (ORCPT ); Mon, 14 Mar 2022 18:24:09 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69CDCB65 for ; Mon, 14 Mar 2022 15:22:58 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-2d07ae0b1c4so181311947b3.11 for ; Mon, 14 Mar 2022 15:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rhuYdbrWYoIGnfqjj6FN2yUEIp0vHYyHRziBaZQGHB4=; b=VGtO2G0tbYp4Ucz5jWwhr2ObSsOeNj/ZeDhLsin+0yblMRQ3HaoO29UkTGW05xonoJ nkNYV/TywzTeImI3EYau8hPjVuAJAkUIBxrxUGkFyC0nf41ASzcFp4zBuLrQ6Ib5cXMB 0WZ0YxeuKex6EjfJhV6+oYTGBoklL1RwfOBYvtQO68EvgMgs7yMchlfmzeJlXCWiQf6H L4JA9JbDj/kIQgyIFAZEp9SvdzdxztmpV52lCrNhx4vws0EVajDQt2/mwxOwKpFmEV1h PDd0KZ1I13LM1//omsCY3TMpP/rqxzprDRYPZyUnPU0K/K6proJeUWTWIhVhi1BS01KE YdoQ== 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=rhuYdbrWYoIGnfqjj6FN2yUEIp0vHYyHRziBaZQGHB4=; b=uXZGXzJ7PrM/6e+WNib8ekUqjuKjYmXOX/OGXgTNUrX1C750vu+AvfeV/BroSbZ3NC Wxh6NkZHxZkc4EZMCyFT6yhdAl+pqeFes/pmlufije8PxAgdE4bRMWG45Z5B6logE85g 0U7tBB8RW59+aAXEwTNX+QrI7ZJGIquMjmwraFVZY7rxA01NhGd/jwHecbUDeKWxsm13 nWha45jWRewePaKwvociokIlxSJhbkzYDv2QkxSWKVXGt3yPD1rCbuz8S/ZjC09zbRlz rq30W9JyxNPzrQRBM2dLiNsZ/zp3HpGYXIFXonJ39vEjdnuExfqHHevsZc7K7uuqJvE2 hT3g== X-Gm-Message-State: AOAM532PR/yP0gwsWQgl8nclNblKQaCWfVLXBaEL3sQR14vP5xYfGKLE mnN8Dlhz/3u6ajuOrkuLjK7m256CY9FiOoTd794Y/w== X-Received: by 2002:a81:9c47:0:b0:2db:9e18:6e75 with SMTP id n7-20020a819c47000000b002db9e186e75mr21192173ywa.437.1647296577566; Mon, 14 Mar 2022 15:22:57 -0700 (PDT) MIME-Version: 1.0 References: <20220310150905.1.Ie0a005d7a763d501e03b7abe8ee968ca99d23282@changeid> In-Reply-To: From: Linus Walleij Date: Mon, 14 Mar 2022 23:22:46 +0100 Message-ID: Subject: Re: [PATCH] gpio: Drop CONFIG_DEBUG_GPIO To: Bartosz Golaszewski Cc: Brian Norris , "open list:GPIO SUBSYSTEM" , Jianqun Xu , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Mon, Mar 14, 2022 at 4:00 PM Bartosz Golaszewski wrote: > On Fri, Mar 11, 2022 at 12:09 AM Brian Norris wrote: > > > > CONFIG_DEBUG_GPIO has existed since the introduction of gpiolib, but its > > Kconfig description and motivation seem to have been off-base for quite > > some time. > > > > 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. > > > > Purpose: might_sleep() and WARN_ON() should have very low overhead, and > > anyway, there's a separate CONFIG_DEBUG_ATOMIC_SLEEP for the > > might_sleep() overhead. > > > > Additionally, the conflated purpose (extra debug checks, and extra > > printing) makes for a mixed bag for users. In particular, some drivers > > can be extra-spammy with -DDEBUG -- e.g., with the Rockchip GPIO driver > > getting moved out of drivers/pinctrl/ in commit 936ee2675eee > > ("gpio/rockchip: add driver for rockchip gpio"), now some dev_dbg() > > calls are enabled in its IRQ handler. > > > > Altogether, it seems like CONFIG_DEBUG_GPIO isn't serving any good > > purpose and should just be removed. It can be supplanted by dynamic > > debug (which post-dates gpiolib) and atomic-debug facilities. > > > > Signed-off-by: Brian Norris > > --- > > > > I like it. It's true we don't see many of those DEBUG constructs > anymore nowadays and overhead for might_sleep() and WARN_ON() is > negligible. I agree. I have something similar for pinctrl, maybe that needs to go too. Yours, Linus Walleij