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 X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFF05C433B4 for ; Thu, 20 May 2021 01:24:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C33C661028 for ; Thu, 20 May 2021 01:24:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbhETBZa (ORCPT ); Wed, 19 May 2021 21:25:30 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:3428 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbhETBZ3 (ORCPT ); Wed, 19 May 2021 21:25:29 -0400 Received: from dggems702-chm.china.huawei.com (unknown [172.30.72.60]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4FlsQ81bNVzCtxG; Thu, 20 May 2021 09:21:20 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggems702-chm.china.huawei.com (10.3.19.179) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 20 May 2021 09:24:07 +0800 Received: from [127.0.0.1] (10.174.177.72) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Thu, 20 May 2021 09:24:06 +0800 Subject: Re: [PATCH 1/1] mISDN: Mark local variable 'incomplete' as __maybe_unused in dsp_pipeline_build() From: "Leizhen (ThunderTown)" To: Leon Romanovsky CC: Karsten Keil , netdev References: <20210519125352.7991-1-thunder.leizhen@huawei.com> <7f462ad9-93b5-9597-664f-d52d252eed01@huawei.com> Message-ID: Date: Thu, 20 May 2021 09:24:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <7f462ad9-93b5-9597-664f-d52d252eed01@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.72] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2021/5/20 9:09, Leizhen (ThunderTown) wrote: > > > On 2021/5/19 23:45, Leon Romanovsky wrote: >> On Wed, May 19, 2021 at 08:53:52PM +0800, Zhen Lei wrote: >>> GCC reports the following warning with W=1: >>> >>> drivers/isdn/mISDN/dsp_pipeline.c:221:6: warning: >>> variable 'incomplete' set but not used [-Wunused-but-set-variable] >>> 221 | int incomplete = 0, found = 0; >>> | ^~~~~~~~~~ >>> >>> This variable is used only when macro PIPELINE_DEBUG is defined. >> >> That define is commented 13 years ago and can be seen as a dead code >> that should be removed. > > OK, I will remove it in V2. Actually, every time incomplete=1, a KERN_ERR message > is printed in advance. The only new information is the 'cfg'. Wow, Do you mean remove all "#ifdef PIPELINE_DEBUG" debug information? I will clean them. > >> >> Thanks >> >>> >>> Reported-by: Hulk Robot >>> Signed-off-by: Zhen Lei >>> --- >>> drivers/isdn/mISDN/dsp_pipeline.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/isdn/mISDN/dsp_pipeline.c b/drivers/isdn/mISDN/dsp_pipeline.c >>> index 40588692cec7..6a31f6879da8 100644 >>> --- a/drivers/isdn/mISDN/dsp_pipeline.c >>> +++ b/drivers/isdn/mISDN/dsp_pipeline.c >>> @@ -218,7 +218,7 @@ void dsp_pipeline_destroy(struct dsp_pipeline *pipeline) >>> >>> int dsp_pipeline_build(struct dsp_pipeline *pipeline, const char *cfg) >>> { >>> - int incomplete = 0, found = 0; >>> + int __maybe_unused incomplete = 0, found = 0; >>> char *dup, *tok, *name, *args; >>> struct dsp_element_entry *entry, *n; >>> struct dsp_pipeline_entry *pipeline_entry; >>> -- >>> 2.25.1 >>> >>> >> >> . >>