[PATCH 11/16] powerpc: add ps3 platform repository support
Christoph Hellwig
hch at lst.de
Thu Nov 16 05:06:13 EST 2006
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.
More information about the Linuxppc-dev
mailing list