Received: by 10.223.176.5 with SMTP id f5csp292403wra; Tue, 30 Jan 2018 11:35:10 -0800 (PST) X-Google-Smtp-Source: AH8x225a7H3fSCt7gznJj+nSkZ2Vp3c6PACS5dueDZRHWmgNMnOn0RSqKMHbhEw9MwiLUau4gPiI X-Received: by 2002:a17:902:7510:: with SMTP id i16-v6mr26934347pll.220.1517340910018; Tue, 30 Jan 2018 11:35:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517340910; cv=none; d=google.com; s=arc-20160816; b=wm4QEmoUlL9FWzGMiexGCSwGjxDxlxWzN9N24h04ZErJjA2gxwfnFfTj07z8rcxNn6 X+31oTraDOanrdBdjQbLS9FOgHx2jLTjyIpYvppjBGhsmUSL9iUXq/L4gKRCUE8umfrk ukm1x/KJlEGqEh+P3wWmly9ClMLRgjixSbSBjWAe3b2MtjDsjpznmqHAPdUkQkviXpr5 Usd+VdTB1/+Q4QrqgRxNK2HTvH331ax4WX7HxJKFioVyowz9h15/PBoToYnkB7Vo5qAR zfKlGo2pebLDNZykYCJFTMqdmVj1QH7HgFN5jI1S9ee3XgfrrMXn1du6VDdM3PNhn1Nf 054w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=F/klWyItyTzJwTiG33mlRrCxc7NfxrTQXn+JuutScMw=; b=X3Rj9mVocOl+uDhCxv159bE2O2Spe/qHvifAOAdFXMFnLJ7UnlOR7aE2JwsnsKMU/q YmJroMlL+TNnTF5NdkUdpTpOEEnfUb2WXiX6mrjgZbGr8AqRLPLAVQ/9CXgyx5DKTeg5 wQDnD3o2Wv7Nhezn6ury+S6Dv1aDvlaOAB9/VS9ly2twrxSVFhyWQCTDX7+N8vi7WJbS BIi8Dz+3Ddbj0iyIlQkkkOMG8SAqwxf9tPzZmUIkQ5z7KMWKjyUVfBm2LDNGRvQGa0Ve lrIf4G6E3Ofaqx1pUrK3RPwKTRpcIlyOZQQrnilEwQ83tdgRuIznv5GqxhjpXlFxpyo4 kMHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oOcHUXSp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 90-v6si2832494ple.599.2018.01.30.11.34.55; Tue, 30 Jan 2018 11:35:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oOcHUXSp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753580AbeA3Tdy (ORCPT + 99 others); Tue, 30 Jan 2018 14:33:54 -0500 Received: from mail-vk0-f68.google.com ([209.85.213.68]:41847 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752346AbeA3Tdw (ORCPT ); Tue, 30 Jan 2018 14:33:52 -0500 Received: by mail-vk0-f68.google.com with SMTP id g186so7533114vkd.8; Tue, 30 Jan 2018 11:33:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=F/klWyItyTzJwTiG33mlRrCxc7NfxrTQXn+JuutScMw=; b=oOcHUXSp45m2PH50cE1J5NpwGSup/iQ3AGDw6OGMNUnCaNDeB3PGv1FPuqse7sIUWg UVZn2uqW0ijav6AVlWI8ODetPCCmyTRcZi8ZfvoFUr3fseQ9MWuvOO1vHPAwFwGh5QZP E9OmkfGyfELHgf80Bfvwgi7dK55Kr8EOrEHYEFanA/4upJYQ0RdPdUbVHoA74V0m84y/ /FlfpngNXsumLRqHNbDi26IsvgA1XYXVAQBLXyGWIR+EIjv2G8jQ6MQAYwuVynV68qGY JJeSgp3KqGqpfktYrdfpmugxcX7VWeyjTcjkU1e2GcktWfUgkRHVnWuy+sjvpNxKFlXy ZQ4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=F/klWyItyTzJwTiG33mlRrCxc7NfxrTQXn+JuutScMw=; b=p6r7X774bf4Vk9mNJy1JqiBM0Xs6GzkcbR/eJ+hg8QE2Rr2TRYOoDuaKkzLBkNVar+ RNqkX0Ap/PLFYpk5gX+A6HsM/emoNbWCmrzCiNxoOxKKOLpaPNlvA6D3jKZLL9sZ4UWW ZIdlLOhJc+Zk8yiFivoMuQpfd+PRhkQx44ZEVC+dpRYlMD3Jk4B/VfUvoKGExh4a8EMT qzDO7x/6CUYGzo8DFAvON6XE/llHmuXQ0b7Vp2XEVp9iAFJYJ4h6MSjGva+OclQclKXF n+oW9pWXBNHhmX06cywQ7EQEvCtinsSnH85K9G2yA/0r6ePdlpVGHErjnPc4jPdM7dxk 2VUg== X-Gm-Message-State: AKwxytf7OZVu7R5AfqKlDDLTZSDmIH3Ak2PQLMdsjw8Q43Yt7HGN0Kt7 QAhSB5MScMbPVelIdZ0mxrg0cq0uvCuvLatR2qI= X-Received: by 10.31.57.198 with SMTP id g189mr23444623vka.141.1517340831619; Tue, 30 Jan 2018 11:33:51 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.70.21 with HTTP; Tue, 30 Jan 2018 11:33:51 -0800 (PST) In-Reply-To: <1517337292.2230.15.camel@tiscali.nl> References: <20180130181853.32512-1-ulfalizer@gmail.com> <1517337292.2230.15.camel@tiscali.nl> From: Ulf Magnusson Date: Tue, 30 Jan 2018 20:33:51 +0100 Message-ID: Subject: Re: [PATCH] kconfig: Warn if help text is blank To: Paul Bolle Cc: Masahiro Yamada , "Luis R . Rodriguez" , Linux Kernel Mailing List , Linux Kbuild mailing list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 7:34 PM, Paul Bolle wrote: > On Tue, 2018-01-30 at 19:18 +0100, Ulf Magnusson wrote: >> Print a warning if a 'help' token is given but the help text is blank. >> Personal pet peeve. >> >> Example warnings: >> >> net/sched/Kconfig:860: warning: 'NET_IFE_SKBMARK' defined with blank help text >> net/sched/Kconfig:865: warning: 'NET_IFE_SKBPRIO' defined with blank help text >> net/sched/Kconfig:870: warning: 'NET_IFE_SKBTCINDEX' defined with blank help text >> drivers/video/fbdev/Kconfig:1159: warning: 'FB_I810_I2C' defined with blank help text >> drivers/mmc/host/Kconfig:877: warning: 'MMC_TOSHIBA_PCI' defined with blank help text >> drivers/staging/rtl8192u/Kconfig:8: warning: 'RTL8192U' defined with blank help text >> drivers/staging/rtl8192e/rtl8192e/Kconfig:9: warning: 'RTL8192E' defined with blank help text >> lib/Kconfig.debug:354: warning: 'ARCH_WANT_FRAME_POINTERS' defined with blank help text >> >> A separate patchset will be sent to fix all current instances of blank >> help texts for all arches. I added the same warning to Kconfiglib. > > If you do this it would be better to first fix or remove those help texts I agree that this shouldn't go in until/unless a significant portion of those empty help texts get removed first. > and only then add this warning. Ie, add the warning in the last patch of a cleanup > series. Might have been better to arrange it like that, yeah. The patchset that removes the empty help texts is at https://lkml.org/lkml/2018/1/30/574. I could make another one if you'd prefer that. > >> --- a/scripts/kconfig/zconf.y >> +++ b/scripts/kconfig/zconf.y >> @@ -436,6 +436,12 @@ help: help_start T_HELPTEXT >> zconfprint("warning: '%s' defined with more than one help text -- only the last one will be used", >> current_entry->sym->name ?: ""); >> } >> + >> + /* Is the help text empty or all whitespace? */ >> + if ($2[strspn($2, " \f\n\r\t\v")] == '\0') >> + zconfprint("warning: '%s' defined with blank help text", >> + current_entry->sym->name ?: ""); >> + > > Does this go to stderr? Yep - goes to stderr. zconfprint() is the standard error reporting function during parsing, and also prints the parsing location. > > Another fix would be to ignore empty help texts and not render them at all. Is > that possible? I haven't even checked how they are rendered to be honest. I was more concerned with the Kconfig mess. > Thanks, > > > Paul Bolle Cheers, Ulf