Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2626984pxj; Mon, 14 Jun 2021 03:24:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEgxMl0RT08NIK/Ucs7QTivcgLcd7IneXCoyo5qf51pPab7Y7gzSCn96TmuarJrtxgTLTT X-Received: by 2002:aa7:c818:: with SMTP id a24mr16655710edt.53.1623666281444; Mon, 14 Jun 2021 03:24:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623666281; cv=none; d=google.com; s=arc-20160816; b=XSm2Cc+0Uhy8Ym9nRzGgcAOThpBVjG64vNpV+ZBTtUj+dDkmashY0xd2QJwTxMT180 SfDTARUobZFK1YNQid25LT+jXLDkj0ngXlV87fZ0H8AGE7R+loSEYBbAQC8gIVBAyClK 0TObPI6uOKP92yblLL24QIZD9vNoY512x8Wcc8kT2vFygqxU02el6lXUlsZB4a81xVpC aDrvWzfUFvgBWZlvfi39o/DBV7U0ZRNrcKGNWXACdHwFDxZogbck5cfTYuED3Rzvz1Ca z9PWCZq54Ve7QOpS+/AVyIKpfjHHLC0RaQUePRX3BsL9LlGt8q/p1PYo95dxsUQaTEai bg0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject; bh=bRgds/CUE8GNMIek9Fsmi7Uz1jjF44RwORWeqI95j4s=; b=w7piQlsdelS4TR82kALQIeEWrKxe+04/R+LrbYfIae81r0qHAIvBCe87e5zZVdc51g 0tKXrqNXTkT6dagnjkNageuKsrKodaY9VJA/Io6VYI/fY8RAJps+tE1S6WvVd89EUITT JyyeJvtLieoKiN7ELKFanxYZ8GN8FxFiRBn30IyOuPSX7QzohpgpeVflzuDP/OCElPlm A+uYN2vBbrZW2U+jT+N54hu14C6eY/QQU/6tnW1X3h0jiUErI1X1xbPOr1qTPcC/xsFZ FFhOkvu8hMlazhQLRtIOhtyrsXukfBuDit6PwdohWHAkvg1/0sZaWmhHfLim4pyP6JvE jWjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k1si10953705ejg.69.2021.06.14.03.24.19; Mon, 14 Jun 2021 03:24:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232839AbhFNKXc (ORCPT + 99 others); Mon, 14 Jun 2021 06:23:32 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4433 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232809AbhFNKX2 (ORCPT ); Mon, 14 Jun 2021 06:23:28 -0400 Received: from dggeme755-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G3S883j3Yz6yfl; Mon, 14 Jun 2021 18:18:16 +0800 (CST) Received: from [10.67.100.138] (10.67.100.138) by dggeme755-chm.china.huawei.com (10.3.19.101) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 14 Jun 2021 18:21:24 +0800 Subject: Re: [PATCH net-next 04/11] net: z85230: remove redundant initialization for statics To: Andrew Lunn , Guangbin Huang CC: , , , , , , References: <1623569903-47930-1-git-send-email-huangguangbin2@huawei.com> <1623569903-47930-5-git-send-email-huangguangbin2@huawei.com> From: "lipeng (Y)" Message-ID: Date: Mon, 14 Jun 2021 18:21:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.100.138] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggeme755-chm.china.huawei.com (10.3.19.101) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2021/6/14 0:22, Andrew Lunn 写道: > On Sun, Jun 13, 2021 at 03:38:16PM +0800, Guangbin Huang wrote: >> From: Peng Li >> >> Should not initialise statics to 0. >> >> Signed-off-by: Peng Li >> Signed-off-by: Guangbin Huang >> --- >> drivers/net/wan/z85230.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/net/wan/z85230.c b/drivers/net/wan/z85230.c >> index 94ed9a2..f815bb5 100644 >> --- a/drivers/net/wan/z85230.c >> +++ b/drivers/net/wan/z85230.c >> @@ -685,7 +685,7 @@ irqreturn_t z8530_interrupt(int irq, void *dev_id) >> { >> struct z8530_dev *dev=dev_id; >> u8 intr; >> - static volatile int locker=0; >> + static int locker; > Is the volatile unneeded? Please document that in the commit message. > > Andrew > . Hi,  Andrew: When i create this patch, it will WARNING: Use of volatile is usually wrong: see Documentation/process/volatile-considered-harmful.rst According to the file in kernel: Documentation/process/volatile-considered-​harmful.rst the "volatile" type class should not be used. So i remove  "volatile" in this patch. I will add the reason in commit log Next version. Thanks. Peng Li