public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal@redhat.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: linux-kernel@vger.kernel.org, jaxboe@fusionio.com,
	paulmck@linux.vnet.ibm.com, oleg@redhat.com
Subject: Re: [PATCH] blk-throttle: don't call xchg on bool
Date: Wed, 30 Mar 2011 09:19:36 -0400	[thread overview]
Message-ID: <20110330131936.GA1291@redhat.com> (raw)
In-Reply-To: <m21v1ph639.fsf_-_@igel.home>

On Wed, Mar 30, 2011 at 01:14:50AM +0200, Andreas Schwab wrote:
> xchg does not work portably with smaller than 32bit types.
> 

Hi Andreas,

Which arch creates the problem and what's the issue here if data type
is smaller than 32bit? Is it a compile time warning?

Also, you also probably need to chagne ->limits_changed assignments?
Instead of using true/false use 1/0.

Thanks
Vivek

> Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
> ---
>  block/blk-throttle.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/block/blk-throttle.c b/block/blk-throttle.c
> index 5352bda..6c98cfe 100644
> --- a/block/blk-throttle.c
> +++ b/block/blk-throttle.c
> @@ -77,7 +77,7 @@ struct throtl_grp {
>  	unsigned long slice_end[2];
>  
>  	/* Some throttle limits got updated for the group */
> -	bool limits_changed;
> +	int limits_changed;
>  };
>  
>  struct throtl_data
> @@ -102,7 +102,7 @@ struct throtl_data
>  	/* Work for dispatching throttled bios */
>  	struct delayed_work throtl_work;
>  
> -	bool limits_changed;
> +	int limits_changed;
>  };
>  
>  enum tg_state_flags {
> -- 
> 1.7.4.2
> 
> 
> -- 
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
> "And now for something completely different."

  parent reply	other threads:[~2011-03-30 13:19 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-15 21:07 [PATCH 0/2] blk-throttle: Couple of more fixes Vivek Goyal
2010-12-15 21:07 ` [PATCH 1/2] blk-throttle: process limit change only through one function Vivek Goyal
2010-12-15 21:07 ` [PATCH 2/2] blk-throttle: Some cleanups and race fixes in limit update code Vivek Goyal
2010-12-16 14:49   ` Oleg Nesterov
2010-12-17 22:28   ` Paul E. McKenney
2010-12-17 22:34     ` Vivek Goyal
2011-03-29 23:14   ` [PATCH] blk-throttle: don't call xchg on bool Andreas Schwab
2011-03-30 10:21     ` Jens Axboe
2011-03-30 13:19     ` Vivek Goyal [this message]
2011-03-30 13:51       ` Andreas Schwab
2011-03-30 16:53         ` Vivek Goyal
2011-03-30 16:06       ` Andreas Schwab
2010-12-21 16:05 ` [PATCH 0/2] blk-throttle: Couple of more fixes Vivek Goyal

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=20110330131936.GA1291@redhat.com \
    --to=vgoyal@redhat.com \
    --cc=jaxboe@fusionio.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=schwab@linux-m68k.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox