diff mbox

[ODP/PATCH] Timer build fix

Message ID 1394800061-25821-1-git-send-email-santosh.shukla@linaro.org
State Accepted, archived
Commit 1f69b88514b2a3d7664db351fe909d8fd213e274
Headers show

Commit Message

Santosh Shukla March 14, 2014, 12:27 p.m. UTC
From: santosh shukla <santosh.shukla@linaro.org>

v2 titled patch "Timer-implementation-first-draft.patch"
missed out while merging that lead to build break.

| source/odp_timer.c: In function 'odp_timer_absolute_tmo':
| source/odp_timer.c:253:9: error: cast from pointer to integer
	of different size [-Werror=pointer-to-int-cast]
|   return (odp_timer_tmo_t) new_tmo;

this patch is diff of v1 vs v2 patch..Keeping original original
author v2 header copied from lng-odp list for reference.

commit 9258e038fca5f51c161d2dffc279569ffe99d02a
Author: Petri Savolainen <petri.savolainen@linaro.org>
Date:   Tue Mar 11 16:11:40 2014 +0200

    Timer implementation first draft

    Very simple implementation. Does not implement cancel_tmo. Test included into example app.

    Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
---
 include/odp_timer.h                       |    2 +-
 platform/linux-generic/source/odp_timer.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Santosh Shukla March 14, 2014, 1:05 p.m. UTC | #1
Hi Petri,

As discussed on private mail thread, If you are ok with this patch,
then I'll merge them right away. Sorry all for extra patch.

Thanks.

On 14 March 2014 17:57, Santosh Shukla <santosh.shukla@linaro.org> wrote:
> From: santosh shukla <santosh.shukla@linaro.org>
>
> v2 titled patch "Timer-implementation-first-draft.patch"
> missed out while merging that lead to build break.
>
> | source/odp_timer.c: In function 'odp_timer_absolute_tmo':
> | source/odp_timer.c:253:9: error: cast from pointer to integer
>         of different size [-Werror=pointer-to-int-cast]
> |   return (odp_timer_tmo_t) new_tmo;
>
> this patch is diff of v1 vs v2 patch..Keeping original original
> author v2 header copied from lng-odp list for reference.
>
> commit 9258e038fca5f51c161d2dffc279569ffe99d02a
> Author: Petri Savolainen <petri.savolainen@linaro.org>
> Date:   Tue Mar 11 16:11:40 2014 +0200
>
>     Timer implementation first draft
>
>     Very simple implementation. Does not implement cancel_tmo. Test included into example app.
>
>     Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>
>
> Signed-off-by: santosh shukla <santosh.shukla@linaro.org>
> ---
>  include/odp_timer.h                       |    2 +-
>  platform/linux-generic/source/odp_timer.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/odp_timer.h b/include/odp_timer.h
> index f051f71..0b6dc51 100644
> --- a/include/odp_timer.h
> +++ b/include/odp_timer.h
> @@ -35,7 +35,7 @@ typedef uint32_t odp_timer_t;
>  /**
>  * ODP timeout handle
>  */
> -typedef uint64_t odp_timer_tmo_t;
> +typedef odp_buffer_t odp_timer_tmo_t;
>
>  #define ODP_TIMER_TMO_INVALID 0
>
> diff --git a/platform/linux-generic/source/odp_timer.c b/platform/linux-generic/source/odp_timer.c
> index fceb086..4bcc479 100644
> --- a/platform/linux-generic/source/odp_timer.c
> +++ b/platform/linux-generic/source/odp_timer.c
> @@ -250,7 +250,7 @@ odp_timer_tmo_t odp_timer_absolute_tmo(odp_timer_t timer, uint64_t tmo_tick,
>
>         add_tmo(&odp_timer.timer[id].tick[tick], new_tmo);
>
> -       return (odp_timer_tmo_t) new_tmo;
> +       return tmo_buf;
>  }
>
>
> --
> 1.7.9.5
>
Petri Savolainen March 14, 2014, 1:09 p.m. UTC | #2
It's OK.

