Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4571399ybb; Tue, 14 Apr 2020 09:50:58 -0700 (PDT) X-Google-Smtp-Source: APiQypK46pL6SQlMsfpoEwvmAF1PGX4UN74wek8mrk+DqrikqZa03G88r431FxDdtt9ajZmKRe0A X-Received: by 2002:a17:906:1e15:: with SMTP id g21mr1017273ejj.321.1586883057930; Tue, 14 Apr 2020 09:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586883057; cv=none; d=google.com; s=arc-20160816; b=S1EWC50fzDS3B9DdnxgFOPBVzi5E0G379VjluQyWadAZIuVPAuo0zKVdxqaWedGvk+ QsaEWbtu2or/7wdZ+gjxJnqWIBQRqVjlOPpMVVqarDydRB3zZ6zSsTOuhmntpCxGxs4e o91WtpuASteRmQOWpsomd4OqvX7ODsL4K7aRDcIavoyo+IOzSEe9ZYlJRYsJMqXZFEIF wOSMY4Z0mJb7wlt26Cr45c7kWGj9dcKR4UfeUfWerU78EKiKh7vvtf60I39YRz9ZUbei +y4U9I2Z1057buIf4ZEYG1SN7s14BogVXhm1WvdrV8bS5eS/8HILixRJbh+EczyCX1zV 1Ktg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4kv09QMUpZW+bthau/7z/ven382JvxvqfEcj1fpk5eI=; b=TT9zUuyXJjHJfItp9FMHYTZTDNBsG4s+GNZpOS9xBtcZA30TeaWDVWmbc+rcq9jBFx vUU1fGpWlM1rGqOPYW63E9jCcXPOYvslBevhnqNBaL9RM28H8T5HGk+nJHO61KDGGfgY hl5IXmuzeFeUXP2XCRgeW4JoEHTal1Vh2hvKjnF9lXdQVcwjXP23hOJJxtFz3z/BGs6T dROMvo8T0nQ8tE25hNOgvFZzfaErZ9SlPja6yRhbRZIdj2SPlFHqov+WYWlUJiy4MNJL ex67gZC2t5bLc7r5HrwNyKZdG1+bNf3zwoHMqiSmxI5doUyMWV6RHc/pXyLffzWzmBNW UqVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=IBNBwJTT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f2si7992570ejf.402.2020.04.14.09.50.34; Tue, 14 Apr 2020 09:50:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=IBNBwJTT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2440722AbgDNPlM (ORCPT + 99 others); Tue, 14 Apr 2020 11:41:12 -0400 Received: from mout.gmx.net ([212.227.15.19]:49841 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440634AbgDNPjs (ORCPT ); Tue, 14 Apr 2020 11:39:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1586878778; bh=AHa4Q10JDOKLRlghJ1WsjdEYi8ByvokcX/zRyKSVffo=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=IBNBwJTTBWNL201sLWo3pGdf1eKSZNtcaxcrh5wBIbXzndA0s7FG5Z3gOI+L8M+D3 WKaScYlrXrtEFL/ddnSLPAn3YQ5TBpI/6WHQRO3rAIeP64xGU/V5SwHQ/mHXTh0rNQ yvEF0ovZAiunjEDdaV8qL75lnBJVY2s3Ld1LYxgk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MYeQr-1jkbUn1e7f-00Vdx9; Tue, 14 Apr 2020 17:39:38 +0200 From: Oscar Carter To: Forest Bond , Greg Kroah-Hartman Cc: Oscar Carter , Quentin Deslandes , Malcolm Priestley , Dan Carpenter , Amir Mahdi Ghorbanian , "John B. Wyatt IV" , Colin Ian King , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/5] staging: vt6656: Use BIT() macro instead of bit shift operator Date: Tue, 14 Apr 2020 17:38:46 +0200 Message-Id: <20200414153849.5785-3-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414153849.5785-1-oscar.carter@gmx.com> References: <20200414153849.5785-1-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:hj50RiMhC57fIwjkP88TjST87uGtiICioi+9D6iF1LKxncuYvNo +5rBEPSYcPDQEVc6Nmhl7pOS+FPUkXtAncKXwtHqIECNZTnR5K7jUArK9pgr3B+sgt0O2j5 AJ+ScEmwvAXvjsjS4n351mrX7/zxjXYA/06OYizTxGTiBkG3nj9YoYxhFJop+8vYAbyXzB1 O3Z31u/K5VGTDr9w3vCdw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:OiIqfM/tpjg=:V1bSJlgAU3YcgWH/0IcNLb KMBrmJ5g8V2//ToAqQeLSt/oi71/cjteCcIYRyousXnjgwo9kYI7iKgCpGDtV/PU/xyE5s3LN Ftv3u3HB6btuQ/vJZcVwoXDP6dF4nbPBxeSmRuyPuCiKlvshoTYNillcBbObhgLWMfcru5pow ieh0n2wrsi4hA1EcG7nghZOiV2OzILdsMI/KHLaBte8+BwdXUI4KoGfLM6CmC1PS7jdHvcrgW //NJhyORuTfF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bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use the BIT() macro instead of the bit left shift operator. So the code is more clear. It's safe to remove the casting to u16 type because the value obtained never exceeds 16 bits. So the casting is unnecessary. Signed-off-by: Oscar Carter =2D-- drivers/staging/vt6656/card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6656/card.c b/drivers/staging/vt6656/card.c index 9bd37e57c727..f8bfadd4b506 100644 =2D-- a/drivers/staging/vt6656/card.c +++ b/drivers/staging/vt6656/card.c @@ -228,7 +228,7 @@ void vnt_update_top_rates(struct vnt_private *priv) /*Determines the highest basic rate.*/ for (i =3D RATE_54M; i >=3D RATE_6M; i--) { - if (priv->basic_rates & (u16)(1 << i)) { + if (priv->basic_rates & BIT(i)) { top_ofdm =3D i; break; } @@ -237,7 +237,7 @@ void vnt_update_top_rates(struct vnt_private *priv) priv->top_ofdm_basic_rate =3D top_ofdm; for (i =3D RATE_11M;; i--) { - if (priv->basic_rates & (u16)(1 << i)) { + if (priv->basic_rates & BIT(i)) { top_cck =3D i; break; } =2D- 2.20.1