Message ID | 20220424094522.105262-1-wanjiabing@vivo.com |
---|---|
State | New |
Headers | show
Return-Path: <linux-wireless-owner@kernel.org> 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 2F222C433EF for <linux-wireless@archiver.kernel.org>; Sun, 24 Apr 2022 09:45:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238869AbiDXJsu (ORCPT <rfc822;linux-wireless@archiver.kernel.org>); Sun, 24 Apr 2022 05:48:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238908AbiDXJsh (ORCPT <rfc822;linux-wireless@vger.kernel.org>); Sun, 24 Apr 2022 05:48:37 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2111.outbound.protection.outlook.com [40.107.215.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8DEA29CB8; Sun, 24 Apr 2022 02:45:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QNjK66Bx86oRW0co4mgU1MlT6rR6kwHr7so8VTVOao5PRD5FmzaOL74xgtVIArWg2mrC2kXJv55xL4JDGQuviH2//DaHJXupzCgUmYhlYo50rFHHILrsMKMIR6Vl6hugcDTq/oAbIkUbAVX97WoKO7Rwrt987/2EmdU2ADBoYyeskA4jT1KioTtCOz7/B0YuiQ3KwWQ5HRD44xF+NEDtKSGcyAaCxtADcldxt7ndttWKd/H8RDFzQEdJiKNdpMZKKhLeHEZvRX5jff4TJQ47q/JgFmRmmHEA1K2V2KnahYRh4wcqAkAaZdA3N5zUr7j06pvOYWV55n5/MfczPHXXCg== 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=a6yYKYNA50mE/CGfCJHRuKu89Rm4W72b7Gcm5pJ/+6Q=; b=nn5fd1FwekXDaOrTf42XEWEuQYMq40YJrFRoRDiSIkkRSHsCYU2haVZjyhZ2aChHiQPRObUXJS5RGBk4TWXA7wqVY1daMlqn0nA+ip7PMSezkEHZG0frg/p7dwNkCLcDPYDK2Jv7t9S4AwfIMz6qd8q3jG5rWun2Tj4YUey/PyuL3E+E9EI6pU8kU7gvY8ddo7rh8ugsrlIyI62LiOk6dk2DODWkaiZhv40qx3NSYw5ZsL3sEO62433M5HmnqtRlrwST+peKlRsrHPqKVMS65d5uXXg83TR9JIt5DcYFV05svMBl7YolH9QjCWObXvMm0f6I6RdegfOKkF4Jtxc2Aw== 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=a6yYKYNA50mE/CGfCJHRuKu89Rm4W72b7Gcm5pJ/+6Q=; b=PANsXplRep12IDNp9uZOLgaPUtPxX73CMYzutwkmC99I42eWuvTd0Rmav29czP5rcoJkJwBIO9G6PDDqDUY7j6lgOYkg+KI6iugcJOw1K8Z5yBACfVMVB1xtqKC2c9lKBg9YvIHDHnIcIpmaSbntZULnJcaDuEDHEhcBbBnDzSA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=vivo.com; Received: from SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) by TY2PR06MB2925.apcprd06.prod.outlook.com (2603:1096:404:53::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.15; Sun, 24 Apr 2022 09:45:34 +0000 Received: from SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c]) by SG2PR06MB3367.apcprd06.prod.outlook.com ([fe80::4591:4f3e:f951:6c8c%7]) with mapi id 15.20.5186.019; Sun, 24 Apr 2022 09:45:34 +0000 From: Wan Jiabing <wanjiabing@vivo.com> To: Kalle Valo <kvalo@kernel.org>, "David S. Miller" <davem@davemloft.net>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net, Wan Jiabing <wanjiabing@vivo.com> Subject: [PATCH] ath10k: simplify if-if to if-else Date: Sun, 24 Apr 2022 17:45:22 +0800 Message-Id: <20220424094522.105262-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.35.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: HK2PR03CA0063.apcprd03.prod.outlook.com (2603:1096:202:17::33) To SG2PR06MB3367.apcprd06.prod.outlook.com (2603:1096:4:78::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4292273-a2fc-4cd3-b8f5-08da25d72d98 X-MS-TrafficTypeDiagnostic: TY2PR06MB2925:EE_ X-Microsoft-Antispam-PRVS: <TY2PR06MB2925250A80A09011EA7BE011ABF99@TY2PR06MB2925.apcprd06.prod.outlook.com> X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: InhzxSgYS7+xda3m3CRq7qfQhSk3bRZU/Y6R+toLE/4gIxSJycJrPzm/eVC5TWPW9ojrfN24z3Uf4hWxTtUwiivBFnYkp8fN+DUSiq67AwdUgbOscLJAkAptRbodmDh/bGcEVYvnLefFRISf+DwNJzJbRfHgCn3rxdLjX2CPKUs3Mi5ZkA6kW7S/85nAJEoZ9+piz940QmluJ8wwh1xvpdXkCy4x1RTTQTd+MzdAuMmJNiUVWMjd1F+LS9fVKgPebn4+e2e48Jt5aup1p/1DAULwtCzoprrlOARvWezvdheZRWXp+xODrGzmcS8grh75qDo9Amia6UkzB0rArAreoizXbHuHIBXdVyfPgndnPDQbbww/enB2jlPQDyrk76m2r6OLVaPYQ9jbDioOwJ8ELbcZkn13vJtzeUKbRvV7t9NBdowasfZPdB2EfMQ40Uqeg8tjIFo+QztTMUNPGZ2RkD36fAVKvc6Mv3vNtFxY358HOLRttgMBx91HbVPATLXus2fOA+q0lNUV9Y9b5qhu/YZwfG+WcKeuJ+J1oXT/L3+vvYAlhc6N1GsP13MuoOtXi5LfK0rnpnYLclC5e8mzxHjai8AE8VmTpsxFWQCOdHBW9kZsgv3DOfUuzXKPYKJO3V52VXkp4g7jv1v+YT8b6/2efSj6pyJJsqqOBYHC/VNi82DAwri+MsgMVdqmE1CtiVCpgbpWeLq0uLrOrD3lhw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SG2PR06MB3367.apcprd06.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(8676002)(66946007)(508600001)(66476007)(6486002)(4744005)(4326008)(83380400001)(66556008)(8936002)(5660300002)(107886003)(2906002)(2616005)(38100700002)(1076003)(38350700002)(36756003)(52116002)(6666004)(6512007)(26005)(6506007)(110136005)(86362001)(316002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xAY+T5WNEGHew43cwT67OUG6S+uwrdGrgtSWLZXbupbTM8FjUKo7uSjzNxWejova++dfbQnhPK1kQyInpFSuY7o4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9NPLtHZLH1XBsbOfWTWbp9QNAL9IbUVEW+6+x0BrzGVItC6yay80qz4qIBqw4g5Ca5UWbbxlSAHrgHyeN6Oea2UlbZlfhKS2WIwdsdjIqnegPp/E8fkwvonwKce+FRafT0zGq/wWky+HHjt6/i4uJFNRQHjUujQ/mkD1Rmd5ME/ZpTDTvjohWmS1Y7ohG7LFOdXtPape0UtRIQ+3KUrjt95aC00I1HsD+hzUCKVcTDwyrlMxwdm3h+lX2AV0+ShEyRJWKDUvZ3IKw80x0YQx/vZ+nRluGO/zHsDwWCGY7WMsll/Q8BkPn0RRyGPZwEI2LX87+zO6jfjWUS/eO/U/ZZyLnXhxOcSrC2IiKMk0v+DHAobo/xSCekte9QyY511lFth0JLA/hlJSoLuuPaLtC4lqQDQ80+0aQFU+Wyb41fkNGpCTM6tiPX1z+wMT8Nk3JIRvE3KcBQ/S7AVvUghpZWvDfXPEqInmah10NfYWWX8VepN8EhCJdLfhCIUnbsCGZEqgNAEoNra3sI4wX0oEF3uJH6uk8aw7YD8290KdCC/aB10sO1tWgPzmRA6vcaMw== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4292273-a2fc-4cd3-b8f5-08da25d72d98 X-MS-Exchange-CrossTenant-AuthSource: SG2PR06MB3367.apcprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2022 09:45:34.1557 (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: qt0FVFiysD68plnCZ2Oe1jOKOGy+r/VQU9Ruy/q+Hfq6MdO3dJg3RMTUr9YQfEDyTuh1HzYuGznLjYtImeKQig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2925 Precedence: bulk List-ID: <linux-wireless.vger.kernel.org> X-Mailing-List: linux-wireless@vger.kernel.org |
Series |
ath10k: simplify if-if to if-else
|
expand
|
Wan Jiabing <wanjiabing@vivo.com> wrote: > Use if and else instead of if(A) and if (!A). > > Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> > Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com> Patch applied to ath-next branch of ath.git, thanks. 7471f7d273ac ath10k: simplify if-if to if-else
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index d804e19a742a..c460f6f8d4bb 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -4119,11 +4119,10 @@ void ath10k_offchan_tx_work(struct work_struct *work) peer = ath10k_peer_find(ar, vdev_id, peer_addr); spin_unlock_bh(&ar->data_lock); - if (peer) + if (peer) { ath10k_warn(ar, "peer %pM on vdev %d already present\n", peer_addr, vdev_id); - - if (!peer) { + } else { ret = ath10k_peer_create(ar, NULL, NULL, vdev_id, peer_addr, WMI_PEER_TYPE_DEFAULT);
Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing <wanjiabing@vivo.com> --- drivers/net/wireless/ath/ath10k/mac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)