-Petri

On Friday, 14 March 2014 15:05:51 UTC+2, Santosh Shukla wrote:
>
> Hi Petri, 
>
> As discussed on private mail thread, If you are ok with this patch, 
> then I'll merge them right away. Sorry all for extra patch. 
>
> Thanks. 
>
> On 14 March 2014 17:57, Santosh Shukla <santosh...@linaro.org<javascript:>> 
> wrote: 
> > From: santosh shukla <santosh...@linaro.org <javascript:>> 
> > 
> > v2 titled patch "Timer-implementation-first-draft.patch" 
> > missed out while merging that lead to build break. 
> > 
> > | source/odp_timer.c: In function 'odp_timer_absolute_tmo': 
> > | source/odp_timer.c:253:9: error: cast from pointer to integer 
> >         of different size [-Werror=pointer-to-int-cast] 
> > |   return (odp_timer_tmo_t) new_tmo; 
> > 
> > this patch is diff of v1 vs v2 patch..Keeping original original 
> > author v2 header copied from lng-odp list for reference. 
> > 
> > commit 9258e038fca5f51c161d2dffc279569ffe99d02a 
> > Author: Petri Savolainen <petri.sa...@linaro.org <javascript:>> 
> > Date:   Tue Mar 11 16:11:40 2014 +0200 
> > 
> >     Timer implementation first draft 
> > 
> >     Very simple implementation. Does not implement cancel_tmo. Test 
> included into example app. 
> > 
> >     Signed-off-by: Petri Savolainen <petri.sa...@linaro.org<javascript:>> 
>
> > 
> > Signed-off-by: santosh shukla <santosh...@linaro.org <javascript:>> 
> > --- 
> >  include/odp_timer.h                       |    2 +- 
> >  platform/linux-generic/source/odp_timer.c |    2 +- 
> >  2 files changed, 2 insertions(+), 2 deletions(-) 
> > 
> > diff --git a/include/odp_timer.h b/include/odp_timer.h 
> > index f051f71..0b6dc51 100644 
> > --- a/include/odp_timer.h 
> > +++ b/include/odp_timer.h 
> > @@ -35,7 +35,7 @@ typedef uint32_t odp_timer_t; 
> >  /** 
> >  * ODP timeout handle 
> >  */ 
> > -typedef uint64_t odp_timer_tmo_t; 
> > +typedef odp_buffer_t odp_timer_tmo_t; 
> > 
> >  #define ODP_TIMER_TMO_INVALID 0 
> > 
> > diff --git a/platform/linux-generic/source/odp_timer.c 
> b/platform/linux-generic/source/odp_timer.c 
> > index fceb086..4bcc479 100644 
> > --- a/platform/linux-generic/source/odp_timer.c 
> > +++ b/platform/linux-generic/source/odp_timer.c 
> > @@ -250,7 +250,7 @@ odp_timer_tmo_t odp_timer_absolute_tmo(odp_timer_t 
> timer, uint64_t tmo_tick, 
> > 
> >         add_tmo(&odp_timer.timer[id].tick[tick], new_tmo); 
> > 
> > -       return (odp_timer_tmo_t) new_tmo; 
> > +       return tmo_buf; 
> >  } 
> > 
> > 
> > -- 
> > 1.7.9.5 
> > 
>
Santosh Shukla March 14, 2014, 1:24 p.m. UTC | #3
Patch merged. Thanks.

