[patch 2/4 v2] PS3: Add logical performance monitor repository routines

Stephen Rothwell sfr at canb.auug.org.au
Wed Jan 9 18:15:01 EST 2008


On Tue, 08 Jan 2008 22:35:36 -0800 Geoff Levand <geoffrey.levand at am.sony.com> wrote:
>
> +int ps3_repository_read_num_pu(unsigned int *num_pu)
> +{
> +	int result;
> +	u64 v1;
> +
> +	v1 = 0;
> +	result = read_node(PS3_LPAR_ID_CURRENT,
> +			   make_first_field("bi", 0),
> +			   make_field("pun", 0),
> +			   0, 0,
> +			   &v1, NULL);
> +	*num_pu = v1;

Why not just pass "num_pu" instead of &v1 to read_node()?

> +int ps3_repository_read_pu_id(unsigned int pu_index, u64 *pu_id)
> +{
> +	int result;
> +	u64 v1;
> +
> +	v1 = 0;
> +	result = read_node(PS3_LPAR_ID_CURRENT,
> +		make_first_field("bi", 0),
> +		make_field("pu", pu_index),
> +		0, 0,
> +		&v1, NULL);
> +	*pu_id = v1;

Similarly with "pu_id"?

-- 
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: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20080109/315dcb47/attachment.pgp>


More information about the Linuxppc-dev mailing list