From patchwork Sun Apr 24 09:44:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jiabing Wan X-Patchwork-Id: 12824836 X-Patchwork-Delegate: kvalo@adurom.com 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 C312CC433F5 for ; Sun, 24 Apr 2022 09:45:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238898AbiDXJsF (ORCPT ); Sun, 24 Apr 2022 05:48:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237408AbiDXJsD (ORCPT ); Sun, 24 Apr 2022 05:48:03 -0400 Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on2125.outbound.protection.outlook.com [40.107.215.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A4E05594; Sun, 24 Apr 2022 02:45:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZYxSOLVsydOftH6y58TwNX6qB6UVFbmWW4fds7FAl0+9hSBQyECvxGLYAzwMI1snhBahwDkwkhaUJW3V8s/BVxh3DfvwSmsBuf6aUV9+3EFjmY54q/h0/KPW5GU616dHDnKQx+MHGsEltrSI2lYdHMBO/D/ct7gPZG/m5luSMLrOvNjpTSraRkDJvX8dKrxbGUTWxirUQBfazjDIFvS16aW0f9cD1MSs2KTkOeThttNtr6nE5RqWt/PHipgcBeWG/MEqp85EfHZpf51qdBEU+cyjaTriy4GW48mgKxETA28zLENdl1uRXzBTyW71u3s4wd+/LsxyS4QDmw86pa9n0Q== 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=A4ScGMX45XpTVE5L0HnhJ/NoDECuVp1PTIlYZUYcapM=; b=QVYfLWh7bn0hvwN1CSTj49NzPOo63Q3TWgaY3zwVCam5wsKH3OHidygHPOQvpf46zb66TlfuyqTZgssbdsl5nXIX+JL2x+4z8StFt8Ypwf7nNBfvXQk0NUDP54/jVcUUoYVnTOnm34v20gctSm1Qle7wkl631AnPYmpWM0+uKVww0u5TGzUnHRs40KJT7pNmlCxBusI1aIqx0oKiWCW9f4J3tPlDil9D/Fte9RQD8QqaH1cavaumeiD+8y96kHtM6ZGKTKDzdSFMmjGQdjCzDCQMPiPsKPzvli5QYY2dC5INKETwqIa2d7gv3Pk+akNQuGvz17UOvoaLTeQ7U8CMTw== 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=A4ScGMX45XpTVE5L0HnhJ/NoDECuVp1PTIlYZUYcapM=; b=WxApmgxE7tymFlQyt19HKo7PZBbgEsDIZ7qBxLha1kroPhaAnzqTJuU8EFFPui65UF3qY7xCLAoagm51aK6CeuSLweVv9brTUxlTdHOh5huysXVXkXKEZL0Iub//zc1ljx1jbcjzCwaTZWfiAh1zIO6dvouZpIrJkaeZ+beuoJs= 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:44:58 +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:44:58 +0000 From: Wan Jiabing To: =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rgensen?= , Kalle Valo , "David S. Miller" , Jakub Kicinski , Paolo Abeni , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net, Wan Jiabing Subject: [PATCH] ath9k: hif_usb: simplify if-if to if-else Date: Sun, 24 Apr 2022 17:44:41 +0800 Message-Id: <20220424094441.104937-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.35.1 X-ClientProxiedBy: HK2PR04CA0066.apcprd04.prod.outlook.com (2603:1096:202:14::34) 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: b4b7ea6b-a705-4508-14b2-08da25d7173f X-MS-TrafficTypeDiagnostic: TY2PR06MB2925: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: Q9BwGVeDYmrduOqMBK2xNQ9T8xYZ7AxA/2AXRUrX7iSkXXzv5ZnI7XnpJeY9PBbwNL0StzjKSCRbhpZxPuIcxRuk6G4Y+MKQtk/s+5AdVzs1gCxiKX4P8mE/QW8tzjlGSJ3WNJLKAj3wbLyfnsHKbJUzw7+Z/Lrri9Tydy8wTpJafTWLvLDCJjWxKjlkTwSc1ohbrIBH9AapCbxV8CYgonmbdxIz/Fm13/cLIspx5DfNUilRLS5Qza9bg4dea9ROUB9B2Si4oJ8Jp7PxAXIcfT0zxaBfsDfQVYIM273Hqua4NV+F2OOgKHCg8hVMtyE3A7mk5w+ofLGH8PSQ0CY5fueSPpwMjPtdgCBTnpcVrgmWb65xs8Tq/jKhK1oMzpVmhiL/6ssFe78FpXNx2+2gogjBqp5xseHQ5FnOBs3RgTi3w73EWf1d0Susm74s6sKoqiQvjRdE93LgsxtNpdPtZFJEUGk0mgRgIQxxHSVQIsUHhPIH8V0SVgWiFWTdm6J9tCLonMwfOke239P7Zs7RLdPx9sCzIPXAFd8JUdLkTuACqre++Zz2sBgzbGYaY88xLFN9WL27+sYzRjCX6Ai2qoGu4bQzFK7lfuj7C/NcccTqyXCDJX8NANsbSrXalaEW+kDD+5sVR9Z3H+UhBhngXprV+E+YRje1whQlxRZbozpm+zkvM9Gdp3aeA+LtoMIhTNcd7Ft+iTnsi91hKF6ACg== 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: 5bZLotuxyeWaYhk+KRvFSMbUbg/Y9AU0rL7ih5Ba76MKq11AA8ATmo1IbCkCzA5d3YbAlLZdjKtcobj8KOdlxSQ7R1hk5PBbPRpF9ACTEBaFKTaADAPhQttUw8Vn5+ehq6Ya/CYLtx4kI6z3CzTJ2IGwd5Mf47cFFn41orZ40O7bWxGS0mB0q1L5cKAQefLotrM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0m8nNLTj+wCmIUXPZvIUtoGzwLlyvvcS/Xp3RpOeQi0Ui8wxzqdsC1GPm81+MvN7X+0QvLLSAa0G1FWXPins5B4G2hPbVkBuDUkDyvoj2QZIOJKrEC2OBNVpXtn07SmkWmPx4BYBOtFCsGdYG3vmOcol+PFJugZZ4p48iYCigrt5aP+UAdUPzOD451/DBluhbab2YIg/6BKBM7ZwbM7nC3kRcc4oVbEo1sTrF1VmDyfWUG9r7LqTyzqRFiO7PX/ieaM1vvbQqV8ck203SY2Z97KHCG7gO3evnjjT/9hj5b+Yb1Zp9nvpGaF2MY9VReWG71+LkqI27HWf69oNwFd1p8VviHdntYbIpdDJ6+Xp4/6BtxDY5h1nbZaMt5wplz1sxMhPDgSJ9KBw7a2ULBe7BLAB04vysRjl/KhK+svKNNTDlbKaEfFrpRCUik5CV1BzSuWdoMQLlkifR1xFImMXkBm3hKViMU8DWn3Qtz4T0V4P2w== X-OriginatorOrg: vivo.com X-MS-Exchange-CrossTenant-Network-Message-Id: b4b7ea6b-a705-4508-14b2-08da25d7173f 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:44:57.9864 (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: DOwaZ6Cs1q4AOqqt26JiFMA+r28DCdCfMR3ZrpmwPbU+/efoLkRUkmFLF1gUYklt/0qJofyTr6XXKSkcsmXQkQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY2PR06MB2925 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Use if and else instead of if(A) and if (!A). Signed-off-by: Wan Jiabing Acked-by: Toke Høiland-Jørgensen --- drivers/net/wireless/ath/ath9k/hif_usb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index f06eec99de68..518deb5098a2 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c @@ -368,10 +368,9 @@ static int __hif_usb_tx(struct hif_device_usb *hif_dev) __skb_queue_head_init(&tx_buf->skb_queue); list_move_tail(&tx_buf->list, &hif_dev->tx.tx_buf); hif_dev->tx.tx_buf_cnt++; - } - - if (!ret) + } else { TX_STAT_INC(buf_queued); + } return ret; }