All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/ehea: use consistent type
@ 2008-12-31  3:17 ` Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2008-12-31  3:17 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, ppc-dev, Christoph Raisch, Jan-Bernd Themann, Thomas Klein

ehea_plpar_hcall9() takes an unsigned long array, so pass that.

This change will avoid some warnings when we change u64 to unsigned
long long.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ehea/ehea_phyp.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c
index 2a33a61..8fe9dca 100644
--- a/drivers/net/ehea/ehea_phyp.c
+++ b/drivers/net/ehea/ehea_phyp.c
@@ -214,7 +214,7 @@ u64 ehea_h_alloc_resource_qp(const u64 adapter_handle,
 			     u64 *qp_handle, struct h_epas *h_epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	u64 allocate_controls =
 	    EHEA_BMASK_SET(H_ALL_RES_QP_EQPO, init_attr->low_lat_rq1 ? 1 : 0)
@@ -312,7 +312,7 @@ u64 ehea_h_alloc_resource_cq(const u64 adapter_handle,
 			     u64 *cq_handle, struct h_epas *epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -374,7 +374,7 @@ u64 ehea_h_alloc_resource_eq(const u64 adapter_handle,
 			     struct ehea_eq_attr *eq_attr, u64 *eq_handle)
 {
 	u64 hret, allocate_controls;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	/* resource type */
 	allocate_controls =
@@ -407,7 +407,7 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u8 cat,
 			  u16 *out_swr, u16 *out_rwr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_MODIFY_HEA_QP,
 				 outs,
@@ -449,7 +449,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 			struct ehea_mr *mr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_REGISTER_SMR,
 				 outs,
@@ -468,7 +468,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 
 u64 ehea_h_disable_and_get_hea(const u64 adapter_handle, const u64 qp_handle)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	return ehea_plpar_hcall9(H_DISABLE_AND_GET_HEA,
 				 outs,
@@ -493,7 +493,7 @@ u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
 			     const u32 pd, u64 *mr_handle, u32 *lkey)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -564,7 +564,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
 			    const u8 cb_cat, const u64 select_mask,
 			    void *cb_addr)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 	u64 port_info;
 	u64 arr_index = 0;
 	u64 cb_logaddr = virt_to_abs(cb_addr);
-- 
1.6.0.5

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] net/ehea: use consistent type
@ 2008-12-31  3:17 ` Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2008-12-31  3:17 UTC (permalink / raw)
  To: David S. Miller
  Cc: Klein, Thomas, Christoph, netdev, Jan-Bernd Themann, ppc-dev, Raisch

ehea_plpar_hcall9() takes an unsigned long array, so pass that.

