[PATCH 11/16] powerpc: add ps3 platform repository support

Michael Ellerman michael at ellerman.id.au
Thu Nov 16 11:12:54 EST 2006


On Wed, 2006-11-15 at 19:06 +0100, Christoph Hellwig wrote:
> On Fri, Nov 10, 2006 at 12:03:08PM -0800, Geoff Levand wrote:
> > + * make_first_field - Make the first field of a repository node name.
> > + * @text: Text portion of the field.
> > + * @index: Numeric index portion of the field.  Use zero for 'don't care'.
> > + *
> > + * This routine sets the vendor id to zero (non-vendor specific).
> > + * Returns field value.
> > + */
> > +
> > +static u64 make_first_field(const char *text, u64 index)
> > +{
> > +	u64 n;
> > +
> > +	strncpy((char *)&n, text, 8);
> > +	return ps3pf_vendor_id_none + (n >> 32) + index;
> > +}
> 
> a strncpy into a const pointer doesn't make any sense.

It's from a const pointer into a u64.

It still doesn't make any sense though .. crazy hypervisor weirdness.

cheers

-- 
Michael Ellerman
OzLabs, IBM Australia Development Lab

wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)

We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20061116/4f8253bb/attachment.pgp>


More information about the Linuxppc-dev mailing list