From patchwork Fri Apr 15 12:58:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yihao Han X-Patchwork-Id: 562785 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 77E05C433F5 for ; Fri, 15 Apr 2022 12:59:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353829AbiDONBn (ORCPT ); Fri, 15 Apr 2022 09:01:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237609AbiDONBl (ORCPT ); Fri, 15 Apr 2022 09:01:41 -0400 Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2115.outbound.protection.outlook.com [40.107.255.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6339CA0F4; Fri, 15 Apr 2022 05:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1mwsSWqcxMWPJ9fQAzHr/xZzgf7akY78cBjhxNlCad9J0Jk3XO/F5lZzjmsem1mFw3YBK0ggnH3w3VCeJUsm51vKqmTkYXTcqxh+yqjmXW2qwwK+VdGy9S9xUSQS21rrAWGJHdQeQnJ9YiDJNgM+Q50QrK6mL5qiYTfz83nQjORKFvFgozqtfOy74ltiz0XsENtr5p+RxgYCtatyWntoqjFZbtCLuI0yu4oC2+NIiZjODqyTUJlcYPRme2UXtNLJCjhmEduhQoCs7uWunlXrVGiuDcseamLpuaL66OM9S0JJmR2QOalwLM/p0JQZPNp5m2Hw6eQxD6dNhWf3n8z2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=2XJ0+rZEpZm625Pbo1AOKnqBYmgN1k75xwNX1itQ6Ds=; b=j4VvruaK8C+cm1FqByqlWx2VqNgTjhUj3K1AMOtWaOwfdUiK6s6xMCKoT8XueZZPAqNpMuYA5GxVNN3Tuqz4FjT6aX/+NvfFsRiPwzjS5RS1mvAwwp1WF637oWc6+JlYeoT5NTUz4kRbbqszGz1MYTaFl528UrurFYFlCO7a+8V9nWYHhr1BHvF3cNpFLklZuMl8LpEzYXZPoOsJx/b4KzHoqTePg1XAHn2PBDnbDZuAzSfZgzJlVpGVA7NVlo+M1tbAaEOby85aImsgMwYqr5LGQ22Axuar1lqhPHc6z5BQsT5osM7p+Ov8k8ju16VLjHuOc/h/u139wM7FdkzLYQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vivo.com; dmarc=pass action=none header.from=vivo.com; dkim=pass header.d=vivo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vivo0.onmicrosoft.com; s=selector2-vivo0-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2XJ0+rZEpZm625Pbo1AOKnqBYmgN1k75xwNX1itQ6Ds=; b=UYT428jpPFXjvNnvQuGmtpdpP3ZyhVQGR1EYI4+qOs8micwikaf1WJQ7dvbKe6kXfkRcJi4VJPzwUQke6dsNllfnjzY5O1+OOOl8PC3zqy9VmI3n+cfvw47CET7Aqxg76lrMOU5o16zZ8IqMY8qrGrYwu6W5sE4EMeAa5R+Vz5o= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from TYZPR06MB4173.apcprd06.prod.outlook.com (2603:1096:400:26::14) by SEYPR06MB5013.apcprd06.prod.outlook.com (2603:1096:101:3e::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Fri, 15 Apr 2022 12:59:08 +0000 Received: from TYZPR06MB4173.apcprd06.prod.outlook.com ([fe80::d4bd:64f4:e1c0:25cb]) by TYZPR06MB4173.apcprd06.prod.outlook.com ([fe80::d4bd:64f4:e1c0:25cb%4]) with mapi id 15.20.5164.020; Fri, 15 Apr 2022 12:59:08 +0000 From: Yihao Han To: Kalle Valo , "David S. Miller" , Jakub Kicinski , Paolo Abeni , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kernel@vivo.com, Yihao Han Subject: [PATCH v2] ath11k: simplify if-if to if-else Date: Fri, 15 Apr 2022 05:58:53 -0700 Message-Id: <20220415125853.86418-1-hanyihao@vivo.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: SG2PR04CA0166.apcprd04.prod.outlook.com (2603:1096:4::28) To TYZPR06MB4173.apcprd06.prod.outlook.com (2603:1096:400:26::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b2331a2b-9160-4ac5-3625-08da1edfba9a X-MS-TrafficTypeDiagnostic: SEYPR06MB5013:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VxDoJwl0LEFXutK89PCBs1FYyZ8m1FjwGoIztQjAHPlkAhkukrwIujMdgW0FM4cWSvMs3KnbtROdqaQ2bxNfLLcfRe+/i8LlQPzs2dS/8xBWUZLpRo5WbKHDZsZtNmU+YcXYEa/HBISe0QohOuSXXzpBtgh3cWJKJ4ZPBcJH/aSEERnSyb0j5UEP8Hoq4hKkQCSRXf020vURumo+Ghhd11ey8pETC4DkLQPW2b7n3Zi7ZNpMlmBryXW2Z267XV7Y6g28X0MjqEx8h4I4SnzbyFaANfbGhGhj57Q53tniXXwaJJXrL0i1m4sfLpYgwoNZ3FeDxzrHBfL+cK8L1tt1xU0rg5m3dg2VzDxkL/PIq1wzXRsItZWGdYYUfnwYxScBXZQJlZe9lBnK4seALfl4IXpUVJU2TLUFft8Zjf6YlJp2Ll/G8LT+OGWV2cfJMVlkxDHVN1i5ualBSHAvTwCvfVhsMrVawqxVva1GDBPYxBXgYcNhgU5wisKYCO9hN9VzSds5/yruVemUra/MwM/1kTqK/8FiJQ043ce9Ic/dvLPQAYTkN5r6H3kBb1VbvNAAwaHpxhiX4nFrWjaOW87X8UeN8t0tLiFyhx0mdde2HXATeAfT962aq8BQLlzzu1oZiGg1yBcN/8O4cw6OMu8Ysx02+a/EBhT3zJJY9pm102DN0on5xzxGZJvqnT4obkqCzfcOfjtJUqWr26CvRMe1SbUT6tljnhqhd7BwEgxgOTeN2/d+Uybedkow4AuAtj4Ftc3a/ebKYQQfJk0z8SQmiNpUu02duwdWLgDDaGeFeAk= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:TYZPR06MB4173.apcprd06.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(110136005)(38350700002)(52116002)(966005)(38100700002)(1076003)(2616005)(6512007)(6506007)(83380400001)(186003)(107886003)(6666004)(6486002)(26005)(8936002)(2906002)(5660300002)(316002)(4326008)(86362001)(66476007)(508600001)(66556008)(66946007)(8676002)(36756003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NUr2jmoAKwngzD8NOw/Cj1hCx/Rh0i8X9g237f+slc+JUC+hNNcHCCswZlb1pKQ0mxTVVurJ3nF5Nh3+nMtqihAUtU96/oFggQEjWiwAxxTwe1H76gHbxug+SiES+ftlY+egkibjKJRY+wrqE9TlwXzWRa+3P7bloyeT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j6iKXy5YsrUCnUttos4w86IE1WoZtbq+lrEM733KqeVF6Izsqda5KSfZiLRnAPD+p/6IDr636LeZicWuqT8S2BRfBFRG75DK7EJTnqxXNShqJgVq6GbTgdmvv6dm3I1RmYgi9VYlVkzh4fL4y2euRyVgssUm11hKh5wOFsXMuJsjfOHTF/M9dscpLA6Tqx0DQhDYOhzRqZeHokRkUTmATdUZiH02EkBZi4kYvK85QuP1jqPpox66YAbYVlug++bbohOl/9dQEmbjgQCeLqLHrK29TSR/tA432aMrLvFMnFCaMXnzsLbJuF8jHpZtUo9q2whAGgU5uXsfiW6EE5jBraTkCF96Nhx/KEDR1UUlRCgHd9GbaddafRniuhw3G4X1aLoVVF5MsvxDoYgNs/aB0Vl/kyA0NmxO6bms/V9GY2vPAM9hFLU2nnc0Di9VWYBuGO+439dTFT2lULPq0CoDXn2vZ+U3oELA4/tNyWzt+aGbWEpbxJ/3P5i21C2UIyQWgQ== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b2331a2b-9160-4ac5-3625-08da1edfba9a X-MS-Exchange-CrossTenant-AuthSource: TYZPR06MB4173.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2022 12:59:08.5586 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 923e42dc-48d5-4cbe-b582-1a797a6412ed X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2F8ISDJfWJhnbECTeOiR4DnTpyWucw4ZIIhiDbRHee077T3kddZJGt+xODZsTCVdVmK/xPiJdyfovjp9r8vjqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR06MB5013 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Replace `if (!ab->is_reset)` with `else` for simplification according to the kernel coding style: "Do not unnecessarily use braces where a single statement will do." ... "This does not apply if only one branch of a conditional statement is a single statement; in the latter case use braces in both branches" Please refer to: https://www.kernel.org/doc/html/v5.17-rc8/process/coding-style.html Suggested-by: Benjamin Poirier Signed-off-by: Yihao Han --- v2:edit commit message --- drivers/net/wireless/ath/ath11k/core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c index cbac1919867f..80009482165a 100644 --- a/drivers/net/wireless/ath/ath11k/core.c +++ b/drivers/net/wireless/ath/ath11k/core.c @@ -1532,8 +1532,7 @@ static void ath11k_core_restart(struct work_struct *work) if (ab->is_reset) complete_all(&ab->reconfigure_complete); - - if (!ab->is_reset) + else ath11k_core_post_reconfigure_recovery(ab); }