[ofa-general] Re: [PATCH] infiniband/ehca: use consistent type

Stephen Rothwell sfr at canb.auug.org.au
Wed Jan 7 15:47:31 PST 2009


Hi Roland,

On Wed, 07 Jan 2009 11:32:13 -0800 Roland Dreier <rdreier at cisco.com> wrote:
>
> If we're going to clean this code up, does it make sense to take it
> further?  More precisely, your patch does:
> 
> @@ -226,7 +226,7 @@ u64 hipz_h_alloc_resource_eq(const struct ipz_adapter_handle adapter_handle,
>  			     u32 *eq_ist)
>  {
>  	u64 ret;
> -	u64 outs[PLPAR_HCALL9_BUFSIZE];
> +	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
>  	u64 allocate_controls;
> 
> but every parameter of ehca_plpar_hcall9() is unsigned long, and the
> return value is a signed long.  So should we change ret to long and all
> these other declarations to unsigned long while we're touching the code
> here?

At least all the others are passed by value and the normal arithmetic
promotion rules apply so no warnings are issued.  I will see how much of
a pain it is to change the others.

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20090108/ea4ebb91/attachment.sig>


More information about the general mailing list