All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [RESEND PATCH v2 4/5] staging: lustre: selftest.h: replace IS_PO2 by is_power_of_2
Date: Wed, 28 Oct 2015 12:14:57 +0530	[thread overview]
Message-ID: <20151028064457.GC3649@sudip-pc> (raw)
In-Reply-To: <6424e67b55e713cc71a479e1dc19325ca7f5934f.1445967419.git.mahfouz.saif.elyazal@gmail.com>

On Tue, Oct 27, 2015 at 07:45:22PM +0200, Aya Mahfouz wrote:
> Replaces IS_PO2 by is_power_of_2. It is more accurate to use
> is_power_of_2 since it returns 1 for numbers that are powers
> of 2 only whereas IS_PO2 returns 1 for 0 and numbers that are
> powers of 2.
> 
> Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
> ---
> v2:
>         -added new patch in patch set for selftest.h
> 
>  drivers/staging/lustre/lnet/selftest/selftest.h | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h
> index 8a77d3f..2846f26 100644
> --- a/drivers/staging/lustre/lnet/selftest/selftest.h
> +++ b/drivers/staging/lustre/lnet/selftest/selftest.h
> @@ -43,6 +43,8 @@
>  
>  #define LNET_ONLY
>  
> +#include <linux/log2.h>
> +
>  #include "../../include/linux/libcfs/libcfs.h"
>  #include "../../include/linux/lnet/lnet.h"
>  #include "../../include/linux/lnet/lib-lnet.h"
> @@ -585,7 +587,7 @@ swi_state2str (int state)
>  do {									\
>  	int __I = 2;							\
>  	while (!(cond)) {						\
> -		CDEBUG(IS_PO2(++__I) ? D_WARNING : D_NET,		\
> +		CDEBUG(is_power_of_2(++__I) ? D_WARNING : D_NET,		\

An extra tab here broke the alignent of those '\'.

regards
sudip

  reply	other threads:[~2015-10-28  6:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-27 17:41 [lustre-devel] [RESEND PATCH v2 0/5] Remove uses and definition of IS_PO2 Aya Mahfouz
2015-10-27 17:42 ` [lustre-devel] [RESEND PATCH v2 1/5] staging: lustre: ldlm_extent.c: replace IS_PO2 by is_power_of_2 Aya Mahfouz
2015-10-27 17:43 ` [lustre-devel] [RESEND PATCH v2 2/5] staging: lustre: hash.c: Replace " Aya Mahfouz
2015-10-28  6:41   ` Sudip Mukherjee
2015-10-29  0:26     ` Aya Mahfouz
2015-10-27 17:44 ` [lustre-devel] [RESEND PATCH v2 3/5] staging: lustre: workitem.c: replace " Aya Mahfouz
2015-10-27 17:45 ` [lustre-devel] [RESEND PATCH v2 4/5] staging: lustre: selftest.h: " Aya Mahfouz
2015-10-28  6:44   ` Sudip Mukherjee [this message]
2015-10-27 17:46 ` [lustre-devel] [RESEND PATCH v2 5/5] staging: lustre: libcfs.h: remove IS_PO2 and __is_po2 Aya Mahfouz

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=20151028064457.GC3649@sudip-pc \
    --to=sudipm.mukherjee@gmail.com \
    --cc=lustre-devel@lists.lustre.org \
    /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.