On 02/17/2015 11:28 PM, Bala wrote:
Reviewed-by: Bala Manoharan < [email protected] <mailto:[email protected]>>
P.S: A similar patch was proposed earlier by Taras also.

Yes, somehow everybody skipped review of Tarases patch set.
In current patch there is small difference, Taras left:

+union cos_u;
+union pmr_u;

And I don't. That is not needed.

Maxim.

On 17-Feb-2015, at 11:06 pm, Mike Holmes <[email protected] <mailto:[email protected]>> wrote:



On 17 February 2015 at 12:20, Maxim Uvarov <[email protected] <mailto:[email protected]>> wrote:

    cos_t and pmr_t used only once, use union in that place
    to make clang happy.
    https://bugs.linaro.org/show_bug.cgi?id=1023

    Signed-off-by: Maxim Uvarov <[email protected]
    <mailto:[email protected]>>

Tested-by: Mike Holmes <[email protected] <mailto:[email protected]>>

    ---
     Note: did not test if clang error went away due to on my machine
    clang -k generates early warnings.


I applied my Static_assert patch that is on the list to clean up the noise first and then this patch and it fixed the bug 1023


     platform/linux-generic/include/odp_classification_datamodel.h |
    8 ++------
     1 file changed, 2 insertions(+), 6 deletions(-)

    diff --git
    a/platform/linux-generic/include/odp_classification_datamodel.h
    b/platform/linux-generic/include/odp_classification_datamodel.h
    index 3b42e99..83500b0 100644
    --- a/platform/linux-generic/include/odp_classification_datamodel.h
    +++ b/platform/linux-generic/include/odp_classification_datamodel.h
    @@ -47,9 +47,6 @@ extern "C" {
     /* Max PMR Term bits */
     #define ODP_PMR_TERM_BYTES_MAX         8

    -/* forward declaration */
    -typedef union pmr_u pmr_t;
    -
     /**
     Packet Matching Rule Term Value

    @@ -71,15 +68,14 @@ typedef struct pmr_term_value {
            };
     } pmr_term_value_t;

    -typedef union cos_u cos_t;
     /*
     Class Of Service
     */
     struct cos_s {
            queue_entry_t *queue;           /* Associated Queue */
            pool_entry_t *pool;             /* Associated Buffer pool */
    -       pmr_t *pmr;                     /* Chained PMR */
    -       cos_t *linked_cos;              /* CoS linked with the PMR */
    +       union pmr_u *pmr;               /* Chained PMR */
    +       union cos_u *linked_cos;        /* CoS linked with the PMR */
            uint32_t valid;                 /* validity Flag */
            odp_drop_e drop_policy;         /* Associated Drop Policy */
            odp_queue_group_t queue_group;  /* Associated Queue Group */
    --
    1.8.5.1.163.gd7aced9


    _______________________________________________
    lng-odp mailing list
    [email protected] <mailto:[email protected]>
    http://lists.linaro.org/mailman/listinfo/lng-odp




--
*Mike Holmes*
Linaro  Sr Technical Manager
LNG - ODP
_______________________________________________
lng-odp mailing list
[email protected] <mailto:[email protected]>
http://lists.linaro.org/mailman/listinfo/lng-odp


_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to