Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6578254pxb; Wed, 17 Feb 2021 08:02:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVsVq0mu3HQa9wvU15PZ7SEJLdpoKgvNAEuanVRNKnhA7yFJlmsHiq7SvuBDDyaeNoUuDr X-Received: by 2002:a17:907:1b1f:: with SMTP id mp31mr26043546ejc.348.1613577775674; Wed, 17 Feb 2021 08:02:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613577775; cv=none; d=google.com; s=arc-20160816; b=i6ZkJsYyhgkNiwnXkoik6mfufAyr5s5pJ1wUFv0xfo7OHbuDF9YrLu1/ppfBIC0jZW oJgdxG0rpGLO3V3Z0HS7xBjlXom670UJeBuP357Q/XNeX+ijsdQt0TBh6taiAsJO9mdj xyTra/saiXv7Y28LnpUKU9/Tev2UsqWtfVsXy2VkC21zVw70MHlOvkQSXpsaT98V+/Al zC2qYBth1VPfghRrv2l3s3B7YZje4c3SFbYS5nzdmRuPOpTvmBWa1a0u8adosjOtiywm UAFPWxAOstNjlD4D/Xmeda1sEYMhX11hCS9s/0610QPaEQdSnLX3pe0Dh1SUH94MDPHq WAKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CUD/qkEdRQMqVMl09PT+Tu7UX/cxWMQto0OUC6zfk9w=; b=xowFzFvOMz9DhBME+MJllbSdcSFKy1q2yC4ZCU0QwYaJ3nEIXIWUy0ZRIA2slM2avx QCWQJ6VFKJuPIborYg3JTY12L1E45WSEJDkwojDR54PW+wuxcJC4yiE4GybBxVE4mOJJ mAIpFfs/Oy6RbmgqQpepsHYTGBPaYDe0u8Wt1qzFctRAKhBvz+A0YgG6PDp+Tu07NRNo 5F7b+XE9i8Fs26TH69MpAlRlbTR9FLHJf5/e62w8uaSuJHIo4e+b93uV5JBrkYo1hPbU FH1W+6tH6x8keddAF2QUeQLFJwBF/wqHPAjU4Jhdfr0IvatXyZL7MAhxa4hokEUuXJmA kl0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=Q5PydiK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si1535775edz.486.2021.02.17.08.02.30; Wed, 17 Feb 2021 08:02:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chrisdown.name header.s=google header.b=Q5PydiK1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chrisdown.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233911AbhBQP5d (ORCPT + 99 others); Wed, 17 Feb 2021 10:57:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233901AbhBQP5Y (ORCPT ); Wed, 17 Feb 2021 10:57:24 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E617BC061574 for ; Wed, 17 Feb 2021 07:56:40 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id b3so17924189wrj.5 for ; Wed, 17 Feb 2021 07:56:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chrisdown.name; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CUD/qkEdRQMqVMl09PT+Tu7UX/cxWMQto0OUC6zfk9w=; b=Q5PydiK1ZqRUGf7r4lW9z+qGripuuLxKo/lBqj+fKgFVr/+MA52ufZGNNXYbn7I5xK A5wdPvXgG8T2P3pka/m9+NLPI2stryOCJmsH47AjFZQFIugXhlnBnsJ4qj7STyP+2yw3 Zq1wNVGQHu/ZzcK/j3kjWGF2scJRWytv/WGtk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=CUD/qkEdRQMqVMl09PT+Tu7UX/cxWMQto0OUC6zfk9w=; b=F0ZEFA7z/NP3tGVfyG9qiXHWC8cLL/0vlKwNvTs3D9h9EGMAn/dCSsz/J4EkK19oEZ EHkVINjdRc4h/DGM0wjtvYZSmlNXGKwa8TMJoqmmJhpgcU9iUEVHZsnadYtUvUioOVOn t0CF9GWldQlFwOIZQRB+HD6bqdH0Z6uk2N0WiC+874WcCXOS3H1asTNSjzQgrThqH8U2 xv//GKuQXWw6YEBBT6PgvBUFrCwh8ss1uS8se16beWBc62S7VpobIqE1YU95I5VkHNVd RX3YPhI6aUrCuAdXAwgT1wRIegftvUxb+s0ahuR/56GJziR13NIFmeqHwjjl+v674x1t UNqQ== X-Gm-Message-State: AOAM532OHPWc+H33esml+nLvzrBjgnaC/4E6snpzs2Y1IOckIUazRhYU Gi3/x7fmEDiSjpDo9oQwtCLX3w== X-Received: by 2002:adf:eb8e:: with SMTP id t14mr4554499wrn.20.1613577399471; Wed, 17 Feb 2021 07:56:39 -0800 (PST) Received: from localhost ([2620:10d:c093:400::4:76fd]) by smtp.gmail.com with ESMTPSA id m17sm3457344wmq.5.2021.02.17.07.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Feb 2021 07:56:38 -0800 (PST) Date: Wed, 17 Feb 2021 15:56:38 +0000 From: Chris Down To: Petr Mladek Cc: Johannes Weiner , linux-kernel@vger.kernel.org, Sergey Senozhatsky , John Ogness , Andrew Morton , Steven Rostedt , Greg Kroah-Hartman , Kees Cook , kernel-team@fb.com Subject: Re: code style: Re: [PATCH v4] printk: Userspace format enumeration support Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (da5e3282) (2021-01-21) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Petr Mladek writes: >> > How about config PRINTK_INDEX? >> >> Ah yes, I also like that. PRINTK_INDEX is fine from my perspective and is >> more straightforward than "enumeration", thanks. > >It is better than enumeration. But there is still the same >problem. The word "index" is used neither in the code >nor in the debugfs interface. It is like enabling cars and >seeing apples. > >What about CONFIG_PRINTK_DEBUGFS? > >It seems that various subsystems use CONFIG__DEBUGFS >pattern when they expose some internals in debugfs. The thing I don't like about that is that it describes a largely inconsequential implementation detail rather than the semantic intent of the config change, which is what the person deciding what to include in their config is likely to care about. Often when I see "XXX debug interface" when doing `make oldconfig` I think to myself "yes, but what does the debugfs interface _do_?". If someone else was writing this patch, and I saw "CONFIG_PRINTK_DEBUGFS" appear in my prod kernel, I'd probably say N, because I don't need printk debugging information. On the other hand, if I saw "CONFIG_PRINTK_INDEX", I'd immediately understand that it's probably applicable to me. I'm happy to rename the debugfs structure as /printk/fmt_index if it helps, but personally I really feel CONFIG_PRINTK_{INDEX,ENUMERATION,CATALOGUE} is a lot more descriptive than just saying "it has a debugfs interface" in the config name for that reason.