Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp768884ybi; Wed, 3 Jul 2019 04:24:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwK5tkp4mXjYkMXfU8G4sbOhR4up3YIX8+uvno5+NnnbCYm/yOSxxX8XY+zer8f4zUfZIMP X-Received: by 2002:a63:2985:: with SMTP id p127mr12712095pgp.400.1562153097848; Wed, 03 Jul 2019 04:24:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562153097; cv=none; d=google.com; s=arc-20160816; b=jcR3Iwo424pMgfWLVyHI1KeADM9RiMA01HFkEEztFFs4ZGO0UX/FLv8r0QvDcJFt3z qTRhbNsA9l179YhpS96TkJBqe6RUbdCMNGzYRDpGEbTaQMjNP+CBQ+3ptkKsUpXI6dOo 6ERHLU67Lj1uitJ326P1abRE9dDQNr2uqk3YbRR117aSrJz71n0i7wIuldr2tOOeaEvL RqzBng9lOC6mFSjz3DrkpXcaBdtxvZdD+lODitG+z3ET5oyPRNtcSgqh4H7MOu1cTqTl xDfnem94C8dAyVFOQYheTmNB0GIH1Ha5mwrIYn4lLJ194NzhajszXAQ4uEjOOBQvD8/7 BZ8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=uEQtcny9UtISHVJ7ULJcnRl0dUF+ugztMVMaoMbJgJA=; b=hmQ8e/8VJhJA6TkuVpfD4DHcxQqNiMclZVbwSxp+RrjlHckC/Pw2+TfPvskslPK7pa GSuZq2Pu/r6C47YsIMqeEyY4BCftOCu9o01pRSoBF1qj7g1rW+xZDvwthcInknkW7h93 jyVDhTD68S3t8nBFiZ34qpKGxVO69I87Z4sFrnKoGAk+NpASXiwDrRRTp4/CxVGR8edy gjXIzIM4kdhLik0Ih7aCc+C6Mo4h4VRoP/bzrTwlIYpnERkoovYp6XO4Oxgep2ANMSF8 abAs0wKbzV5z1PdDO26FlPF/CDVVd6Qx/TQKUP5uZc2RBlmX1lPp/dukohv3lnqgmbvd 5Gvg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r17si2207858pgo.310.2019.07.03.04.24.41; Wed, 03 Jul 2019 04:24:57 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726780AbfGCLWn (ORCPT + 99 others); Wed, 3 Jul 2019 07:22:43 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:14283 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726255AbfGCLWm (ORCPT ); Wed, 3 Jul 2019 07:22:42 -0400 X-UUID: 22bec9af9d5e4b6bae6d07223e81147f-20190703 X-UUID: 22bec9af9d5e4b6bae6d07223e81147f-20190703 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1647223127; Wed, 03 Jul 2019 19:22:31 +0800 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 3 Jul 2019 19:22:30 +0800 Received: from [172.21.77.33] (172.21.77.33) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Wed, 3 Jul 2019 19:22:30 +0800 Message-ID: <1562152950.25531.4.camel@mtkswgap22> Subject: Re: [PATCH] checkpatch: avoid default n From: Miles Chen To: Joe Perches CC: Andy Whitcroft , , , Date: Wed, 3 Jul 2019 19:22:30 +0800 In-Reply-To: References: <20190703083031.2950-1-miles.chen@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-07-03 at 01:42 -0700, Joe Perches wrote: > On Wed, 2019-07-03 at 16:30 +0800, Miles Chen wrote: > > This change reports a warning when "default n" is used. > > > > I have seen several "remove default n" patches, so I think > > it might be helpful to add this test in checkpatch. > > > > tested: > > WARNING: 'default n' is the default value, no need to write it explicitly. > > + default n > > I don't think this is reasonable as there are > several uses like: > > default y > default n if > > For instance: > > arch/alpha/Kconfig-config ALPHA_WTINT > arch/alpha/Kconfig- bool "Use WTINT" if ALPHA_SRM || ALPHA_GENERIC > arch/alpha/Kconfig- default y if ALPHA_QEMU > arch/alpha/Kconfig: default n if ALPHA_EV5 || ALPHA_EV56 || (ALPHA_EV4 && !ALPHA_LCA) > arch/alpha/Kconfig: default n if !ALPHA_SRM && !ALPHA_GENERIC > > Thanks for your comment, perhaps we can just deal with the "default n$" case? like: + $line =~ /^\+\s*\bdefault n$/) {