From patchwork Fri Aug 14 22:40:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ray Jui X-Patchwork-Id: 254905 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F32EDC433E1 for ; Fri, 14 Aug 2020 22:40:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CEBCA20768 for ; Fri, 14 Aug 2020 22:40:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="JPlJwOyx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727994AbgHNWk0 (ORCPT ); Fri, 14 Aug 2020 18:40:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726919AbgHNWkX (ORCPT ); Fri, 14 Aug 2020 18:40:23 -0400 Received: from mail-qk1-x744.google.com (mail-qk1-x744.google.com [IPv6:2607:f8b0:4864:20::744]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ABEDC061385 for ; Fri, 14 Aug 2020 15:40:23 -0700 (PDT) Received: by mail-qk1-x744.google.com with SMTP id m7so9772512qki.12 for ; Fri, 14 Aug 2020 15:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id; bh=S+Nq4NH8jPvnXfz2GyxerSue0wCYMn7S7LmKnPKVOT8=; b=JPlJwOyxCUlIU8uursfJxCa63kd5rWUfURylxigZ9fCMpK8ivmBXELZ6jo/4KQjGKE EsVQl3ZwOdVdD5ERWmY+zm0womFqwFjZrgvy4Dm4f3zbjmfUZSgNjNCvpoxS3ukBGxBw frGZSymSwOCdkJRHbIAE6PUpWNUGTbvV09Tw4= 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=S+Nq4NH8jPvnXfz2GyxerSue0wCYMn7S7LmKnPKVOT8=; b=BH0NTVYLMkCU/+Jt/9TzzPOC0iWcsgrGU7vDnboERdcfGiR6sQylGKD9axSQHztXDA 6X44BlRgje1iU2PsMHNH8647pdUNJACLkltShQkU68XsBFLVDLY86KtgvAkwNT7RLUpJ BKP2EfeCGsCxmAfOEZIiamfKB3KQrvShvIzOBfEA8OwWrP3AEJpUebVjmXxfIgvlcWWE MZaOOZ9sIwGzm+1SIltAMlad/J34zoIYKw72vuw0Ku/IdjR2jjJ19DeYNF5vn+XYG9n0 n/iN4CHq0LGGB42Jv6/z5moWlGhIFCc5xOPuFQYAWD8mxVFJr0pzSZm4WZGh7rX2KiEL sn7Q== X-Gm-Message-State: AOAM530iKKUV5pDy6u0z1XP7bKKZhB1TASNTvNy6dKz95QKWsmhQ7+LA YRKt7wNMcRgvtRoRF4FKOX0H+9s72mAvRDWv X-Google-Smtp-Source: ABdhPJx2pQHmDGGlxfcYQ9WzotzTKwUVTuGYihj3Wf/o5S6pc9v5a+U8H/ZWecmXhMFjt+eQOkU19Q== X-Received: by 2002:a37:a64a:: with SMTP id p71mr4047056qke.296.1597444819686; Fri, 14 Aug 2020 15:40:19 -0700 (PDT) Received: from rj-aorus.ric.broadcom.com ([192.19.228.250]) by smtp.gmail.com with ESMTPSA id r18sm11909804qtc.90.2020.08.14.15.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Aug 2020 15:40:18 -0700 (PDT) From: Ray Jui To: Wolfram Sang Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Rayagonda Kokatanur , Ray Jui Subject: [PATCH] i2c: iproc: Fix checkpatch warnings by using 'BIT' macro Date: Fri, 14 Aug 2020 15:40:08 -0700 Message-Id: <20200814224008.107430-1-ray.jui@broadcom.com> X-Mailer: git-send-email 2.17.1 Sender: linux-i2c-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-i2c@vger.kernel.org Fix additional checkpatch warnings in the iProc I2C driver by using 'BIT' marcro. Reported-by: Wolfram Sang Signed-off-by: Ray Jui --- drivers/i2c/busses/i2c-bcm-iproc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm-iproc.c b/drivers/i2c/busses/i2c-bcm-iproc.c index 688e92818821..d8295b1c379d 100644 --- a/drivers/i2c/busses/i2c-bcm-iproc.c +++ b/drivers/i2c/busses/i2c-bcm-iproc.c @@ -720,7 +720,7 @@ static int bcm_iproc_i2c_xfer_internal(struct bcm_iproc_i2c_dev *iproc_i2c, /* mark the last byte */ if (!process_call && (i == msg->len - 1)) - val |= 1 << M_TX_WR_STATUS_SHIFT; + val |= BIT(M_TX_WR_STATUS_SHIFT); iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val); } @@ -738,7 +738,7 @@ static int bcm_iproc_i2c_xfer_internal(struct bcm_iproc_i2c_dev *iproc_i2c, */ addr = i2c_8bit_addr_from_msg(msg); /* mark it the last byte out */ - val = addr | (1 << M_TX_WR_STATUS_SHIFT); + val = addr | BIT(M_TX_WR_STATUS_SHIFT); iproc_i2c_wr_reg(iproc_i2c, M_TX_OFFSET, val); }