Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1010863pxj; Thu, 27 May 2021 17:50:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyQHWR8VMUyOsIFuEgPPcR34zMyPmgjB27YyDsbycQh6WTlge2Z1BirD1T43kj9/EugIzog X-Received: by 2002:a05:6e02:cd3:: with SMTP id c19mr4873064ilj.92.1622163019002; Thu, 27 May 2021 17:50:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622163018; cv=none; d=google.com; s=arc-20160816; b=0T5OpQpJFswhcf8SAZUCUTEyeIxRNhaYhQ6thaCMc2C3azqJwKNjKqsp4KSbYRMLgS 2fz4Lvth9Ndueq/xxzQd8JTmPjcgf2olTreuWW6w2ZEbH2HesKO7Ob+Y57triDnhCArX qXPX4xZCe+bjSooIwJtOfQEIvDXCinIK2eBh3DJx7R4pMyg/t+b/9ast1z4CXUv1VTiR 1BMELDsWy4CV2yY9+oBAOG2uDqiuWSKSzfhhmXtKX42tDBAoieIUzU7t7mDqkGn1tBlw miFgupZ9Db31XdaMJvosQi5ZAO6Yx+o+BD2vtzSpwfCxUCRoowrxIfLQpH+MpxKGx/pA c7Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=8hZztaQvYb4ajbxxBr39otwzz6Ubdm/rVNkonCxYQSA=; b=KdUC/wQNzTeiAAGUq7Z/NR8wg7zmfDyL6UHEYnfPm02lGkqcr/t8d+jFtx3kNvc+79 lHRVZisxmdy0T5yOSSxC0tvD2v82EMbiorWK12XIyXqXwR9LpD2bv9/cQVdYuoTVF91Z jqsBBL83yI16siVooIFa9J4Ox/J1z2jM5dIVzevywK8qUmteyGZKOBpv2RJcLYCUzbiQ Kw6kIMT13O1j+Xgp71n1pCCmPqYKm9bmdE0v/jB02477gBpsslFJUwYCGQElPCO1Nol3 IY9DuhNwKeTCnWBmkNzzywcYqq5+7Bq4z2GIOT8TtgetLx9KBgb0+HCXOQBD5u5x0CDJ JcWA== 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 r7si775197ilg.49.2021.05.27.17.50.04; Thu, 27 May 2021 17:50:18 -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 S236806AbhE1ARt (ORCPT + 99 others); Thu, 27 May 2021 20:17:49 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:2380 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234601AbhE1ARa (ORCPT ); Thu, 27 May 2021 20:17:30 -0400 Received: from dggeml754-chm.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4FrlVm1SNlz65pl; Fri, 28 May 2021 08:12:16 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggeml754-chm.china.huawei.com (10.1.199.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 28 May 2021 08:15:54 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 28 May 2021 08:15:54 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH V2 net-next 08/10] net: hdlc_fr: add braces {} to all arms of the statement Date: Fri, 28 May 2021 08:12:47 +0800 Message-ID: <1622160769-6678-9-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622160769-6678-1-git-send-email-huangguangbin2@huawei.com> References: <1622160769-6678-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li Braces {} should be used on all arms of this statement. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/hdlc_fr.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index 77b4f65..5c2a2ec 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -613,10 +613,10 @@ static void fr_timer(struct timer_list *t) fr_set_link_state(reliable, dev); } - if (state(hdlc)->settings.dce) + if (state(hdlc)->settings.dce) { state(hdlc)->timer.expires = jiffies + state(hdlc)->settings.t392 * HZ; - else { + } else { if (state(hdlc)->n391cnt) state(hdlc)->n391cnt--; @@ -671,8 +671,9 @@ static int fr_lmi_recv(struct net_device *dev, struct sk_buff *skb) return 1; } i = 7; - } else + } else { i = 6; + } if (skb->data[i] != (lmi == LMI_CCITT ? LMI_CCITT_REPTYPE : LMI_ANSI_CISCO_REPTYPE)) { @@ -1013,8 +1014,9 @@ static void fr_start(struct net_device *dev) /* First poll after 1 s */ state(hdlc)->timer.expires = jiffies + HZ; add_timer(&state(hdlc)->timer); - } else + } else { fr_set_link_state(1, dev); + } } static void fr_stop(struct net_device *dev) -- 2.8.1