Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2359018pxm; Sun, 27 Feb 2022 19:18:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNjabciK/I+RTCtexyf6Y8bJOSH1L3lFZeOY7DHmtXw5m88uVmmb/5wyLcFg0tKuy/vesn X-Received: by 2002:a62:1d07:0:b0:4bf:3782:22e3 with SMTP id d7-20020a621d07000000b004bf378222e3mr19497642pfd.52.1646018319236; Sun, 27 Feb 2022 19:18:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646018319; cv=none; d=google.com; s=arc-20160816; b=ZgRwc/KYmqmGI0QaQ1EOwlHhploFLgZ/Wu/QfvXKQORzcWJC/oQ2D8nJps+iYm1yr1 6qVGTpH2/z0HYf3hmdQULrb6KuoCEHzlN/DfXjwgM/1GeJQlIvzsi7dwoTr2ojTKvUHo XDFvYJaOmXTkiLLfM9o/56t+9AjNd0TwwJ4dlX48YtwyZkvrED83SmY/7aNnG8Wy+wEO Yx7a3DoDTT78TZekQzpcC6E05qkyEXYLlQYMIS6JawHPN4KjTjQ9E6Zh0Y87+pf4hxZn 13KM4S5TFGZzFJcNdoDXcffO3nGcDJDLzv60DgXUWBg3PDk0K+leK1mXa7mfttp0RHhM qTBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=+fAl6T6oWGlXJaYsIgRSynLRK2RFhYWpoik7TOA/9yI=; b=Plj4IqSvuxW0qhGklZm9EnN7xoID7bWhn2BZeGX3JfIVuzIxlSUsnJTBCK7TyW6yZq DMng73Dr87Ur/jJbG9PHcjlgQZftFX7VrN3hl1ALb+RHElwiOD3yJ6U4CdIkEJzXAydA cos/kMJsG3zDgIrZbl6IcHCBoa/4ewIBiwKyVYjaGuDP2UvIDdP1WFABbsGbMgZdUJbL zXCsjFDrNyUBWGPpFie15jQKbXy4I7vo9dOgeknO+CE1HpD4ZGmqwUAvxBVfx02v1IZS YJSOc4RpgwGMYAy50XjTGB3gWCg8oRNJoyRPxZMazQJlYjD6HseuY7xoig275R15m1ev iyAg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q3-20020a170902dac300b0014ffb38f7a1si9133724plx.590.2022.02.27.19.18.23; Sun, 27 Feb 2022 19:18:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232686AbiB1DHZ (ORCPT + 99 others); Sun, 27 Feb 2022 22:07:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231558AbiB1DHY (ORCPT ); Sun, 27 Feb 2022 22:07:24 -0500 Received: from smtpbguseast3.qq.com (smtpbguseast3.qq.com [54.243.244.52]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16C3122515 for ; Sun, 27 Feb 2022 19:06:43 -0800 (PST) X-QQ-mid: bizesmtp71t1646017582t5w9yqju Received: from localhost.localdomain (unknown [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 28 Feb 2022 11:06:16 +0800 (CST) X-QQ-SSF: 01400000002000C0G000000A0000000 X-QQ-FEAT: sgqrBpdJ5GA6NKedtCLLViTvg/su6Kc9xUp65VOLHbzyY/xiAKX9qDQGVsS90 vF72AV14Lh8NsfPH5V+MiKzUiUbRTq3kFi8p/94fJY6Bin5z7T5WIfQu8A/7NjaBEK2vwJ9 fqiXcJ+VAu0snaEBNnUq3WYFWJEFdrX1aJLhKj28OKGCzi5dG9tcI/aJigt53jf6bWkAhJT o3MY46nhS05gPRVP+Ks38+cGVImzVmtASkqdZE8F85wqvbxff2HuFzHe+9jTZq+qoQ59S3Q uqZ0OKrhkEe7LYVHyZ2hRTHBC1v76Eni6qgjlTmAHus7+5HhornCzMT9Z0rtVQcVPS8woya 9ZGwTyCToRIGmVproCGytLjk10eLgEJO8Io0xGgBCYkJR/9BTU= X-QQ-GoodBg: 1 From: Meng Tang To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Meng Tang Subject: [PATCH v2 1/2] ALSA: core: remove initialise static variables to 0 Date: Mon, 28 Feb 2022 11:06:13 +0800 Message-Id: <20220228030614.10606-1-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Initializing the static variable to 0 causes the following error when exec checkpatch: ERROR: do not initialise statics to 0 FILE: sound/sound_core.c:142: static int preclaim_oss = 0; In addition, considering the following way of writing 139: #ifdef config_sound_oss_core_preclaim 140: Static int preclaim_oss = 1; 141: #ELSE 142: Static int preclaim_oss = 0; 143: #ENDIF We can optimize it by IS_ENABLED(CONFIG_SOUND_OSS_CORE_PRECLAIM), so modified it to static int preclaim_oss = IS_ENABLED(CONFIG_SOUND_OSS_CORE_PRECLAIM); Signed-off-by: Meng Tang --- sound/sound_core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sound/sound_core.c b/sound/sound_core.c index 90d118cd9164..aa4a57e488e5 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -136,11 +136,7 @@ struct sound_unit * All these clutters are scheduled to be removed along with * sound-slot/service-* module aliases. */ -#ifdef CONFIG_SOUND_OSS_CORE_PRECLAIM -static int preclaim_oss = 1; -#else -static int preclaim_oss = 0; -#endif +static int preclaim_oss = IS_ENABLED(CONFIG_SOUND_OSS_CORE_PRECLAIM); module_param(preclaim_oss, int, 0444); -- 2.20.1