I disagree that this style is more readable.  It's hard to see the
definitions when they are stacked like this.  Having the comments on the
right makes it very clear what they are associated with and doesn't obscure
the variables.  This sort of stylistic change really has nothing to do with
the overall intent of this patch series, which is just to rename user_data
to user_area.

On Thu, Apr 23, 2015 at 7:23 AM, Petri Savolainen <
petri.savolai...@nokia.com> wrote:

> Moved comments into separate lines for better readability (more
> chars per line).
>
> Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com>
> ---
>  include/odp/api/pool.h | 55
> ++++++++++++++++++++++++--------------------------
>  1 file changed, 26 insertions(+), 29 deletions(-)
>
> diff --git a/include/odp/api/pool.h b/include/odp/api/pool.h
> index 9dd2593..f8555cc 100644
> --- a/include/odp/api/pool.h
> +++ b/include/odp/api/pool.h
> @@ -47,45 +47,42 @@ extern "C" {
>  typedef struct odp_pool_param_t {
>         union {
>                 struct {
> -                       uint32_t num;   /**< Number of buffers in the pool
> */
> -                       uint32_t size;  /**< Buffer size in bytes.  The
> -                                            maximum number of bytes
> -                                            application will store in each
> -                                            buffer. */
> -                       uint32_t align; /**< Minimum buffer alignment in
> bytes.
> -                                            Valid values are powers of
> two.
> -                                            Use 0 for default alignment.
> -                                            Default will always be a
> multiple
> -                                            of 8. */
> +                       /** Number of buffers in the pool */
> +                       uint32_t num;
> +                       /** Buffer size in bytes. The maximum number of
> bytes
> +                           application will store in each buffer. */
> +                       uint32_t size;
> +                       /** Minimum buffer alignment in bytes. Valid
> values are
> +                           powers of two. Use 0 for default alignment.
> +                           Default will always be a multiple of 8. */
> +                       uint32_t align;
>                 } buf;
>                 struct {
> -                       uint32_t num;       /**< The number of packets
> that the
> -                                                pool must provide that are
> -                                                packet length 'len' bytes
> or
> -                                                smaller. */
> -                       uint32_t len;       /**< Minimum packet length
> that the
> -                                                pool must provide 'num'
> -                                                packets. The number of
> packets
> -                                                may be less than 'num'
> when
> -                                                packets are larger than
> 'len'.
> -                                                Use 0 for default.
> -                                            */
> -                       uint32_t seg_len;   /**< Minimum number of packet
> data
> -                                                bytes that are stored in
> the
> -                                                first segment of a packet.
> -                                                The maximum value is
> defined by
> -
> ODP_CONFIG_PACKET_SEG_LEN_MAX.
> -                                                Use 0 for default. */
> +                       /** The number of packets that the pool must
> provide
> +                           that are packet length 'len' bytes or smaller.
> */
> +                       uint32_t num;
> +                       /** Minimum packet length that the pool must
> provide
> +                           'num' packets. The number of packets may be
> less
> +                           than 'num' when packets are larger than 'len'.
> +                           Use 0 for default. */
> +                       uint32_t len;
> +                       /** Minimum number of packet data bytes that are
> stored
> +                           in the first segment of a packet. The maximum
> value
> +                           is defined by ODP_CONFIG_PACKET_SEG_LEN_MAX.
> +                           Use 0 for default. */
> +                       uint32_t seg_len;
>                         /** User area size in bytes. Specify as 0 if no
> user
>                             area is needed. */
>                         uint32_t uarea_size;
>                 } pkt;
>                 struct {
> -                       uint32_t num;    /**< Number of timeouts in the
> pool */
> +                       /** Number of timeouts in the pool */
> +                       uint32_t num;
>                 } tmo;
>         };
>
> -       int type;  /**< Pool type */
> +       /** Pool type */
> +       int type;
>  } odp_pool_param_t;
>
>  /** Packet pool*/
> --
> 2.3.5
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
>
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to