linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 11/13] perf tools: replace mempcpy with memcpy
@ 2012-08-28 22:22 Irina Tirdea
  2012-09-03  1:09 ` Namhyung Kim
  2012-09-07  6:09 ` [tip:perf/core] perf tools: Replace " tip-bot for Irina Tirdea
  0 siblings, 2 replies; 6+ messages in thread
From: Irina Tirdea @ 2012-08-28 22:22 UTC (permalink / raw)
  To: Steven Rostedt, Arnaldo Carvalho de Melo, Ingo Molnar
  Cc: LKML, Namhyung Kim, Peter Zijlstra, Frederic Weisbecker

mempcpy is not supported by bionic in Android
and will lead to compilation errors.

Replacing mempcpy with memcpy so it will work in Android.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
---
 tools/perf/util/target.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 051eaa6..065528b 100644
--- a/tools/perf/util/target.c
+++ b/tools/perf/util/target.c
@@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target
*target, int errnum,

 		if (err != buf) {
 			size_t len = strlen(err);
-			char *c = mempcpy(buf, err, min(buflen - 1, len));
-			*c = '\0';
+			memcpy(buf, err, min(buflen - 1, len));
+			*(buf + min(buflen - 1, len)) = '\0';
 		}

 		return 0;
-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
  2012-08-28 22:22 [PATCH 11/13] perf tools: replace mempcpy with memcpy Irina Tirdea
@ 2012-09-03  1:09 ` Namhyung Kim
  2012-09-03 20:59   ` Irina Tirdea
  2012-09-07  6:09 ` [tip:perf/core] perf tools: Replace " tip-bot for Irina Tirdea
  1 sibling, 1 reply; 6+ messages in thread
From: Namhyung Kim @ 2012-09-03  1:09 UTC (permalink / raw)
  To: Irina Tirdea
  Cc: Steven Rostedt, Arnaldo Carvalho de Melo, Ingo Molnar, LKML,
	Peter Zijlstra, Frederic Weisbecker

On Wed, 29 Aug 2012 01:22:16 +0300, Irina Tirdea wrote:
> mempcpy is not supported by bionic in Android
> and will lead to compilation errors.
>
> Replacing mempcpy with memcpy so it will work in Android.

Unfortunately I've added another instance of the mempcpy in a
libtraceevent code. :-/

Thanks,
Namhyung


>
> Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
> ---
>  tools/perf/util/target.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
> index 051eaa6..065528b 100644
> --- a/tools/perf/util/target.c
> +++ b/tools/perf/util/target.c
> @@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target
> *target, int errnum,
>
>  		if (err != buf) {
>  			size_t len = strlen(err);
> -			char *c = mempcpy(buf, err, min(buflen - 1, len));
> -			*c = '\0';
> +			memcpy(buf, err, min(buflen - 1, len));
> +			*(buf + min(buflen - 1, len)) = '\0';
>  		}
>
>  		return 0;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
  2012-09-03  1:09 ` Namhyung Kim
@ 2012-09-03 20:59   ` Irina Tirdea
  0 siblings, 0 replies; 6+ messages in thread
From: Irina Tirdea @ 2012-09-03 20:59 UTC (permalink / raw)
  To: Namhyung Kim
  Cc: Steven Rostedt, Arnaldo Carvalho de Melo, Ingo Molnar, LKML,
	Peter Zijlstra, Frederic Weisbecker

On Mon, Sep 3, 2012 at 4:09 AM, Namhyung Kim <namhyung@kernel.org> wrote:
> On Wed, 29 Aug 2012 01:22:16 +0300, Irina Tirdea wrote:
>> mempcpy is not supported by bionic in Android
>> and will lead to compilation errors.
>>
>> Replacing mempcpy with memcpy so it will work in Android.
>
> Unfortunately I've added another instance of the mempcpy in a
> libtraceevent code. :-/
>

Thanks for the heads-up. I'll fix it.

Irina

> Thanks,
> Namhyung
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip:perf/core] perf tools: Replace mempcpy with memcpy
  2012-08-28 22:22 [PATCH 11/13] perf tools: replace mempcpy with memcpy Irina Tirdea
  2012-09-03  1:09 ` Namhyung Kim
