Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758035AbdCVEWe (ORCPT ); Wed, 22 Mar 2017 00:22:34 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36457 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750721AbdCVEWW (ORCPT ); Wed, 22 Mar 2017 00:22:22 -0400 Date: Wed, 22 Mar 2017 09:50:28 +0530 From: Arushi Singhal To: oleg.drokin@intel.com Cc: Andreas Dilger , James Simmons , Greg Kroah-Hartman , lustre-devel@lists.lustre.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] staging: media: Replace a bit shift by a use of BIT. Message-ID: <20170322042028.GA22848@arushi-HP-Pavilion-Notebook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1269 Lines: 38 This patch replaces bit shifting on 1 with the BIT(x) macro. This was done with coccinelle: @@ constant c; @@ -1 << c +BIT(c) Signed-off-by: Arushi Singhal --- drivers/staging/octeon/ethernet-tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/octeon/ethernet-tx.c b/drivers/staging/octeon/ethernet-tx.c index ff4119e8de42..f00186ac4e27 100644 --- a/drivers/staging/octeon/ethernet-tx.c +++ b/drivers/staging/octeon/ethernet-tx.c @@ -381,7 +381,7 @@ int cvm_oct_xmit(struct sk_buff *skb, struct net_device *dev) (ip_hdr(skb)->version == 4) && (ip_hdr(skb)->ihl == 5) && ((ip_hdr(skb)->frag_off == 0) || - (ip_hdr(skb)->frag_off == htons(1 << 14))) && + (ip_hdr(skb)->frag_off == htons(BIT(14)))) && ((ip_hdr(skb)->protocol == IPPROTO_TCP) || (ip_hdr(skb)->protocol == IPPROTO_UDP))) { /* Use hardware checksum calc */ @@ -613,7 +613,7 @@ int cvm_oct_xmit_pow(struct sk_buff *skb, struct net_device *dev) #endif work->word2.s.is_frag = !((ip_hdr(skb)->frag_off == 0) || (ip_hdr(skb)->frag_off == - 1 << 14)); + BIT(14))); #if 0 /* Assume Linux is sending a good packet */ work->word2.s.IP_exc = 0; -- 2.11.0