Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161229AbbKEN1p (ORCPT ); Thu, 5 Nov 2015 08:27:45 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:33040 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755867AbbKEN1m (ORCPT ); Thu, 5 Nov 2015 08:27:42 -0500 Date: Thu, 5 Nov 2015 15:27:33 +0200 From: Leon Romanovsky To: Sunny Kumar Cc: Mike Marciniszyn , Doug Ledford , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman , linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Sunny Kumar Subject: Re: [PATCH 1/1] staging: rdma: hfi1 : Prefer using the BIT macro Message-ID: <20151105132733.GD4023@leon.nu> Reply-To: leon@leon.nu Mail-Followup-To: Sunny Kumar , Mike Marciniszyn , Doug Ledford , Sean Hefty , Hal Rosenstock , Greg Kroah-Hartman , linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Sunny Kumar References: <1446724683-30092-1-git-send-email-sunnyk@cdac.in> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1446724683-30092-1-git-send-email-sunnyk@cdac.in> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1111 Lines: 28 On Thu, Nov 05, 2015 at 05:28:03PM +0530, Sunny Kumar wrote: > This patch replaces bit shifting on 1 with the BIT(x) macro > > Signed-off-by: Sunny Kumar > --- > drivers/staging/rdma/hfi1/user_sdma.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > /* Last packet in the request */ > -#define TXREQ_FLAGS_REQ_LAST_PKT (1 << 0) > -#define TXREQ_FLAGS_IOVEC_LAST_PKT (1 << 0) > +#define TXREQ_FLAGS_REQ_LAST_PKT BIT(1 << 0) > +#define TXREQ_FLAGS_IOVEC_LAST_PKT BIT(1 << 0) > It is wrong. It actually creates 0x2 instead of 0x1. > -#define SDMA_PKT_Q_INACTIVE (1 << 0) > -#define SDMA_PKT_Q_ACTIVE (1 << 1) > -#define SDMA_PKT_Q_DEFERRED (1 << 2) > +#define SDMA_PKT_Q_INACTIVE BIT(1 << 0) > +#define SDMA_PKT_Q_ACTIVE BIT(1 << 1) > +#define SDMA_PKT_Q_DEFERRED BIT(1 << 2) The same comment as above. It is wrong. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/