All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Matthew Wilcox <willy@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Konstantin Khlebnikov <koct9i@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] testing/radix-tree: fix a macro expansion bug
Date: Fri, 15 Jul 2016 21:42:13 +0000	[thread overview]
Message-ID: <20160715214213.GA3883@linux.intel.com> (raw)
In-Reply-To: <20160715210953.GC19522@mwanda>

On Sat, Jul 16, 2016 at 12:09:53AM +0300, Dan Carpenter wrote:
> There are no parentheses around this macro and it causes a problem when
> we do:
> 
> 	index = rand() % THRASH_SIZE;
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Ross Zwisler <ross.zwisler@linux.intel.com>

> 
> diff --git a/tools/testing/radix-tree/tag_check.c b/tools/testing/radix-tree/tag_check.c
> index b7447ce..b0ac057 100644
> --- a/tools/testing/radix-tree/tag_check.c
> +++ b/tools/testing/radix-tree/tag_check.c
> @@ -122,7 +122,7 @@ enum {
>  	NODE_TAGGED = 2,
>  };
>  
> -#define THRASH_SIZE		1000 * 1000
> +#define THRASH_SIZE		(1000 * 1000)
>  #define N 127
>  #define BATCH	33
>  

WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Matthew Wilcox <willy@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Konstantin Khlebnikov <koct9i@gmail.com>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch] testing/radix-tree: fix a macro expansion bug
Date: Fri, 15 Jul 2016 15:42:13 -0600	[thread overview]
Message-ID: <20160715214213.GA3883@linux.intel.com> (raw)
In-Reply-To: <20160715210953.GC19522@mwanda>

On Sat, Jul 16, 2016 at 12:09:53AM +0300, Dan Carpenter wrote:
> There are no parentheses around this macro and it causes a problem when
> we do:
> 
> 	index = rand() % THRASH_SIZE;
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Ross Zwisler <ross.zwisler@linux.intel.com>

> 
> diff --git a/tools/testing/radix-tree/tag_check.c b/tools/testing/radix-tree/tag_check.c
> index b7447ce..b0ac057 100644
> --- a/tools/testing/radix-tree/tag_check.c
> +++ b/tools/testing/radix-tree/tag_check.c
> @@ -122,7 +122,7 @@ enum {
>  	NODE_TAGGED = 2,
>  };
>  
> -#define THRASH_SIZE		1000 * 1000
> +#define THRASH_SIZE		(1000 * 1000)
>  #define N 127
>  #define BATCH	33
>  

  reply	other threads:[~2016-07-15 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 21:09 [patch] testing/radix-tree: fix a macro expansion bug Dan Carpenter
2016-07-15 21:09 ` Dan Carpenter
2016-07-15 21:42 ` Ross Zwisler [this message]
2016-07-15 21:42   ` Ross Zwisler

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=20160715214213.GA3883@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=koct9i@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=willy@linux.intel.com \
    /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.