All of lore.kernel.org
 help / color / mirror / Atom feed
From: Beniamino Galvani <b.galvani@gmail.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: qemu-devel@nongnu.org, dslutz@verizon.com
Subject: Re: [Qemu-devel] [PATCH for-2.1 v2 1/2] util/fifo: s/fifo8/fifo globally
Date: Tue, 8 Apr 2014 20:48:22 +0200	[thread overview]
Message-ID: <20140408184752.GA26832@gmail.com> (raw)
In-Reply-To: <9f15fe897a39d96ae1422ce4de63491e9e61d264.1396920202.git.peter.crosthwaite@xilinx.com>

On Mon, Apr 07, 2014 at 07:04:43PM -0700, Peter Crosthwaite wrote:
> This prepares support for generalising FIFO support to more integer
> widths.
> 
> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
> 
> [...]
>
> --- a/include/qemu/fifo8.h
> +++ b/include/qemu/fifo.h
> @@ -9,102 +9,103 @@ typedef struct {
>      uint32_t capacity;
>      uint32_t head;
>      uint32_t num;
> -} Fifo8;
> +} Fifo;
>  
>  /**
> - * fifo8_create:
> - * @fifo: struct Fifo8 to initialise with new FIFO
> + * fifo_create:
> + * @fifo: struct Fifo to initialise with new FIFO
>   * @capacity: capacity of the newly created FIFO
>   *
> - * Create a FIFO of the specified size. Clients should call fifo8_destroy()
> + * Create a FIFO of the specified size. Clients should call fifo_destroy()
>   * when finished using the fifo. The FIFO is initially empty.
>   */
>  
> -void fifo8_create(Fifo8 *fifo, uint32_t capacity);
> +void fifo_create(Fifo *fifo, uint32_t capacity);
>  
>  /**
> - * fifo8_destroy:
> + * fifo_destroy:
>   * @fifo: FIFO to cleanup
>   *
> - * Cleanup a FIFO created with fifo8_create(). Frees memory created for FIFO
> + * Cleanup a FIFO created with fifo_create(). Frees memory created for FIFO
>    *storage. The FIFO is no longer usable after this has been called.
>   */
>  
> -void fifo8_destroy(Fifo8 *fifo);
> +void fifo_destroy(Fifo *fifo);
>  
>  /**
> - * fifo8_push:
> + * fifo_push:
>   * @fifo: FIFO to push to
> - * @data: data byte to push
> + * @data: data value to push
>   *
> - * Push a data byte to the FIFO. Behaviour is undefined if the FIFO is full.
> - * Clients are responsible for checking for fullness using fifo8_is_full().
> + * Push a data value to the FIFO. Behaviour is undefined if the FIFO is full.
> + * Clients are responsible for checking for fullness using fifo_is_full().
>   */
>  
> -void fifo8_push(Fifo8 *fifo, uint8_t data);
> +void fifo_push(Fifo *fifo, uint8_t data);
>  
>  /**
> - * fifo8_push_all:
> + * fifo_push_all:
>   * @fifo: FIFO to push to
>   * @data: data to push
> - * @size: number of bytes to push
> + * @size: number of entries to push
>   *
> - * Push a byte array to the FIFO. Behaviour is undefined if the FIFO is full.
> + * Push a buffer to the FIFO. Behaviour is undefined if the FIFO is full.
>   * Clients are responsible for checking the space left in the FIFO using
> - * fifo8_num_free().
> + * fifo_num_free().
>   */
>  
> -void fifo8_push_all(Fifo8 *fifo, const uint8_t *data, uint32_t num);
> +void fifo_push_all(Fifo *fifo, const uint8_t *data, uint32_t num);
>  
>  /**
> - * fifo8_pop:
> + * fifo_pop:
>   * @fifo: fifo to pop from
>   *
> - * Pop a data byte from the FIFO. Behaviour is undefined if the FIFO is empty.
> - * Clients are responsible for checking for emptyness using fifo8_is_empty().
> + * Pop a data value from the FIFO. Behaviour is undefined if the FIFO is empty.
> + * Clients are responsible for checking for emptyness using fifo_is_empty().
>   *
> - * Returns: The popped data byte.
> + * Returns: The popped data value.
>   */
>  
> -uint8_t fifo8_pop(Fifo8 *fifo);
> +uint8_t fifo_pop(Fifo *fifo);
>  
>  /**
> - * fifo8_pop_buf:
> + * fifo_pop_buf:
>   * @fifo: FIFO to pop from
>   * @max: maximum number of bytes to pop
>   * @num: actual number of returned bytes

Perhaps these and the remaining occurrences of 'bytes' should be
replaced as well.

Otherwise:

Reviewed-by: Beniamino Galvani <b.galvani@gmail.com>

  reply	other threads:[~2014-04-08 18:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-08  2:04 [Qemu-devel] [PATCH for-2.1 v2 0/2] Generalise FIFO to more integer types Peter Crosthwaite
2014-04-08  2:04 ` [Qemu-devel] [PATCH for-2.1 v2 1/2] util/fifo: s/fifo8/fifo globally Peter Crosthwaite
2014-04-08 18:48   ` Beniamino Galvani [this message]
2014-04-09  1:50     ` Peter Crosthwaite
2014-04-08  2:05 ` [Qemu-devel] [PATCH for-2.1 v2 2/2] util/fifo: Generalise for common integer widths Peter Crosthwaite
2014-04-08 21:42   ` Beniamino Galvani
2014-04-09  1:51     ` Peter Crosthwaite
2014-04-08  7:14 ` [Qemu-devel] [PATCH for-2.1 v2 0/2] Generalise FIFO to more integer types Markus Armbruster
2014-04-08  7:24   ` Peter Crosthwaite
2014-04-08  9:10     ` Markus Armbruster
2014-04-08 21:22       ` Don Slutz
2014-04-09  0:03         ` Peter Crosthwaite

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140408184752.GA26832@gmail.com \
    --to=b.galvani@gmail.com \
    --cc=dslutz@verizon.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.