From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95BB1C43334 for ; Tue, 28 Jun 2022 12:02:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345338AbiF1MCq (ORCPT ); Tue, 28 Jun 2022 08:02:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344929AbiF1MCZ (ORCPT ); Tue, 28 Jun 2022 08:02:25 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 646432E9F2 for ; Tue, 28 Jun 2022 05:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jL1gJrWX37x+h1++tMH8uyXq3CpESXwb4NN7kK1bpMQ=; b=FkBGuceDB+930n1nflLN+Xh7/b nGOeTfqCSPCtLyf4mzzQIKy1oRKK0pbxBc2aAU5HoIJoX+1Hd7sohK11AKhh1wXaYizF/gmftDlTe 4DjuWlbuten+rP1bxn1aouP1Fa8TpmLs3IV/Xn2MCEqeltERbKnN6wNen4Mza3d1JOPfidENXdwGy Cx3tNocWai9krfdudDHuTpyG3VU6ywmzBcP9FOjUlU4FegJaM+/mieI30TdGVtztIuAJ4s2CUg7gS r7eFp4ySh5fImKKdPOdPj0cUVUpLTLT1moRiaO/ZTs6mdGM5i+GuS8LcqFdr0ijoPcwUV6dblbRmO m1D2ZQ5Q==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o69uP-00E5X7-Ce; Tue, 28 Jun 2022 12:01:36 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 2FBD330017D; Tue, 28 Jun 2022 14:01:31 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1AC342020A5A1; Tue, 28 Jun 2022 14:01:31 +0200 (CEST) Date: Tue, 28 Jun 2022 14:01:31 +0200 From: Peter Zijlstra To: Arnd Bergmann Cc: Masahiro Yamada , mmarek@suse.cz, Paul Gortmaker , Mike Rapoport , Borislav Petkov , Linux Kernel Mailing List Subject: Re: [RFC][PATCH] kconfig: Add implicit CONFIG_ prefix to IS_ENABLED() and co Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 28, 2022 at 01:19:17PM +0200, Arnd Bergmann wrote: > On Tue, Jun 28, 2022 at 11:56 AM Peter Zijlstra wrote: > > > > Since IS_ENABLED() (and friends) are clearly meant to be used on > > CONFIG_foo symbols and IS_ENABLED(CONFIG_ is so long and almost an > > tautology, allow the more compact usage of: IS_ENABLED(foo). > > > > Signed-off-by: Peter Zijlstra (Intel) > > I'd prefer to keep the more verbose usage, mainly because it makes it easier > to grep for a symbol. If today you do 'git grep CONFIG_PM_SLEEP', you find > all instances in Makefile, in #ifdef and in IS_ENABLED(), though not the > references in Kconfig language, which leave out the prefix. Which is why I never grep for the CONFIG_ thing to begin with, it misses the Kconfig site. > If we remove the prefix for IS_ENABLED(), the same grep fails to get > all the results, while searching for the substring without the CONFIG_ > prefix can end up finding false-positives by finding longer strings (e.g. > CONFIG_DEBUG_STACKOVERFLOW vs > CONFIG_HAVE_DEBUG_STACKOVERFLOW). Me being used to that doesn't consider that a real issue :-) I'd much rather have the somewhat shorter IS_ENABLED() things.