From patchwork Wed Mar 22 02:41:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arushi X-Patchwork-Id: 9638025 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 866CE602D6 for ; Wed, 22 Mar 2017 02:42:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7617825EA6 for ; Wed, 22 Mar 2017 02:42:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 68DDD26E91; Wed, 22 Mar 2017 02:42:00 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 14D4025EA6 for ; Wed, 22 Mar 2017 02:42:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758239AbdCVCl7 (ORCPT ); Tue, 21 Mar 2017 22:41:59 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34687 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758266AbdCVCl7 (ORCPT ); Tue, 21 Mar 2017 22:41:59 -0400 Received: by mail-pg0-f65.google.com with SMTP id w20so3146217pgc.1; Tue, 21 Mar 2017 19:41:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=92QrF/IePiwaZ/3EQS4jCt6WierhfPs1wjzjG8JihfU=; b=rEbOZ3+loO0GUD0yYBHy1G7crsUVMc2aOmUkTZhsg/+S98OdNmqJ2Myz8z1cQ065U4 qHXZBsNhnbBouMZDQA7W3877RNmE3rFgqegXCmE5gOu0fZm+/ih5AOsY0MK5aP/TZ6gF 48QuDUebcIMsqKgJ6W3ryxarA5eQr9N8DqltMOkxUIEWHjcSpZj9pft1d98SWK8pgOiq LIlxAAgSsWgi/fQYEJsnr+yZ7OhBdq+En7d7LhkaRqPAt3grfsbqXkomhY7s0pY2OmkM Z+ZqfNYRrJGAV+fpeX1Enop0kNmkegWaQUcT9I6gkOG9ePLf7MI1X8QlS/T7egvqr05w FPbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=92QrF/IePiwaZ/3EQS4jCt6WierhfPs1wjzjG8JihfU=; b=hiUGicSd1rmd47hwxPmz1VPxUrZnjIf45liBtTjnkq54wt8ILqMqbih4923aUud1Fe +328OZrcQ2SrL6NDzO03irc+M/fytBdmKyLrv2ybSZSySuiBVAMealWd7iu7tLReBLeK LdCCm6oDv3U1PJX2eJlqmHANOeLeHlDaizj4b3m51ncx0hAMPazI70xtqFJr7sFOPozU CXp0bIZ+eco9NMq9L8T0e4fH9+lloLk+pCZuxaU5aNxHWK1llCLlJxlOpU9SufeqAD1S GgpgdHqb2NuU/Xyuprua3MQOApzqSyFYAGjPax7RHzjWiT/UhQ26ioURq6Vdy1RWJC6v W80w== X-Gm-Message-State: AFeK/H1W0NLDGhN+M6vGanHhbdx/xSQsuIkMBaYE7+n/kRb8OQeqQ8RiZbcNFxkndImMbQ== X-Received: by 10.98.99.196 with SMTP id x187mr42828674pfb.168.1490150516949; Tue, 21 Mar 2017 19:41:56 -0700 (PDT) Received: from arushi-HP-Pavilion-Notebook ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id q64sm19077pfi.69.2017.03.21.19.41.55 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 21 Mar 2017 19:41:55 -0700 (PDT) Date: Wed, 22 Mar 2017 08:11:52 +0530 From: Arushi Singhal To: sudipm.mukherjee@gmail.com Cc: Teddy Wang , Greg Kroah-Hartman , linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] staging: sm750fb: Replace a bit shift by a use of BIT. Message-ID: <20170322024152.GA12064@arushi-HP-Pavilion-Notebook> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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/sm750fb/ddk750_chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/ddk750_chip.c b/drivers/staging/sm750fb/ddk750_chip.c index 5e4bfb601cea..112ee4182a0a 100644 --- a/drivers/staging/sm750fb/ddk750_chip.c +++ b/drivers/staging/sm750fb/ddk750_chip.c @@ -44,7 +44,7 @@ static unsigned int get_mxclk_freq(void) OD = (pll_reg & PLL_CTRL_OD_MASK) >> PLL_CTRL_OD_SHIFT; POD = (pll_reg & PLL_CTRL_POD_MASK) >> PLL_CTRL_POD_SHIFT; - return DEFAULT_INPUT_CLOCK * M / N / (1 << OD) / (1 << POD); + return DEFAULT_INPUT_CLOCK * M / N / (BIT(OD)) / (BIT(POD)); } /*