All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@leon.nu>
To: Sunny Kumar <sunny.kumar.roy@gmail.com>
Cc: Mike Marciniszyn <infinipath@intel.com>,
	Doug Ledford <dledford@redhat.com>,
	Sean Hefty <sean.hefty@intel.com>,
	Hal Rosenstock <hal.rosenstock@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-rdma@vger.kernel.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org, Sunny Kumar <sunnyk@cdac.in>
Subject: Re: [PATCH 1/1] staging: rdma: hfi1 : Prefer using the BIT macro
Date: Thu, 5 Nov 2015 15:27:33 +0200	[thread overview]
Message-ID: <20151105132733.GD4023@leon.nu> (raw)
In-Reply-To: <1446724683-30092-1-git-send-email-sunnyk@cdac.in>

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 <sunnyk@cdac.in>
> ---
>  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.

  reply	other threads:[~2015-11-05 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-05 11:58 [PATCH 1/1] staging: rdma: hfi1 : Prefer using the BIT macro Sunny Kumar
2015-11-05 11:58 ` Sunny Kumar
2015-11-05 13:27 ` Leon Romanovsky [this message]
2015-11-05 14:24 ` Marciniszyn, Mike
2015-11-05 17:06 ` ira.weiny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151105132733.GD4023@leon.nu \
    --to=leon@leon.nu \
    --cc=devel@driverdev.osuosl.org \
    --cc=dledford@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hal.rosenstock@gmail.com \
    --cc=infinipath@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=sean.hefty@intel.com \
    --cc=sunny.kumar.roy@gmail.com \
    --cc=sunnyk@cdac.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.