Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6255193yba; Wed, 1 May 2019 08:48:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqzbqDN0FWBQ3ikFigrV0inro4hwB91uBjU/rdpwXqbe6kRIZ2TKEGpPqQRaptUvuqnZJXbf X-Received: by 2002:a17:902:4383:: with SMTP id j3mr7060779pld.320.1556725684771; Wed, 01 May 2019 08:48:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556725684; cv=none; d=google.com; s=arc-20160816; b=BmHk6ow0CWCaNNo8ukd5ixb9yOWFmFf73C7XwiHal6XnikgIlZwwxJmTKIF+lb6h/x UBbLsjBmtwDA0KlVsORHNtSdNp2YE9Sdlta5DCMLMd/B4qEfHyrzETCqSw0ZsMI1YSXC sn73ZLEplVNzPV2NTHLW58QfcTJBI7Ao8+T1IAfeofQtscRhSJc03YaWVWfIPon6B8Xt hrgoKpYmvR8ZabIjcvonx30BWOpoVMHJ5nsase69RMHImGWB48vWi02E1XQ+I3//NAtF /vOnz7VK5gnROknGnS4nqtDwVP0CSdQkzuZ1NUuZoUQeujHd2r4ozaR+Aa+shLDY+CHX 5YSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=Qd9vLN/uYtTHcvh53VYCk0sgdAPldYjSpxhnGE2v42I=; b=TBH5WXZv/BaeMieNGjkg9jzijTM9MQ4As3Vqa+FFKq1QXxCFSrYnJ4yWPXem3sIp/U naSq2Joawi3OdCX6WTOBSx5koXozrkgHaZKF7x5ufQN2Uk6vZmlUYN+LLKd18VdopvkY fLwluKRyGjwl4n1NtidX2X6FNhx/kPcy9uPWUkaSjF2GI6b03fMIVdX61RMc9kicRg5r 8XPNgPx5PkwAquNilAEuV9P5VzWA8z34+0wxlt09KIJbnHsnpElA5zJRZt58sVDTXj90 +klKq4q8qAFDcQNhpfUwuULw9opJUOJnqKfv7ZvbTcs5Qd2QM7BbXgZPXK0em9MlCG5H KYtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dohGZE1R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 62si9429311pld.143.2019.05.01.08.47.48; Wed, 01 May 2019 08:48:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=dohGZE1R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726887AbfEAPED (ORCPT + 99 others); Wed, 1 May 2019 11:04:03 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:46332 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726646AbfEAPED (ORCPT ); Wed, 1 May 2019 11:04:03 -0400 Received: by mail-pf1-f196.google.com with SMTP id j11so8704431pff.13 for ; Wed, 01 May 2019 08:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Qd9vLN/uYtTHcvh53VYCk0sgdAPldYjSpxhnGE2v42I=; b=dohGZE1RAbaK2rNhOHij+TMgBLZsEgEHypTa1qct72G1R3/oU3+SWHfVMgYUjYuyTD RejCOVx1MRvdWw8GhOjnTWQ9b2KHL9voUau8p+9MEHXdfUVPYF5tWQl30SJnG3xOOcxN U5PXJZNELn2WM1GLK7QskyT4ncP6B4CPsy1tDwMDVkFtqiGp+DzqqWGp+MNKwP+45w2z jnIOK7BnR7PZDrbWIYIvsR/8zwwh15Q0dXQADiw5FkLJit1e2BTf6SEXQnpvywN6709+ eu3v7HrfQhDzJj7hDWO0U5XI5HjQokXKRt28HgtPST+CdAClB+8ysuYNsjqPHm233nN+ fL0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Qd9vLN/uYtTHcvh53VYCk0sgdAPldYjSpxhnGE2v42I=; b=WBGmnGN+41+d2GYHzM0hos+qXWaP9GV4G1S9xYlBywIl+TJFILEEPuOOGoBpLlE9Sp JEn9WK64pkjBASUG7GduIeWNJobZg6xML/KvMGYhqeW7WycMm5V8JmJ7/9Iu5+Ryw9sr Z7g4zMmFAPAEnWOAJ7bf4l+nX2t4WYOtfge/zracqTeTdsHo6yMzImmj6otlLAmSne9S rU21x7yKuzk8PxRWrj6Umu2hIsKaX13QWoTaL4Wpk/cZ8HyLpb6rw1kXOIc8htZjm5Um VjJknEdYJpiBrHCkgYaPn3bMHAG1T+Gf2GOry3XEb/1ccmtc9T9ihHTbgXFP9ztu/qXu Cxfw== X-Gm-Message-State: APjAAAVvvPM4EfJ78lGz2x4LwLzB9i3s4wsQDxQJKmG7Z4mDXnTsSvun MZX0h1oRJEHdL1CNEiUQims= X-Received: by 2002:a63:8449:: with SMTP id k70mr24144861pgd.53.1556723042639; Wed, 01 May 2019 08:04:02 -0700 (PDT) Received: from localhost.localdomain ([103.87.57.94]) by smtp.gmail.com with ESMTPSA id m9sm6996701pfh.99.2019.05.01.08.03.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 May 2019 08:04:01 -0700 (PDT) From: Vatsala Narang To: gregkh@linuxfoundation.org Cc: hadess@hadess.net, hdegoede@redhat.com, Larry.Finger@lwfinger.net, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, julia.lawall@lip6.fr, Vatsala Narang Subject: [PATCH] staging: rtl8723bs: core: Prefer using the BIT Macro. Date: Wed, 1 May 2019 20:33:44 +0530 Message-Id: <20190501150344.14443-1-vatsalanarang@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace bit shifting on 1 with the BIT(x) macro. Issue found using coccinelle. Signed-off-by: Vatsala Narang --- drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c index d4842ba64951..d110d4514771 100644 --- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c @@ -1981,7 +1981,7 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra if (status == 0) { /* successful */ DBG_871X("agg_enable for TID =%d\n", tid); - psta->htpriv.agg_enable_bitmap |= 1 << tid; + psta->htpriv.agg_enable_bitmap |= BIT(tid); psta->htpriv.candidate_tid_bitmap &= ~BIT(tid); } else { psta->htpriv.agg_enable_bitmap &= ~BIT(tid); @@ -1999,8 +1999,10 @@ unsigned int OnAction_back(struct adapter *padapter, union recv_frame *precv_fra case RTW_WLAN_ACTION_DELBA: /* DELBA */ if ((frame_body[3] & BIT(3)) == 0) { - psta->htpriv.agg_enable_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf)); - psta->htpriv.candidate_tid_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf)); + psta->htpriv.agg_enable_bitmap &= + ~BIT((frame_body[3] >> 4) & 0xf); + psta->htpriv.candidate_tid_bitmap &= + ~BIT((frame_body[3] >> 4) & 0xf); /* reason_code = frame_body[4] | (frame_body[5] << 8); */ reason_code = RTW_GET_LE16(&frame_body[4]); -- 2.17.1