From patchwork Thu Jan 4 16:36:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sumit Pundir X-Patchwork-Id: 10145141 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 1C4E56034B for ; Thu, 4 Jan 2018 16:36:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 11D3028741 for ; Thu, 4 Jan 2018 16:36:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 062152876B; Thu, 4 Jan 2018 16:36:52 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, 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 5CD6428741 for ; Thu, 4 Jan 2018 16:36:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753310AbeADQgu (ORCPT ); Thu, 4 Jan 2018 11:36:50 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:42978 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752704AbeADQgt (ORCPT ); Thu, 4 Jan 2018 11:36:49 -0500 Received: by mail-pl0-f68.google.com with SMTP id bd8so1312211plb.9; Thu, 04 Jan 2018 08:36:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=jjuAnVjDvRzFbTZgBEb+Q4Zn2tjztT/FxY+p/PQw2gk=; b=P/LFs44UmakgBPw02TcNh0ugAkkPH8ckpbN56b1VsrhIYpJLnwU0QwUZ32fRkcqCrw f3hcZjAj9qpwALXqUhYxAGhgfeY0bn83kJ2UXVt1/G25GQ2GugbWFkYzbg4JY5XudDP4 r/HiptMv4UfKg2+LCQvHZWzFQ/lDSA1+oItbCR0kOBEkzG0zrWnALmcayrCCUICnM8Jw 9MgcDrjjugoQ5xO9jI9b5jqJuVILck7wMgXVDo2U9+RqUigxSgFHafj7PIn5PVpZh3xc 9u14MmWzmw85Qv5TUC4F45slT2/q2ct4tnei/FvXA/EfPfwFLJSbcEQpp2Ep7DU3iAMe mmKg== 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=jjuAnVjDvRzFbTZgBEb+Q4Zn2tjztT/FxY+p/PQw2gk=; b=n8g/dTJ9xZhbNTrYrUN6mwtAmB6FgZD3/T4pPF5tjK4j7jBeTaBBCundGyQOKZOY9s zFddyUW/krdNLt3ekJafn4Ncm6gcjXybzuMZXAgHkGipw5KB1uiMpsLPCc3a6MxTBbnE fRbJflAQtTL+DDF6SmtvnieHpgO0bzlX6ntuJRnT17rE3RIW3PZnaHO+kH05hH7ZtzC2 1B6QMObDyjqCgUqfy3+/xD4M/XoTVlwiXI4Q3KGOq9+Djx5flThmwS/f6hfOYkc0u1wF ZGkEFenw7yMUoqiylUjlGENsSyhOFzKZUuv3cI22a3lvheYaEpTrwRq/+AXIwXrf2K2c 1GSg== X-Gm-Message-State: AKGB3mIGGaLC8m05W4ZPNijOqanz/bMzvVDMjKMAjS+IaYmS5EhAB6+M dB2Q1nH2w9oKX3eoes4rAQ0= X-Google-Smtp-Source: ACJfBotGg+0wib6zfViVNI4clojXbl8nvc56fFpIBsJTXXNw/RXbNiXHu1McI4rBquxsLQEVW3kdVw== X-Received: by 10.159.254.15 with SMTP id r15mr122602pls.141.1515083809098; Thu, 04 Jan 2018 08:36:49 -0800 (PST) Received: from BlackPearl ([106.67.33.80]) by smtp.gmail.com with ESMTPSA id s14sm7305748pgf.16.2018.01.04.08.36.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Jan 2018 08:36:48 -0800 (PST) From: Sumit Pundir To: lars@metafoo.de Cc: Michael.Hennerich@analog.com, knaack.h@gmx.de, pmeerw@pmeerw.net, gregkh@linuxfoundation.org, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, jic23@kernel.org Subject: [PATCH] Staging: iio: Prefer using BIT macro Date: Thu, 4 Jan 2018 22:06:31 +0530 Message-Id: <1515083791-19049-1-git-send-email-pundirsumit11@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the following checkpatch.pl error at multiple lines: CHECK: Prefer using the BIT macro Signed-off-by: Sumit Pundir --- drivers/staging/iio/cdc/ad7152.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/iio/cdc/ad7152.c b/drivers/staging/iio/cdc/ad7152.c index 59d1b35..b2b15b9 100644 --- a/drivers/staging/iio/cdc/ad7152.c +++ b/drivers/staging/iio/cdc/ad7152.c @@ -47,24 +47,24 @@ #define AD7152_STATUS_PWDN BIT(7) /* Setup Register Bit Designations (AD7152_REG_CHx_SETUP) */ -#define AD7152_SETUP_CAPDIFF (1 << 5) +#define AD7152_SETUP_CAPDIFF BIT(5) #define AD7152_SETUP_RANGE_2pF (0 << 6) -#define AD7152_SETUP_RANGE_0_5pF (1 << 6) +#define AD7152_SETUP_RANGE_0_5pF BIT(6) #define AD7152_SETUP_RANGE_1pF (2 << 6) #define AD7152_SETUP_RANGE_4pF (3 << 6) #define AD7152_SETUP_RANGE(x) ((x) << 6) /* Config Register Bit Designations (AD7152_REG_CFG) */ -#define AD7152_CONF_CH2EN (1 << 3) -#define AD7152_CONF_CH1EN (1 << 4) +#define AD7152_CONF_CH2EN BIT(3) +#define AD7152_CONF_CH1EN BIT(4) #define AD7152_CONF_MODE_IDLE (0 << 0) -#define AD7152_CONF_MODE_CONT_CONV (1 << 0) +#define AD7152_CONF_MODE_CONT_CONV BIT(0) #define AD7152_CONF_MODE_SINGLE_CONV (2 << 0) #define AD7152_CONF_MODE_OFFS_CAL (5 << 0) #define AD7152_CONF_MODE_GAIN_CAL (6 << 0) /* Capdac Register Bit Designations (AD7152_REG_CAPDAC_XXX) */ -#define AD7152_CAPDAC_DACEN (1 << 7) +#define AD7152_CAPDAC_DACEN BIT(7) #define AD7152_CAPDAC_DACP(x) ((x) & 0x1F) /* CFG2 Register Bit Designations (AD7152_REG_CFG2) */