[PATCH linux dev-4.10 v3 11/31] drivers: fsi: sbefifo: Fix module authors and comments
Andrew Jeffery
andrew at aj.id.au
Fri Oct 6 09:14:26 AEDT 2017
On Thu, 2017-10-05 at 14:24 -0500, Eddie James wrote:
> From: "Edward A. James" <eajames at us.ibm.com>
>
> Clarify the xfr situation in write() and fix module authors
>
> Signed-off-by: Edward A. James <eajames at us.ibm.com>
Reviewed-by: Andrew Jeffery <andrew at aj.id.au>
> ---
> drivers/fsi/fsi-sbefifo.c | 12 +++++++-----
> 1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/fsi/fsi-sbefifo.c b/drivers/fsi/fsi-sbefifo.c
> index 0ff5209..a2acf76 100644
> --- a/drivers/fsi/fsi-sbefifo.c
> +++ b/drivers/fsi/fsi-sbefifo.c
> @@ -655,7 +655,7 @@ static ssize_t sbefifo_write_common(struct sbefifo_client *client,
> n = sbefifo_buf_nbwriteable(&client->wbuf);
>
> spin_lock_irq(&sbefifo->lock);
> - xfr = sbefifo_next_xfr(sbefifo);
> + xfr = sbefifo_next_xfr(sbefifo); /* next xfr to be executed */
>
> if ((client->f_flags & O_NONBLOCK) && xfr && n < len) {
> spin_unlock_irq(&sbefifo->lock);
> @@ -663,7 +663,7 @@ static ssize_t sbefifo_write_common(struct sbefifo_client *client,
> goto out;
> }
>
> - xfr = sbefifo_enq_xfr(client);
> + xfr = sbefifo_enq_xfr(client); /* this xfr queued up */
> if (!xfr) {
> spin_unlock_irq(&sbefifo->lock);
> ret = -ENOMEM;
> @@ -719,8 +719,9 @@ static ssize_t sbefifo_write_common(struct sbefifo_client *client,
> len -= n;
> ret += n;
>
> - /* set flag before starting the worker, as it may run through
> - * and check the flag before we exit this loop!
> + /*
> + * Set this before starting timer to avoid race condition on
> + * this flag with the timer function writer.
> */
> if (!len)
> set_bit(SBEFIFO_XFR_WRITE_DONE, &xfr->flags);
> @@ -955,4 +956,5 @@ static void sbefifo_exit(void)
> module_exit(sbefifo_exit);
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Brad Bishop <bradleyb at fuzziesquirrel.com>");
> -MODULE_DESCRIPTION("Linux device interface to the POWER self boot engine");
> +MODULE_AUTHOR("Eddie James <eajames at linux.vnet.ibm.com>");
> +MODULE_DESCRIPTION("Linux device interface to the POWER Self Boot Engine");
-------------- 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/5bea62fb/attachment.sig>
More information about the openbmc
mailing list