From patchwork Mon Jan 22 12:46:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Matyukevich X-Patchwork-Id: 10178465 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 32FCA60224 for ; Mon, 22 Jan 2018 12:47:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31AE126224 for ; Mon, 22 Jan 2018 12:47:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 267C92823E; Mon, 22 Jan 2018 12:47:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F5C726224 for ; Mon, 22 Jan 2018 12:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751189AbeAVMrU (ORCPT ); Mon, 22 Jan 2018 07:47:20 -0500 Received: from mail-bl2nam02on0078.outbound.protection.outlook.com ([104.47.38.78]:26304 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751156AbeAVMrQ (ORCPT ); Mon, 22 Jan 2018 07:47:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quantenna.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Mft7YLc4BSVX83m5pg/61uY12RL+ku3PwF58JJbjQJc=; b=mezVLdwdHpi5f9sIvmuiBKBZxl/+WHkbXVPtAp/OeT/7A7HF3EwSlTzeWTuLzH3d8LckUM3KANZeb6RkAtDYtheE41IqfQ5s1Rb9CrHyGMFmAd71hRQYYtYIRXCxIvFtOBI0/ryJIM8h5lt4UjEI8Z+zevk+oyUiyWLMQXzpcUc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=sergey.matyukevich.os@quantenna.com; Received: from bars.quantenna.com (195.182.157.78) by CY1PR05MB1931.namprd05.prod.outlook.com (10.162.216.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.5; Mon, 22 Jan 2018 12:47:13 +0000 From: Sergey Matyukevich To: linux-wireless@vger.kernel.org Cc: Igor Mitsyanko , Avinash Patil , Sergey Matyukevich Subject: [PATCH 11/11] qtnfmac: remove redundant 'unlikely' checks Date: Mon, 22 Jan 2018 15:46:34 +0300 Message-Id: <20180122124634.8430-12-sergey.matyukevich.os@quantenna.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180122124634.8430-1-sergey.matyukevich.os@quantenna.com> References: <20180122124634.8430-1-sergey.matyukevich.os@quantenna.com> MIME-Version: 1.0 X-Originating-IP: [195.182.157.78] X-ClientProxiedBy: VI1PR08CA0220.eurprd08.prod.outlook.com (10.170.234.157) To CY1PR05MB1931.namprd05.prod.outlook.com (10.162.216.13) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ac06d007-f3e2-44d7-1637-08d5619643b7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(4534125)(4602075)(4627221)(201703031133081)(201702281549075)(2017052603307)(7153060)(7193020); SRVR:CY1PR05MB1931; X-Microsoft-Exchange-Diagnostics: 1; CY1PR05MB1931; 3:M5JDl2ChfJsBQyFEnIQwOtSqj/EUbxQj0CLsw165+L9cd+MvPa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Oxl4z7fo7pMa5ypdUhPg+GNbzve20EjbdqL+sZr8CgaNyzd5vvfBgyiBSvn30Qe7/UBWF7Q22mbSzHZ5A5cVph97NSpop4/TCwRaSQRxoJ/JNd/tATgCSlQMLSkfFLEXY4bT6v3zZTby0dXQjVS07gcYSsYAm42luZ/HZ2gPOFuFkpkJu+xouw++7JTVMb3b06uLAlEuicVbNkCtQOS5uH2zd20sDiYnQOPnJK514gU/mdLcfcrBcJsyE1428twFFFZwCNp8Kxij0RgOPQA65pFUpFsYa1yd3p0HyYtrYc03DH6VwHcEldTQHKmUg2B; 4:a7zZb+5waZoDVjSBfeIED586xHGs+KzaqRkPb2YqKsuXOPC20/EQqGAhBxV1uAFekTORF1j6jxT8VMi+KuTQGOEcn+chrLyst5JJqGd8V3D6sYrbRWPkFTon/RI0NksrHUwWUTgbikIgGtW97rWgUL9BAwGr5G0uXjkd9BgBxGjwkHlvQgmIORZsu6sEaBPsr1m60dWn+BbxiwF+86B19BSZzrQWYcQwOzJxbet28lA1XZJXe8cCvvOxmYRTpc5jfljDkwN8hwyQnJOYYuSweQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3231023)(2400081)(944501161)(10201501046)(3002001)(93006095)(93001095)(6041288)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:CY1PR05MB1931; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY1PR05MB1931; X-Forefront-PRVS: 0560A2214D X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(39840400004)(396003)(366004)(346002)(39380400002)(199004)(189003)(2351001)(25786009)(52116002)(1076002)(6116002)(26005)(59450400001)(2361001)(36756003)(4326008)(76176011)(107886003)(478600001)(8676002)(8936002)(50226002)(7736002)(81166006)(6916009)(6666003)(2950100002)(305945005)(2906002)(106356001)(105586002)(68736007)(6486002)(81156014)(53936002)(48376002)(66066001)(16526018)(47776003)(103116003)(97736004)(50466002)(5660300001)(3846002)(386003)(16586007)(316002)(51416003)(7696005)(53416004)(54906003)(69596002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR05MB1931; H:bars.quantenna.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: quantenna.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR05MB1931; 23:Uj9qw6CgZpuo/MBewhgVv4hmARCeZ/HXPEMmHcnVd?= =?us-ascii?Q?R3Gdh6pFbzHwAlXF23tH6xcmEA5GxhSlcj3oe2sM91JxxWMPnGGFapVpR2FA?= =?us-ascii?Q?yWI7kAJiaQUbYQgGGXB7zJtbcTMg5+Cwj+z7Pcdns0Us/YEdanCJFmIbgj4x?= =?us-ascii?Q?hwcwbuMTctKqmMlTANEynwZ7yqvvsckXLa0eGnEaDyw4JxLjjl1DmYe6IVTl?= =?us-ascii?Q?0oxUzz5wvbmnI+2/CwseT72KxWAzLttjlmIlveY39WUwNGzoJ11rHjFqYkq3?= =?us-ascii?Q?3jl10XcwwF7yZNXo/0hbhrz60+DHfpz4sX6L3nmhXXmDRNHAQx88aygeZb7T?= =?us-ascii?Q?sad/+d1QVyHPRtRK7W/O1gI7Go6jGRMqIh7j6f+utEy3vg2NyZ9xjzkvqH3t?= =?us-ascii?Q?GfYcA09ugfY1KcUJIu5LNv/5ZAVO+LJwfJ8unvZoZ9ssL3ADwsEM1MDQ3kf5?= =?us-ascii?Q?UdmDv/RP6T9x6vB6b/8AkY1EO0SIr4Gp5r2cD6+lhTQqApo0+Ooy9Rz8HC+Y?= =?us-ascii?Q?X3py/und1HInV4QqIWpbMh5v3zzcn+4pSmQxbHD3xf3cSHL/BldrOFmMNt8r?= =?us-ascii?Q?CDGyKKeByFwlaIK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/kRNk1f1ZYCZ6oXUouhUpsnAaiLMSCMcOK5nT/xq3QJnohGCrrglbX8QprMXZI2uWA/smAWFyUG67sxtd+38UYlisKMz+D3yKoepUKtceW1xSfpz9DKHDA8OyLSJuZ8bihznMEGR3GzTo0YlU=; 5:1AwlQ6ELO8X/PVQ2gWuEC6GuzMJOTLZiUOKY9qTBX50dTcYEM/xcLe5LAtHIjmomutHTXlxsk6m/IuSguqN1v14gshXAHYdJYRcqRhyCLoiVAyuIzjSSHx6JU2cuH2gxE1kqeBr7+BEtpBtc6nSWhm3LLHgaPuXPmNIOfu6DLOk=; 24:R7bndlNOCkU1x+AwP5Lb4S/nD37hj9XHhxiE8cRVNLNZC7JC7HG+QIIUgrDabYPvS/g2dXoL/Ikdj5cJW4UNmcSMSKfPBhszc55oAA0Oom0=; 7:17eTnypjo1O6kJBMfB1t1+KpYFiqRRGjJnrRMyC6OFdbcs2zM+jvPC5szXdO6LGmIcoOje2cWERRXSkHdwZyqzhlYJUvneOiYkQn1NQXkKNpEOVYkPmWmAkjYIKwImgy0qDXQktI+A+54jYnMU+pY3rInRVLIMvXyg0B5M+wdyQARDOTo73TE0iVhmz/RAWxXG6WEJL8JByU/IHwGGgHHqt8UtJw6Go81q1PrJmJSf3RwNoWyDbGKx7ciMIcaRnw SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: quantenna.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 12:47:13.8885 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ac06d007-f3e2-44d7-1637-08d5619643b7 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a355dbce-62b4-4789-9446-c1d5582180ff X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR05MB1931 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Sergey Matyukevich --- drivers/net/wireless/quantenna/qtnfmac/commands.c | 52 +++++++++++------------ 1 file changed, 25 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/quantenna/qtnfmac/commands.c b/drivers/net/wireless/quantenna/qtnfmac/commands.c index 2820b0318c6a..deca0060eb27 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/commands.c +++ b/drivers/net/wireless/quantenna/qtnfmac/commands.c @@ -215,7 +215,7 @@ int qtnf_cmd_send_start_ap(struct qtnf_vif *vif, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_START_AP, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; cmd = (struct qlink_cmd_start_ap *)cmd_skb->data; @@ -335,7 +335,7 @@ int qtnf_cmd_send_stop_ap(struct qtnf_vif *vif) cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_STOP_AP, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -369,7 +369,7 @@ int qtnf_cmd_send_register_mgmt(struct qtnf_vif *vif, u16 frame_type, bool reg) cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_REGISTER_MGMT, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -412,7 +412,7 @@ int qtnf_cmd_send_mgmt_frame(struct qtnf_vif *vif, u32 cookie, u16 flags, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_SEND_MGMT_FRAME, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -458,7 +458,7 @@ int qtnf_cmd_send_mgmt_set_appie(struct qtnf_vif *vif, u8 frame_type, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_MGMT_SET_APPIE, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_cmd_tlv_ie_set_add(cmd_skb, frame_type, buf, len); @@ -713,8 +713,7 @@ int qtnf_cmd_get_sta_info(struct qtnf_vif *vif, const u8 *sta_mac, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_GET_STA_INFO, sizeof(*cmd)); - - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -779,7 +778,7 @@ static int qtnf_cmd_send_add_change_intf(struct qtnf_vif *vif, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, cmd_type, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -852,7 +851,7 @@ int qtnf_cmd_send_del_intf(struct qtnf_vif *vif) cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_DEL_INTF, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -1657,7 +1656,7 @@ int qtnf_cmd_get_mac_info(struct qtnf_wmac *mac) cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD, QLINK_CMD_MAC_INFO, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(mac->bus); @@ -1695,7 +1694,7 @@ int qtnf_cmd_get_hw_info(struct qtnf_bus *bus) cmd_skb = qtnf_cmd_alloc_new_cmdskb(QLINK_MACID_RSVD, QLINK_VIFID_RSVD, QLINK_CMD_GET_HW_INFO, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(bus); @@ -1875,7 +1874,7 @@ int qtnf_cmd_send_init_fw(struct qtnf_bus *bus) cmd_skb = qtnf_cmd_alloc_new_cmdskb(QLINK_MACID_RSVD, QLINK_VIFID_RSVD, QLINK_CMD_FW_INIT, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(bus); @@ -1924,7 +1923,7 @@ int qtnf_cmd_send_add_key(struct qtnf_vif *vif, u8 key_index, bool pairwise, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_ADD_KEY, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -1977,7 +1976,7 @@ int qtnf_cmd_send_del_key(struct qtnf_vif *vif, u8 key_index, bool pairwise, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_DEL_KEY, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -2018,7 +2017,7 @@ int qtnf_cmd_send_set_default_key(struct qtnf_vif *vif, u8 key_index, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_SET_DEFAULT_KEY, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -2053,7 +2052,7 @@ int qtnf_cmd_send_set_default_mgmt_key(struct qtnf_vif *vif, u8 key_index) cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_SET_DEFAULT_MGMT_KEY, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -2108,7 +2107,7 @@ int qtnf_cmd_send_change_sta(struct qtnf_vif *vif, const u8 *mac, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_CHANGE_STA, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -2160,7 +2159,7 @@ int qtnf_cmd_send_del_sta(struct qtnf_vif *vif, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_DEL_STA, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -2230,7 +2229,7 @@ int qtnf_cmd_send_scan(struct qtnf_wmac *mac) cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, QLINK_VIFID_RSVD, QLINK_CMD_SCAN, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(mac->bus); @@ -2300,7 +2299,7 @@ int qtnf_cmd_send_connect(struct qtnf_vif *vif, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_CONNECT, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; cmd = (struct qlink_cmd_connect *)cmd_skb->data; @@ -2402,7 +2401,7 @@ int qtnf_cmd_send_disconnect(struct qtnf_vif *vif, u16 reason_code) cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_DISCONNECT, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(vif->mac->bus); @@ -2436,7 +2435,7 @@ int qtnf_cmd_send_updown_intf(struct qtnf_vif *vif, bool up) cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_UPDOWN_INTF, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; cmd = (struct qlink_cmd_updown *)cmd_skb->data; @@ -2597,8 +2596,7 @@ int qtnf_cmd_send_chan_switch(struct qtnf_vif *vif, cmd_skb = qtnf_cmd_alloc_new_cmdskb(mac->macid, vif->vifid, QLINK_CMD_CHAN_SWITCH, sizeof(*cmd)); - - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(mac->bus); @@ -2650,7 +2648,7 @@ int qtnf_cmd_get_channel(struct qtnf_vif *vif, struct cfg80211_chan_def *chdef) cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_CHAN_GET, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; qtnf_bus_lock(bus); @@ -2689,7 +2687,7 @@ int qtnf_cmd_start_cac(const struct qtnf_vif *vif, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_START_CAC, sizeof(*cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; cmd = (struct qlink_cmd_start_cac *)cmd_skb->data; @@ -2727,7 +2725,7 @@ int qtnf_cmd_set_mac_acl(const struct qtnf_vif *vif, cmd_skb = qtnf_cmd_alloc_new_cmdskb(vif->mac->macid, vif->vifid, QLINK_CMD_SET_MAC_ACL, sizeof(struct qlink_cmd)); - if (unlikely(!cmd_skb)) + if (!cmd_skb) return -ENOMEM; tlv = skb_put(cmd_skb, sizeof(*tlv) + acl_size);