[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160715033236.GH9347@obsidianresearch.com>
Date: Thu, 14 Jul 2016 21:32:36 -0600
From: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To: Andrey Pronin <apronin@...omium.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
Peter Huewe <peterhuewe@....de>,
Marcel Selhorst <tpmdd@...horst.net>,
tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org,
groeck@...omium.org, smbarber@...omium.org, dianders@...omium.org,
Christophe Ricard <christophe.ricard@...il.com>
Subject: Re: [PATCH 2/2] tpm: add driver for cr50 on SPI
On Thu, Jul 14, 2016 at 07:20:18PM -0700, Andrey Pronin wrote:
> +static int cr50_spi_read16(struct tpm_tis_data *data, u32 addr, u16 *result)
> +{
> + int rc;
> +
> + rc = data->phy_ops->read_bytes(data, addr, sizeof(u16), (u8 *)result);
> + if (!rc)
> + *result = le16_to_cpu(*result);
> + return rc;
> +}
I thought we had core support for this pattern?
Christophe ?
Please change this so this code isn't duplicated.
Jason
Powered by blists - more mailing lists