[PATCH linux dev-4.10 v3 21/31] drivers: fsi: occ: Switch to more logical errnos
Andrew Jeffery
andrew at aj.id.au
Fri Oct 6 10:09:40 AEDT 2017
On Thu, 2017-10-05 at 14:24 -0500, Eddie James wrote:
> From: "Edward A. James" <eajames at us.ibm.com>
>
> Signed-off-by: Edward A. James <eajames at us.ibm.com>
Acked-by: Andrew Jeffery <andrew at aj.id.au>
> ---
> drivers/fsi/occ.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/fsi/occ.c b/drivers/fsi/occ.c
> index 7ced9b6..4e677c6 100644
> --- a/drivers/fsi/occ.c
> +++ b/drivers/fsi/occ.c
> @@ -386,7 +386,7 @@ static int occ_write_sbefifo(struct
sbefifo_client *client, const char *buf,
> total += rc;
> } while (total < len);
>
> - return (total == len) ? 0 : -EMSGSIZE;
> + return (total == len) ? 0 : -ENOSPC;
> }
>
> static int occ_read_sbefifo(struct sbefifo_client *client, char
*buf,
> @@ -405,7 +405,7 @@ static int occ_read_sbefifo(struct sbefifo_client
*client, char *buf,
> total += rc;
> } while (total < len);
>
> - return (total == len) ? 0 : -EMSGSIZE;
> + return (total == len) ? 0 : -ENODATA;
> }
>
> static int occ_getsram(struct device *sbefifo, u32 address, u8
*data,
> @@ -450,7 +450,7 @@ static int occ_getsram(struct device *sbefifo,
u32 address, u8 *data,
> (be32_to_cpu(buf[1]) == 0xC0DEA403))
> memcpy(data, resp, len);
> else
> - rc = -EFAULT;
> + rc = -EBADMSG;
>
> free:
> kfree(resp);
> @@ -498,7 +498,7 @@ static int occ_putsram(struct device *sbefifo,
u32 address, u8 *data,
> /* check for good response */
> if ((be32_to_cpu(buf[0]) != data_len) ||
> (be32_to_cpu(buf[1]) != 0xC0DEA404))
> - rc = -EFAULT;
> + rc = -EBADMSG;
>
> done:
> sbefifo_drv_release(client);
> @@ -535,7 +535,7 @@ static int occ_trigger_attn(struct device
*sbefifo)
> /* check for good response */
> if ((be32_to_cpu(buf[0]) != 0xC0DEA202) ||
> (be32_to_cpu(buf[1]) & 0x0FFFFFFF))
> - rc = -EFAULT;
> + rc = -EBADMSG;
>
> done:
> sbefifo_drv_release(client);
> @@ -583,7 +583,7 @@ static void occ_worker(struct work_struct *work)
>
> resp_data_length = get_unaligned_be16(&resp->data_length);
> if (resp_data_length > OCC_RESP_DATA_BYTES) {
> - rc = -EDOM;
> + rc = -EMSGSIZE;
> goto done;
> }
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20171006/e5694059/attachment.sig>
More information about the openbmc
mailing list