Subject: Re: [Cbe-oss-dev] [PATCH] cell: abstract spu management routines

From: Geoff Levand <[email-masked]>
Date: Tue, 07 Nov 2006 21:24:28 -0800

Michael Ellerman wrote:
>> +static struct platform_data *platform_data(struct spu *spu)
>> +{
>> +	BUG_ON(!spu->platform_data);
>> +	return (struct platform_data*)spu->platform_data;
>> +}
> 
> I don't see the point of this, why not just grab platform data directly?

Well, first, it does a check, and second, you can't just grab platform_data,
you need to always do the cast also. So then, is something like
'((struct platform_data*)spu->platform_data)->' preferred over
'platform_data(spu)->'?

-Geoff