public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jes Sorensen <jes@sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: ate_resource->lowest_free_index signed or unsigned?
Date: Tue, 21 Apr 2009 11:31:09 +0000	[thread overview]
Message-ID: <49EDAE7D.4000005@sgi.com> (raw)
In-Reply-To: <49ECA692.2040007@gmail.com>

Roel Kluin wrote:
> Jes Sorensen wrote:
>> Roel Kluin wrote:
>>> lowest_free_index is unsigned, but in alloc_ate_resource() and
>>> free_ate_resource() it is treated as signed
>> I don't thing it's a big issue to be honest, it just means the tests for
>> lowest_free_index < 0 are no-ops. I would be fine with a patch that
>> changes it to signed.
> 
> Ok, How's this? If my changelog is not clear feel free to amend it.

Hi Roel,

Please make it 'long' or 's64' to keep the size in the struct.

Cheers,
Jes


> ------------------------------>8-------------8<---------------------------------
> unsigned lowest_free_index was set in alloc_ate_resource() with the return
> value of find_free_ate(), which is -1 when no free ate is found. Since
> unsigned, a lowest_free_index of -1, `ate exhaustion', would then not be noticed
> in a subsequent call to alloc_ate_resource().
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
> ---
> diff --git a/arch/ia64/include/asm/sn/pcibr_provider.h b/arch/ia64/include/asm/sn/pcibr_provider.h
> index da205b7..b3133ef 100644
> --- a/arch/ia64/include/asm/sn/pcibr_provider.h
> +++ b/arch/ia64/include/asm/sn/pcibr_provider.h
> @@ -94,7 +94,7 @@
>  struct ate_resource{
>  	u64 *ate;
>  	u64 num_ate;
> -	u64 lowest_free_index;
> +	int lowest_free_index;
>  };
>  
>  struct pcibus_info {


  parent reply	other threads:[~2009-04-21 11:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-20 16:45 ate_resource->lowest_free_index signed or unsigned? Roel Kluin
2009-04-21  6:46 ` Jes Sorensen
2009-04-21 11:21 ` Roel Kluin
2009-04-21 11:31 ` Jes Sorensen [this message]
2009-04-21 12:15 ` Roel Kluin
2009-04-23 11:35 ` Jes Sorensen

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=49EDAE7D.4000005@sgi.com \
    --to=jes@sgi.com \
    --cc=linux-ia64@vger.kernel.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