* [PATCH v1] perf intel-pt: cleanup unneeded return variable in intel_pt_text_poke()
@ 2024-11-21 10:00 guanjing
2024-11-21 10:18 ` Adrian Hunter
0 siblings, 1 reply; 3+ messages in thread
From: guanjing @ 2024-11-21 10:00 UTC (permalink / raw)
To: peterz, mingo, acme, namhyung, mark.rutland, alexander.shishkin,
jolsa, irogers, adrian.hunter, algonell
Cc: linux-perf-users, linux-kernel, guanjing
Removed Unneeded variable: "ret"
Fixes: 0dd5041c9a0e ("perf addr_location: Add init/exit/copy functions")
Signed-off-by: guanjing <guanjing@cmss.chinamobile.com>
---
tools/perf/util/intel-pt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
index 30be6dfe09eb..6c0234acc669 100644
--- a/tools/perf/util/intel-pt.c
+++ b/tools/perf/util/intel-pt.c
@@ -3402,7 +3402,6 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
struct machine *machine = pt->machine;
struct intel_pt_cache_entry *e;
u64 offset;
- int ret = 0;
addr_location__init(&al);
if (!event->text_poke.new_len)
@@ -3443,7 +3442,7 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
}
out:
addr_location__exit(&al);
- return ret;
+ return 0;
}
static int intel_pt_process_event(struct perf_session *session,
--
2.33.0
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1] perf intel-pt: cleanup unneeded return variable in intel_pt_text_poke()
2024-11-21 10:00 [PATCH v1] perf intel-pt: cleanup unneeded return variable in intel_pt_text_poke() guanjing
@ 2024-11-21 10:18 ` Adrian Hunter
2024-11-21 10:31 ` [PATCH v1] perf intel-pt: cleanup unneeded return variable inintel_pt_text_poke() guanjing
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2024-11-21 10:18 UTC (permalink / raw)
To: guanjing, peterz, mingo, acme, namhyung, mark.rutland,
alexander.shishkin, jolsa, irogers, algonell
Cc: linux-perf-users, linux-kernel
On 21/11/24 12:00, guanjing wrote:
> Removed Unneeded variable: "ret"
>
> Fixes: 0dd5041c9a0e ("perf addr_location: Add init/exit/copy functions")
A Fixes tag is not for patches that don't fix some functionality.
> Signed-off-by: guanjing <guanjing@cmss.chinamobile.com>
> ---
> tools/perf/util/intel-pt.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
> index 30be6dfe09eb..6c0234acc669 100644
> --- a/tools/perf/util/intel-pt.c
> +++ b/tools/perf/util/intel-pt.c
> @@ -3402,7 +3402,6 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
> struct machine *machine = pt->machine;
> struct intel_pt_cache_entry *e;
> u64 offset;
> - int ret = 0;
>
> addr_location__init(&al);
> if (!event->text_poke.new_len)
> @@ -3443,7 +3442,7 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
> }
> out:
> addr_location__exit(&al);
> - return ret;
> + return 0;
Should just drop the return value entirely, since it is
always zero.
> }
>
> static int intel_pt_process_event(struct perf_session *session,
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v1] perf intel-pt: cleanup unneeded return variable inintel_pt_text_poke()
2024-11-21 10:18 ` Adrian Hunter
@ 2024-11-21 10:31 ` guanjing
0 siblings, 0 replies; 3+ messages in thread
From: guanjing @ 2024-11-21 10:31 UTC (permalink / raw)
To: Adrian Hunter, peterz, mingo, acme, namhyung, mark.rutland,
alexander.shishkin, jolsa, irogers, algonell
Cc: linux-perf-users, linux-kernel
Thank you for clarifying the proper usage of the Fixes tag. I understand
now that it should only be applied when there is an actual fix to
functionality. I will ensure to use it correctly in future submissions.
Thanks a lot!
On 2024/11/21 18:18, Adrian Hunter wrote:
> On 21/11/24 12:00, guanjing wrote:
>> Removed Unneeded variable: "ret"
>>
>> Fixes: 0dd5041c9a0e ("perf addr_location: Add init/exit/copy functions")
> A Fixes tag is not for patches that don't fix some functionality.
>
>> Signed-off-by: guanjing <guanjing@cmss.chinamobile.com>
>> ---
>> tools/perf/util/intel-pt.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/tools/perf/util/intel-pt.c b/tools/perf/util/intel-pt.c
>> index 30be6dfe09eb..6c0234acc669 100644
>> --- a/tools/perf/util/intel-pt.c
>> +++ b/tools/perf/util/intel-pt.c
>> @@ -3402,7 +3402,6 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
>> struct machine *machine = pt->machine;
>> struct intel_pt_cache_entry *e;
>> u64 offset;
>> - int ret = 0;
>>
>> addr_location__init(&al);
>> if (!event->text_poke.new_len)
>> @@ -3443,7 +3442,7 @@ static int intel_pt_text_poke(struct intel_pt *pt, union perf_event *event)
>> }
>> out:
>> addr_location__exit(&al);
>> - return ret;
>> + return 0;
> Should just drop the return value entirely, since it is
> always zero.
>
>> }
>>
>> static int intel_pt_process_event(struct perf_session *session,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-21 10:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-21 10:00 [PATCH v1] perf intel-pt: cleanup unneeded return variable in intel_pt_text_poke() guanjing
2024-11-21 10:18 ` Adrian Hunter
2024-11-21 10:31 ` [PATCH v1] perf intel-pt: cleanup unneeded return variable inintel_pt_text_poke() guanjing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®