Message ID | 1424553147-19719-1-git-send-email-bill.fischofer@linaro.org |
---|---|
State | Accepted |
Commit | b52447ada6b8a96cd6982860a9a6345773e3df12 |
Headers | show |
On 21 February 2015 at 16:12, Bill Fischofer <bill.fischofer@linaro.org> wrote: > Remove obsolete debugging code to resolve Bug 1165 > listing bugs with URL makes it easier to cross check https://bugs.linaro.org/show_bug.cgi?id=1165 With that updated Reviewed-by: Mike Holmes <mike.holmes@linaro.org> > > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> > --- > platform/linux-generic/include/odp_buffer_inlines.h | 21 > +++------------------ > platform/linux-generic/include/odp_pool_internal.h | 4 ---- > 2 files changed, 3 insertions(+), 22 deletions(-) > > diff --git a/platform/linux-generic/include/odp_buffer_inlines.h > b/platform/linux-generic/include/odp_buffer_inlines.h > index 3ba3941..4a44c5f 100644 > --- a/platform/linux-generic/include/odp_buffer_inlines.h > +++ b/platform/linux-generic/include/odp_buffer_inlines.h > @@ -47,24 +47,9 @@ static inline odp_buffer_hdr_t > *odp_buf_to_hdr(odp_buffer_t buf) > struct pool_entry_s *pool; > > handle.handle = buf; > - pool_id = handle.pool_id; > - index = handle.index; > - > -#ifdef POOL_ERROR_CHECK > - if (odp_unlikely(pool_id > ODP_CONFIG_POOLS)) { > - ODP_ERR("odp_buf_to_hdr: Bad pool id\n"); > - return NULL; > - } > -#endif > - > - pool = get_pool_entry(pool_id); > - > -#ifdef POOL_ERROR_CHECK > - if (odp_unlikely(index > pool->params.num_bufs - 1)) { > - ODP_ERR("odp_buf_to_hdr: Bad buffer index\n"); > - return NULL; > - } > -#endif > + pool_id = handle.pool_id; > + index = handle.index; > + pool = get_pool_entry(pool_id); > > return (odp_buffer_hdr_t *)(void *) > (pool->pool_mdata_addr + (index * ODP_CACHE_LINE_SIZE)); > diff --git a/platform/linux-generic/include/odp_pool_internal.h > b/platform/linux-generic/include/odp_pool_internal.h > index 3d1497a..1b7906f 100644 > --- a/platform/linux-generic/include/odp_pool_internal.h > +++ b/platform/linux-generic/include/odp_pool_internal.h > @@ -61,10 +61,6 @@ typedef struct local_cache_t { > /* Use ticketlock instead of spinlock */ > #define POOL_USE_TICKETLOCK > > -/* Extra error checks */ > -/* #define POOL_ERROR_CHECK */ > - > - > #ifdef POOL_USE_TICKETLOCK > #include <odp/ticketlock.h> > #define POOL_LOCK(a) odp_ticketlock_lock(a) > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp >
Merged, Maxim. On 02/22/2015 01:20 AM, Mike Holmes wrote: > > > On 21 February 2015 at 16:12, Bill Fischofer > <bill.fischofer@linaro.org <mailto:bill.fischofer@linaro.org>> wrote: > > Remove obsolete debugging code to resolve Bug 1165 > > > listing bugs with URL makes it easier to cross check > https://bugs.linaro.org/show_bug.cgi?id=1165 > > With that updated Reviewed-by: Mike Holmes <mike.holmes@linaro.org > <mailto:mike.holmes@linaro.org>> > > > Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> > --- > platform/linux-generic/include/odp_buffer_inlines.h | 21 > +++------------------ > platform/linux-generic/include/odp_pool_internal.h | 4 ---- > 2 files changed, 3 insertions(+), 22 deletions(-) > > diff --git a/platform/linux-generic/include/odp_buffer_inlines.h > b/platform/linux-generic/include/odp_buffer_inlines.h > index 3ba3941..4a44c5f 100644 > --- a/platform/linux-generic/include/odp_buffer_inlines.h > +++ b/platform/linux-generic/include/odp_buffer_inlines.h > @@ -47,24 +47,9 @@ static inline odp_buffer_hdr_t > *odp_buf_to_hdr(odp_buffer_t buf) > struct pool_entry_s *pool; > > handle.handle = buf; > - pool_id = handle.pool_id; > - index = handle.index; > - > -#ifdef POOL_ERROR_CHECK > - if (odp_unlikely(pool_id > ODP_CONFIG_POOLS)) { > - ODP_ERR("odp_buf_to_hdr: Bad pool id\n"); > - return NULL; > - } > -#endif > - > - pool = get_pool_entry(pool_id); > - > -#ifdef POOL_ERROR_CHECK > - if (odp_unlikely(index > pool->params.num_bufs - 1)) { > - ODP_ERR("odp_buf_to_hdr: Bad buffer index\n"); > - return NULL; > - } > -#endif > + pool_id = handle.pool_id; > + index = handle.index; > + pool = get_pool_entry(pool_id); > > return (odp_buffer_hdr_t *)(void *) > (pool->pool_mdata_addr + (index * > ODP_CACHE_LINE_SIZE)); > diff --git a/platform/linux-generic/include/odp_pool_internal.h > b/platform/linux-generic/include/odp_pool_internal.h > index 3d1497a..1b7906f 100644 > --- a/platform/linux-generic/include/odp_pool_internal.h > +++ b/platform/linux-generic/include/odp_pool_internal.h > @@ -61,10 +61,6 @@ typedef struct local_cache_t { > /* Use ticketlock instead of spinlock */ > #define POOL_USE_TICKETLOCK > > -/* Extra error checks */ > -/* #define POOL_ERROR_CHECK */ > - > - > #ifdef POOL_USE_TICKETLOCK > #include <odp/ticketlock.h> > #define POOL_LOCK(a) odp_ticketlock_lock(a) > -- > 2.1.0 > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org> > http://lists.linaro.org/mailman/listinfo/lng-odp > > > > > -- > *Mike Holmes* > Linaro Sr Technical Manager > LNG - ODP > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > http://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/platform/linux-generic/include/odp_buffer_inlines.h b/platform/linux-generic/include/odp_buffer_inlines.h index 3ba3941..4a44c5f 100644 --- a/platform/linux-generic/include/odp_buffer_inlines.h +++ b/platform/linux-generic/include/odp_buffer_inlines.h @@ -47,24 +47,9 @@ static inline odp_buffer_hdr_t *odp_buf_to_hdr(odp_buffer_t buf) struct pool_entry_s *pool; handle.handle = buf; - pool_id = handle.pool_id; - index = handle.index; - -#ifdef POOL_ERROR_CHECK - if (odp_unlikely(pool_id > ODP_CONFIG_POOLS)) { - ODP_ERR("odp_buf_to_hdr: Bad pool id\n"); - return NULL; - } -#endif - - pool = get_pool_entry(pool_id); - -#ifdef POOL_ERROR_CHECK - if (odp_unlikely(index > pool->params.num_bufs - 1)) { - ODP_ERR("odp_buf_to_hdr: Bad buffer index\n"); - return NULL; - } -#endif + pool_id = handle.pool_id; + index = handle.index; + pool = get_pool_entry(pool_id); return (odp_buffer_hdr_t *)(void *) (pool->pool_mdata_addr + (index * ODP_CACHE_LINE_SIZE)); diff --git a/platform/linux-generic/include/odp_pool_internal.h b/platform/linux-generic/include/odp_pool_internal.h index 3d1497a..1b7906f 100644 --- a/platform/linux-generic/include/odp_pool_internal.h +++ b/platform/linux-generic/include/odp_pool_internal.h @@ -61,10 +61,6 @@ typedef struct local_cache_t { /* Use ticketlock instead of spinlock */ #define POOL_USE_TICKETLOCK -/* Extra error checks */ -/* #define POOL_ERROR_CHECK */ - - #ifdef POOL_USE_TICKETLOCK #include <odp/ticketlock.h> #define POOL_LOCK(a) odp_ticketlock_lock(a)
Remove obsolete debugging code to resolve Bug 1165 Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- platform/linux-generic/include/odp_buffer_inlines.h | 21 +++------------------ platform/linux-generic/include/odp_pool_internal.h | 4 ---- 2 files changed, 3 insertions(+), 22 deletions(-)