@ 2012-09-07  6:09 ` tip-bot for Irina Tirdea
  1 sibling, 0 replies; 6+ messages in thread
From: tip-bot for Irina Tirdea @ 2012-09-07  6:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: acme, linux-kernel, hpa, mingo, a.p.zijlstra, namhyung, fweisbec,
	rostedt, irina.tirdea, irina.tirdea, tglx

Commit-ID:  60ff92f515a4efb36931f1b5b042332016e0f123
Gitweb:     http://git.kernel.org/tip/60ff92f515a4efb36931f1b5b042332016e0f123
Author:     Irina Tirdea <irina.tirdea@gmail.com>
AuthorDate: Wed, 29 Aug 2012 01:22:16 +0300
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 5 Sep 2012 19:35:21 -0300

perf tools: Replace mempcpy with memcpy

mempcpy is not supported by bionic in Android and will lead to
compilation errors.

Replacing mempcpy with memcpy so it will work in Android.

Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/r/CANg8OW+Y3ZMG-GdhYu2_yKOYH_XEMgw73PdCX_23UTnfYhmttA@mail.gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/target.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
index 051eaa6..065528b 100644
--- a/tools/perf/util/target.c
+++ b/tools/perf/util/target.c
@@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target *target, int errnum,
 
 		if (err != buf) {
 			size_t len = strlen(err);
-			char *c = mempcpy(buf, err, min(buflen - 1, len));
-			*c = '\0';
+			memcpy(buf, err, min(buflen - 1, len));
+			*(buf + min(buflen - 1, len)) = '\0';
 		}
 
 		return 0;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
  2012-09-05 22:38 ` [PATCH 11/13] perf tools: replace " Arnaldo Carvalho de Melo
@ 2012-09-08  0:17   ` Irina Tirdea
  0 siblings, 0 replies; 6+ messages in thread
From: Irina Tirdea @ 2012-09-08  0:17 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Steven Rostedt, Ingo Molnar, LKML, Namhyung Kim, Peter Zijlstra,
	Frederic Weisbecker

>
> Can you resubmit this in txt form? I applied some other patches from you
> but  you need to try to do it yourself, i.e. send just to you, then try
> to save the patch and apply it...

Sorry about this... I will check this myself from now on.
I've seen you already merged this one, but I'll resubmit the others
and make sure they apply properly.

Thanks,
Irina

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 11/13] perf tools: replace mempcpy with memcpy
       [not found] <CANg8OWLDxZTrhJ-M2aeLdV-+y0VuGR+3iro179V=LLTeeQi_CA@mail.gmail.com>
@ 2012-09-05 22:38 ` Arnaldo Carvalho de Melo
  2012-09-08  0:17   ` Irina Tirdea
  0 siblings, 1 reply; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2012-09-05 22:38 UTC (permalink / raw)
  To: Irina Tirdea
  Cc: Steven Rostedt, Ingo Molnar, LKML, Namhyung Kim, Peter Zijlstra,
	Frederic Weisbecker

Em Wed, Aug 29, 2012 at 01:06:04AM +0300, Irina Tirdea escreveu:
>    mempcpy is not supported by bionic in Android
>    and will lead to compilation errors.
> 
>    Replacing mempcpy with memcpy so it will work in Android.
> 
>    Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
>    ---
>     tools/perf/util/target.c |    4 ++--
>     1 file changed, 2 insertions(+), 2 deletions(-)
> 
>    diff --git a/tools/perf/util/target.c b/tools/perf/util/target.c
>    index 051eaa6..065528b 100644
>    --- a/tools/perf/util/target.c
>    +++ b/tools/perf/util/target.c
>    @@ -117,8 +117,8 @@ int perf_target__strerror(struct perf_target *target,
>    int errnum,
>     
>             if (err != buf) {
>                 size_t len = strlen(err);
>    -            char *c = mempcpy(buf, err, min(buflen - 1, len));
>    -            *c = '\0';
>    +            memcpy(buf, err, min(buflen - 1, len));
>    +            *(buf + min(buflen - 1, len)) = '\0';
>             }
>     

Can you resubmit this in txt form? I applied some other patches from you
but  you need to try to do it yourself, i.e. send just to you, then try
to save the patch and apply it...

- Arnaldo

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-08  0:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-28 22:22 [PATCH 11/13] perf tools: replace mempcpy with memcpy Irina Tirdea
2012-09-03  1:09 ` Namhyung Kim
2012-09-03 20:59   ` Irina Tirdea
2012-09-07  6:09 ` [tip:perf/core] perf tools: Replace " tip-bot for Irina Tirdea
     [not found] <CANg8OWLDxZTrhJ-M2aeLdV-+y0VuGR+3iro179V=LLTeeQi_CA@mail.gmail.com>
2012-09-05 22:38 ` [PATCH 11/13] perf tools: replace " Arnaldo Carvalho de Melo
2012-09-08  0:17   ` Irina Tirdea

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).