This change will avoid some warnings when we change u64 to unsigned
long long.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ehea/ehea_phyp.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c
index 2a33a61..8fe9dca 100644
--- a/drivers/net/ehea/ehea_phyp.c
+++ b/drivers/net/ehea/ehea_phyp.c
@@ -214,7 +214,7 @@ u64 ehea_h_alloc_resource_qp(const u64 adapter_handle,
 			     u64 *qp_handle, struct h_epas *h_epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	u64 allocate_controls =
 	    EHEA_BMASK_SET(H_ALL_RES_QP_EQPO, init_attr->low_lat_rq1 ? 1 : 0)
@@ -312,7 +312,7 @@ u64 ehea_h_alloc_resource_cq(const u64 adapter_handle,
 			     u64 *cq_handle, struct h_epas *epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -374,7 +374,7 @@ u64 ehea_h_alloc_resource_eq(const u64 adapter_handle,
 			     struct ehea_eq_attr *eq_attr, u64 *eq_handle)
 {
 	u64 hret, allocate_controls;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	/* resource type */
 	allocate_controls =
@@ -407,7 +407,7 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u8 cat,
 			  u16 *out_swr, u16 *out_rwr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_MODIFY_HEA_QP,
 				 outs,
@@ -449,7 +449,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 			struct ehea_mr *mr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_REGISTER_SMR,
 				 outs,
@@ -468,7 +468,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 
 u64 ehea_h_disable_and_get_hea(const u64 adapter_handle, const u64 qp_handle)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	return ehea_plpar_hcall9(H_DISABLE_AND_GET_HEA,
 				 outs,
@@ -493,7 +493,7 @@ u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
 			     const u32 pd, u64 *mr_handle, u32 *lkey)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -564,7 +564,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
 			    const u8 cb_cat, const u64 select_mask,
 			    void *cb_addr)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 	u64 port_info;
 	u64 arr_index = 0;
 	u64 cb_logaddr = virt_to_abs(cb_addr);
-- 
1.6.0.5

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
  2008-12-31  3:17 ` Stephen Rothwell
@ 2008-12-31  5:51   ` David Miller
  -1 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2008-12-31  5:51 UTC (permalink / raw)
  To: sfr; +Cc: netdev, linuxppc-dev, raisch, themann, tklein

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 31 Dec 2008 14:17:30 +1100

> ehea_plpar_hcall9() takes an unsigned long array, so pass that.
> 
> This change will avoid some warnings when we change u64 to unsigned
> long long.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Patch rejected, for the same reasons as the other driver
change.

We're not going to poop up some drivers with the assumption that long
is 64-bit.

Thanks ;-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
@ 2008-12-31  5:51   ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2008-12-31  5:51 UTC (permalink / raw)
  To: sfr; +Cc: tklein, netdev, raisch, themann, linuxppc-dev

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 31 Dec 2008 14:17:30 +1100

> ehea_plpar_hcall9() takes an unsigned long array, so pass that.
> 
> This change will avoid some warnings when we change u64 to unsigned
> long long.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Patch rejected, for the same reasons as the other driver
change.

We're not going to poop up some drivers with the assumption that long
is 64-bit.

Thanks ;-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
  2008-12-31  5:51   ` David Miller
@ 2008-12-31  9:09     ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2008-12-31  9:09 UTC (permalink / raw)
  To: David Miller; +Cc: sfr, tklein, netdev, raisch, themann, linuxppc-dev

On Tue, 2008-12-30 at 21:51 -0800, David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 31 Dec 2008 14:17:30 +1100
> 
> > ehea_plpar_hcall9() takes an unsigned long array, so pass that.
> > 
> > This change will avoid some warnings when we change u64 to unsigned
> > long long.
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> Patch rejected, for the same reasons as the other driver
> change.
> 
> We're not going to poop up some drivers with the assumption that long
> is 64-bit.

Well, in that case, this patch is actually correct without considering
the u64 change. The array is what lands in the registers of the pHyp
call, so strictly speaking, it's an array of unsigned long's (ie, 32-bit
on a 32-bit platform, 64-bit on a 64-bit platform), not an array of
u64's. This function being a wrapper on that pHyp call, it may as well
use the right type.

Cheers,
Ben.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
@ 2008-12-31  9:09     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2008-12-31  9:09 UTC (permalink / raw)
  To: David Miller; +Cc: tklein, sfr, themann, netdev, linuxppc-dev, raisch

On Tue, 2008-12-30 at 21:51 -0800, David Miller wrote:
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 31 Dec 2008 14:17:30 +1100
> 
> > ehea_plpar_hcall9() takes an unsigned long array, so pass that.
> > 
> > This change will avoid some warnings when we change u64 to unsigned
> > long long.
> > 
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> 
> Patch rejected, for the same reasons as the other driver
> change.
> 
> We're not going to poop up some drivers with the assumption that long
> is 64-bit.

Well, in that case, this patch is actually correct without considering
the u64 change. The array is what lands in the registers of the pHyp
call, so strictly speaking, it's an array of unsigned long's (ie, 32-bit
on a 32-bit platform, 64-bit on a 64-bit platform), not an array of
u64's. This function being a wrapper on that pHyp call, it may as well
use the right type.

Cheers,
Ben.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
  2008-12-31  9:09     ` Benjamin Herrenschmidt
@ 2009-01-06  0:05       ` Stephen Rothwell
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2009-01-06  0:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: David Miller, tklein, netdev, raisch, themann, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

Hi Dave,

On Wed, 31 Dec 2008 20:09:01 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Tue, 2008-12-30 at 21:51 -0800, David Miller wrote:
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Wed, 31 Dec 2008 14:17:30 +1100
> > 
> > > ehea_plpar_hcall9() takes an unsigned long array, so pass that.
> > > 
> > > This change will avoid some warnings when we change u64 to unsigned
> > > long long.
> > > 
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > 
> > Patch rejected, for the same reasons as the other driver
> > change.
> > 
> > We're not going to poop up some drivers with the assumption that long
> > is 64-bit.
> 
> Well, in that case, this patch is actually correct without considering
> the u64 change. The array is what lands in the registers of the pHyp
> call, so strictly speaking, it's an array of unsigned long's (ie, 32-bit
> on a 32-bit platform, 64-bit on a 64-bit platform), not an array of
> u64's. This function being a wrapper on that pHyp call, it may as well
> use the right type.

So, any response?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
@ 2009-01-06  0:05       ` Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2009-01-06  0:05 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: tklein, themann, netdev, linuxppc-dev, raisch, David Miller

[-- Attachment #1: Type: text/plain, Size: 1208 bytes --]

Hi Dave,

On Wed, 31 Dec 2008 20:09:01 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Tue, 2008-12-30 at 21:51 -0800, David Miller wrote:
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Wed, 31 Dec 2008 14:17:30 +1100
> > 
> > > ehea_plpar_hcall9() takes an unsigned long array, so pass that.
> > > 
> > > This change will avoid some warnings when we change u64 to unsigned
> > > long long.
> > > 
> > > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > 
> > Patch rejected, for the same reasons as the other driver
> > change.
> > 
> > We're not going to poop up some drivers with the assumption that long
> > is 64-bit.
> 
> Well, in that case, this patch is actually correct without considering
> the u64 change. The array is what lands in the registers of the pHyp
> call, so strictly speaking, it's an array of unsigned long's (ie, 32-bit
> on a 32-bit platform, 64-bit on a 64-bit platform), not an array of
> u64's. This function being a wrapper on that pHyp call, it may as well
> use the right type.

So, any response?
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
  2009-01-06  0:05       ` Stephen Rothwell
@ 2009-01-06  0:19         ` David Miller
  -1 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2009-01-06  0:19 UTC (permalink / raw)
  To: sfr; +Cc: benh, tklein, netdev, raisch, themann, linuxppc-dev

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Jan 2009 11:05:11 +1100

> Hi Dave,
> 
> On Wed, 31 Dec 2008 20:09:01 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > Well, in that case, this patch is actually correct without considering
> > the u64 change. The array is what lands in the registers of the pHyp
> > call, so strictly speaking, it's an array of unsigned long's (ie, 32-bit
> > on a 32-bit platform, 64-bit on a 64-bit platform), not an array of
> > u64's. This function being a wrapper on that pHyp call, it may as well
> > use the right type.
> 
> So, any response?

Please resubmit, I'll take another look :-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistent type
@ 2009-01-06  0:19         ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2009-01-06  0:19 UTC (permalink / raw)
  To: sfr; +Cc: tklein, themann, linuxppc-dev, raisch, netdev

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Jan 2009 11:05:11 +1100

> Hi Dave,
> 
> On Wed, 31 Dec 2008 20:09:01 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > Well, in that case, this patch is actually correct without considering
> > the u64 change. The array is what lands in the registers of the pHyp
> > call, so strictly speaking, it's an array of unsigned long's (ie, 32-bit
> > on a 32-bit platform, 64-bit on a 64-bit platform), not an array of
> > u64's. This function being a wrapper on that pHyp call, it may as well
> > use the right type.
> 
> So, any response?

Please resubmit, I'll take another look :-)

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] net/ehea: use consistant type
  2009-01-06  0:19         ` David Miller
@ 2009-01-06  5:34           ` Stephen Rothwell
  -1 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2009-01-06  5:34 UTC (permalink / raw)
  To: David Miller; +Cc: tklein, themann, linuxppc-dev, raisch, netdev

ehea_plpar_hcall9() takes an "unsigned long" array to return its results,
so change the arrays we pass to it to match.  This is currently only
64 bit code, so the transformation is actually a noop, but because
ehea_plpar_hcall9() copies the values of registers into the array,
if this was ported to a 32 bit hypervisor interface "unsigned long"
would probably still be the correct type.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ehea/ehea_phyp.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c
index 2a33a61..8fe9dca 100644
--- a/drivers/net/ehea/ehea_phyp.c
+++ b/drivers/net/ehea/ehea_phyp.c
@@ -214,7 +214,7 @@ u64 ehea_h_alloc_resource_qp(const u64 adapter_handle,
 			     u64 *qp_handle, struct h_epas *h_epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	u64 allocate_controls =
 	    EHEA_BMASK_SET(H_ALL_RES_QP_EQPO, init_attr->low_lat_rq1 ? 1 : 0)
@@ -312,7 +312,7 @@ u64 ehea_h_alloc_resource_cq(const u64 adapter_handle,
 			     u64 *cq_handle, struct h_epas *epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -374,7 +374,7 @@ u64 ehea_h_alloc_resource_eq(const u64 adapter_handle,
 			     struct ehea_eq_attr *eq_attr, u64 *eq_handle)
 {
 	u64 hret, allocate_controls;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	/* resource type */
 	allocate_controls =
@@ -407,7 +407,7 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u8 cat,
 			  u16 *out_swr, u16 *out_rwr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_MODIFY_HEA_QP,
 				 outs,
@@ -449,7 +449,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 			struct ehea_mr *mr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_REGISTER_SMR,
 				 outs,
@@ -468,7 +468,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 
 u64 ehea_h_disable_and_get_hea(const u64 adapter_handle, const u64 qp_handle)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	return ehea_plpar_hcall9(H_DISABLE_AND_GET_HEA,
 				 outs,
@@ -493,7 +493,7 @@ u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
 			     const u32 pd, u64 *mr_handle, u32 *lkey)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -564,7 +564,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
 			    const u8 cb_cat, const u64 select_mask,
 			    void *cb_addr)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 	u64 port_info;
 	u64 arr_index = 0;
 	u64 cb_logaddr = virt_to_abs(cb_addr);
-- 
1.6.0.5

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] net/ehea: use consistant type
@ 2009-01-06  5:34           ` Stephen Rothwell
  0 siblings, 0 replies; 14+ messages in thread
From: Stephen Rothwell @ 2009-01-06  5:34 UTC (permalink / raw)
  To: David Miller; +Cc: tklein, linuxppc-dev, raisch, netdev, themann

ehea_plpar_hcall9() takes an "unsigned long" array to return its results,
so change the arrays we pass to it to match.  This is currently only
64 bit code, so the transformation is actually a noop, but because
ehea_plpar_hcall9() copies the values of registers into the array,
if this was ported to a 32 bit hypervisor interface "unsigned long"
would probably still be the correct type.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/net/ehea/ehea_phyp.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/ehea/ehea_phyp.c b/drivers/net/ehea/ehea_phyp.c
index 2a33a61..8fe9dca 100644
--- a/drivers/net/ehea/ehea_phyp.c
+++ b/drivers/net/ehea/ehea_phyp.c
@@ -214,7 +214,7 @@ u64 ehea_h_alloc_resource_qp(const u64 adapter_handle,
 			     u64 *qp_handle, struct h_epas *h_epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	u64 allocate_controls =
 	    EHEA_BMASK_SET(H_ALL_RES_QP_EQPO, init_attr->low_lat_rq1 ? 1 : 0)
@@ -312,7 +312,7 @@ u64 ehea_h_alloc_resource_cq(const u64 adapter_handle,
 			     u64 *cq_handle, struct h_epas *epas)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -374,7 +374,7 @@ u64 ehea_h_alloc_resource_eq(const u64 adapter_handle,
 			     struct ehea_eq_attr *eq_attr, u64 *eq_handle)
 {
 	u64 hret, allocate_controls;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	/* resource type */
 	allocate_controls =
@@ -407,7 +407,7 @@ u64 ehea_h_modify_ehea_qp(const u64 adapter_handle, const u8 cat,
 			  u16 *out_swr, u16 *out_rwr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_MODIFY_HEA_QP,
 				 outs,
@@ -449,7 +449,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 			struct ehea_mr *mr)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_REGISTER_SMR,
 				 outs,
@@ -468,7 +468,7 @@ u64 ehea_h_register_smr(const u64 adapter_handle, const u64 orig_mr_handle,
 
 u64 ehea_h_disable_and_get_hea(const u64 adapter_handle, const u64 qp_handle)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	return ehea_plpar_hcall9(H_DISABLE_AND_GET_HEA,
 				 outs,
@@ -493,7 +493,7 @@ u64 ehea_h_alloc_resource_mr(const u64 adapter_handle, const u64 vaddr,
 			     const u32 pd, u64 *mr_handle, u32 *lkey)
 {
 	u64 hret;
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 
 	hret = ehea_plpar_hcall9(H_ALLOC_HEA_RESOURCE,
 				 outs,
@@ -564,7 +564,7 @@ u64 ehea_h_modify_ehea_port(const u64 adapter_handle, const u16 port_num,
 			    const u8 cb_cat, const u64 select_mask,
 			    void *cb_addr)
 {
-	u64 outs[PLPAR_HCALL9_BUFSIZE];
+	unsigned long outs[PLPAR_HCALL9_BUFSIZE];
 	u64 port_info;
 	u64 arr_index = 0;
 	u64 cb_logaddr = virt_to_abs(cb_addr);
-- 
1.6.0.5

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistant type
  2009-01-06  5:34           ` Stephen Rothwell
@ 2009-01-06 18:47             ` David Miller
  -1 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2009-01-06 18:47 UTC (permalink / raw)
  To: sfr; +Cc: tklein, themann, linuxppc-dev, raisch, netdev

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Jan 2009 16:34:54 +1100

> ehea_plpar_hcall9() takes an "unsigned long" array to return its results,
> so change the arrays we pass to it to match.  This is currently only
> 64 bit code, so the transformation is actually a noop, but because
> ehea_plpar_hcall9() copies the values of registers into the array,
> if this was ported to a 32 bit hypervisor interface "unsigned long"
> would probably still be the correct type.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] net/ehea: use consistant type
@ 2009-01-06 18:47             ` David Miller
  0 siblings, 0 replies; 14+ messages in thread
From: David Miller @ 2009-01-06 18:47 UTC (permalink / raw)
  To: sfr; +Cc: tklein, linuxppc-dev, raisch, netdev, themann

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Tue, 6 Jan 2009 16:34:54 +1100

> ehea_plpar_hcall9() takes an "unsigned long" array to return its results,
> so change the arrays we pass to it to match.  This is currently only
> 64 bit code, so the transformation is actually a noop, but because
> ehea_plpar_hcall9() copies the values of registers into the array,
> if this was ported to a 32 bit hypervisor interface "unsigned long"
> would probably still be the correct type.
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Applied.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-01-06 18:47 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-31  3:17 [PATCH] net/ehea: use consistent type Stephen Rothwell
2008-12-31  3:17 ` Stephen Rothwell
2008-12-31  5:51 ` David Miller
2008-12-31  5:51   ` David Miller
2008-12-31  9:09   ` Benjamin Herrenschmidt
2008-12-31  9:09     ` Benjamin Herrenschmidt
2009-01-06  0:05     ` Stephen Rothwell
2009-01-06  0:05       ` Stephen Rothwell
2009-01-06  0:19       ` David Miller
2009-01-06  0:19         ` David Miller
2009-01-06  5:34         ` [PATCH] net/ehea: use consistant type Stephen Rothwell
2009-01-06  5:34           ` Stephen Rothwell
2009-01-06 18:47           ` David Miller
2009-01-06 18:47             ` David Miller

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.