Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp5434104pxj; Wed, 26 May 2021 10:22:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy7M8rMRZCZ/qpvIyV2aU2rMLtnzp62rXIjUauDvIzdGTGVobX9aRo84bFheKjn3q8qOmnV X-Received: by 2002:a92:cda5:: with SMTP id g5mr27588165ild.245.1622049776153; Wed, 26 May 2021 10:22:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622049776; cv=none; d=google.com; s=arc-20160816; b=s/fl3E+38Geeyn5F7foaVFuH7v9hjHCj5i6tFTwOU9X5go2ZDRs56p8ibtMyVcy6Nu o8aN75bcmLHPXnDQny7uOStEgVm76d2/LRv2o6V1cHRTLAJn2w/hvRb/Oh3jO3YNFVlC Biykra8000yrNMxFjGKVdao0k7teCkIx+QUdz/4Jq9cg6qq9NB0zvwMsdba+Vu8QKm43 zzaVJQ0yRaCeBTo2nkJzIPaGkrPV0azbYk8N2XAJDQY2FVh+X3F5whooDYfcCUB1K8Fd 1p1YkMW7odj4t5AB44WGuBfETjH7XBB9GjqQv5lVTXOsHEqhghShaLos2eVQrVFY+Ik0 qYrg== 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=uFfTwiHl/3jUd23mc+kDt16K3f2oRbuQwCIdLGh/Zv0=; b=EAv4Tnz4VGUGngze9ymhKQBt7Xbb9J5BkVzuq17nis2VwE+d9XkhMrNfP36uGHIIZz I7OxpTZJ2v4OxKnktoWnCE9fgi9VKxxEZC442bpTvROXjLL6ffOzArnR7zUVpD1qgJlp uKGvNzFhl1F81scdRL7phBYj+iScTeXnMdonCjt183h/pzK/2sTOO6y7taFRU4BQRN9D 7F4T+kaMY4a0bpx3VpBAmJUIgP6M1c6pNvMC263xhaHpqIbRIaQ4E6S6Bctd8ER8Y1N+ CNtaNXdKWni9rU/85Uy9L5q8wVlfpt0AIlE7YyKVGBZlHtHXnzutf7L7JSkHThfpWOR+ s42A== 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 l17si21821767jaj.81.2021.05.26.10.22.31; Wed, 26 May 2021 10:22:56 -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 S234610AbhEZLur (ORCPT + 99 others); Wed, 26 May 2021 07:50:47 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:3951 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231843AbhEZLta (ORCPT ); Wed, 26 May 2021 07:49:30 -0400 Received: from dggems703-chm.china.huawei.com (unknown [172.30.72.58]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Fqpz45WKfzCx3v; Wed, 26 May 2021 19:45:04 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggems703-chm.china.huawei.com (10.3.19.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 26 May 2021 19:47:57 +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; Wed, 26 May 2021 19:47:56 +0800 From: Guangbin Huang To: , , , , CC: , , , , Subject: [PATCH net-next 08/10] net: wan: add braces {} to all arms of the statement Date: Wed, 26 May 2021 19:44:53 +0800 Message-ID: <1622029495-30357-9-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1622029495-30357-1-git-send-email-huangguangbin2@huawei.com> References: <1622029495-30357-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) 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 77b4f65cc4e0..5c2a2ec6de5f 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