Re: [PATCH] Add TPM hardware enablement driver
From: Alexey Dobriyan
Date: Thu Mar 10 2005 - 15:16:33 EST
On Thursday 10 March 2005 02:42, Greg KH wrote:
> [PATCH] Add TPM hardware enablement driver
> +static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
> + size_t bufsiz)
> +{
> + u32 count;
> + __be32 *native_size;
> +
> + native_size = (__force __be32 *) (buf + 2);
> + count = be32_to_cpu(*native_size);
__force in a driver?
count = be32_to_cpup((__be32 *) (buf + 2));
should be enough. Once done you can remove "native_size".
> +static int tpm_atml_recv(struct tpm_chip *chip, u8 * buf, size_t count)
> +{
> + u32 size;
> + __be32 *native_size;
> + /* size of the data received */
> + native_size = (__force __be32 *) (hdr + 2);
> + size = be32_to_cpu(*native_size);
> +static int tpm_nsc_recv(struct tpm_chip *chip, u8 * buf, size_t count)
> +{
> + u32 size;
> + __be32 *native_size;
> + native_size = (__force __be32 *) (buf + 2);
> + size = be32_to_cpu(*native_size);
Same story.
Alexey
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/