On 14 March 2014 18:39, Petri Savolainen <petri.savolainen@linaro.org> wrote:
> It's OK.
>
> -Petri
>
>
> On Friday, 14 March 2014 15:05:51 UTC+2, Santosh Shukla wrote:
>>
>> Hi Petri,
>>
>> As discussed on private mail thread, If you are ok with this patch,
>> then I'll merge them right away. Sorry all for extra patch.
>>
>> Thanks.
>>
>> On 14 March 2014 17:57, Santosh Shukla <santosh...@linaro.org> wrote:
>> > From: santosh shukla <santosh...@linaro.org>
>> >
>> > v2 titled patch "Timer-implementation-first-draft.patch"
>> > missed out while merging that lead to build break.
>> >
>> > | source/odp_timer.c: In function 'odp_timer_absolute_tmo':
>> > | source/odp_timer.c:253:9: error: cast from pointer to integer
>> >         of different size [-Werror=pointer-to-int-cast]
>> > |   return (odp_timer_tmo_t) new_tmo;
>> >
>> > this patch is diff of v1 vs v2 patch..Keeping original original
>> > author v2 header copied from lng-odp list for reference.
>> >
>> > commit 9258e038fca5f51c161d2dffc279569ffe99d02a
>> > Author: Petri Savolainen <petri.sa...@linaro.org>
>> > Date:   Tue Mar 11 16:11:40 2014 +0200
>> >
>> >     Timer implementation first draft
>> >
>> >     Very simple implementation. Does not implement cancel_tmo. Test
>> > included into example app.
>> >
>> >     Signed-off-by: Petri Savolainen <petri.sa...@linaro.org>
>> >
>> > Signed-off-by: santosh shukla <santosh...@linaro.org>
>> > ---
>> >  include/odp_timer.h                       |    2 +-
>> >  platform/linux-generic/source/odp_timer.c |    2 +-
>> >  2 files changed, 2 insertions(+), 2 deletions(-)
>> >
>> > diff --git a/include/odp_timer.h b/include/odp_timer.h
>> > index f051f71..0b6dc51 100644
>> > --- a/include/odp_timer.h
>> > +++ b/include/odp_timer.h
>> > @@ -35,7 +35,7 @@ typedef uint32_t odp_timer_t;
>> >  /**
>> >  * ODP timeout handle
>> >  */
>> > -typedef uint64_t odp_timer_tmo_t;
>> > +typedef odp_buffer_t odp_timer_tmo_t;
>> >
>> >  #define ODP_TIMER_TMO_INVALID 0
>> >
>> > diff --git a/platform/linux-generic/source/odp_timer.c
>> > b/platform/linux-generic/source/odp_timer.c
>> > index fceb086..4bcc479 100644
>> > --- a/platform/linux-generic/source/odp_timer.c
>> > +++ b/platform/linux-generic/source/odp_timer.c
>> > @@ -250,7 +250,7 @@ odp_timer_tmo_t odp_timer_absolute_tmo(odp_timer_t
>> > timer, uint64_t tmo_tick,
>> >
>> >         add_tmo(&odp_timer.timer[id].tick[tick], new_tmo);
>> >
>> > -       return (odp_timer_tmo_t) new_tmo;
>> > +       return tmo_buf;
>> >  }
>> >
>> >
>> > --
>> > 1.7.9.5
>> >
diff mbox

Patch

diff --git a/include/odp_timer.h b/include/odp_timer.h
index f051f71..0b6dc51 100644
--- a/include/odp_timer.h
+++ b/include/odp_timer.h
@@ -35,7 +35,7 @@  typedef uint32_t odp_timer_t;
 /**
 * ODP timeout handle
 */
-typedef uint64_t odp_timer_tmo_t;
+typedef odp_buffer_t odp_timer_tmo_t;
 
 #define ODP_TIMER_TMO_INVALID 0
 
diff --git a/platform/linux-generic/source/odp_timer.c b/platform/linux-generic/source/odp_timer.c
index fceb086..4bcc479 100644
--- a/platform/linux-generic/source/odp_timer.c
+++ b/platform/linux-generic/source/odp_timer.c
@@ -250,7 +250,7 @@  odp_timer_tmo_t odp_timer_absolute_tmo(odp_timer_t timer, uint64_t tmo_tick,
 
 	add_tmo(&odp_timer.timer[id].tick[tick], new_tmo);
 
-	return (odp_timer_tmo_t) new_tmo;
+	return tmo_buf;
 }