All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf dlfilter: Drop unused variable
@ 2021-11-23 21:18 Salvatore Bonaccorso
  2021-12-08 10:44 ` German Gomez
  0 siblings, 1 reply; 6+ messages in thread
From: Salvatore Bonaccorso @ 2021-11-23 21:18 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim
  Cc: linux-perf-users, linux-kernel, Salvatore Bonaccorso

Compiling tools/perf/dlfilters/dlfilter-test-api-v0.c result in:

	checking for stdlib.h... dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
	dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
	  311 |         struct filter_data *d = data;
	      |

So remove the  variable now.

Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
---
 tools/perf/dlfilters/dlfilter-test-api-v0.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/tools/perf/dlfilters/dlfilter-test-api-v0.c b/tools/perf/dlfilters/dlfilter-test-api-v0.c
index 7565a1852c74..b17eb52a0694 100644
--- a/tools/perf/dlfilters/dlfilter-test-api-v0.c
+++ b/tools/perf/dlfilters/dlfilter-test-api-v0.c
@@ -308,8 +308,6 @@ int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, vo
 
 int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
 {
-	struct filter_data *d = data;
-
 	pr_debug("%s API\n", __func__);
 
 	return do_checks(data, sample, ctx, false);
-- 
2.34.0


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

* Re: [PATCH] perf dlfilter: Drop unused variable
  2021-11-23 21:18 [PATCH] perf dlfilter: Drop unused variable Salvatore Bonaccorso
@ 2021-12-08 10:44 ` German Gomez
  2021-12-08 11:11   ` Salvatore Bonaccorso
  0 siblings, 1 reply; 6+ messages in thread
From: German Gomez @ 2021-12-08 10:44 UTC (permalink / raw)
  To: Salvatore Bonaccorso, Peter Zijlstra, Ingo Molnar,
	Arnaldo Carvalho de Melo, Mark Rutland, Alexander Shishkin,
	Jiri Olsa, Namhyung Kim
  Cc: linux-perf-users, linux-kernel


On 23/11/2021 21:18, Salvatore Bonaccorso wrote:
> Compiling tools/perf/dlfilters/dlfilter-test-api-v0.c result in:
>
> 	checking for stdlib.h... dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
> 	dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
> 	  311 |         struct filter_data *d = data;
> 	      |

Did you get this warning when issuing "make"? From my side, it generated
this gcc command so I didn't get it (make DEBUG=1):

  gcc -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c

Reviewed-by: German Gomez <german.gomez@arm.com>

Thanks,
German

>
> So remove the  variable now.
>
> Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
> ---
>  tools/perf/dlfilters/dlfilter-test-api-v0.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/tools/perf/dlfilters/dlfilter-test-api-v0.c b/tools/perf/dlfilters/dlfilter-test-api-v0.c
> index 7565a1852c74..b17eb52a0694 100644
> --- a/tools/perf/dlfilters/dlfilter-test-api-v0.c
> +++ b/tools/perf/dlfilters/dlfilter-test-api-v0.c
> @@ -308,8 +308,6 @@ int filter_event_early(void *data, const struct perf_dlfilter_sample *sample, vo
>  
>  int filter_event(void *data, const struct perf_dlfilter_sample *sample, void *ctx)
>  {
> -	struct filter_data *d = data;
> -
>  	pr_debug("%s API\n", __func__);
>  
>  	return do_checks(data, sample, ctx, false);

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

* Re: [PATCH] perf dlfilter: Drop unused variable
  2021-12-08 10:44 ` German Gomez
@ 2021-12-08 11:11   ` Salvatore Bonaccorso
  2021-12-09 19:20     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 6+ messages in thread
From: Salvatore Bonaccorso @ 2021-12-08 11:11 UTC (permalink / raw)
  To: German Gomez
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-perf-users, linux-kernel

Hi German,

On Wed, Dec 08, 2021 at 10:44:01AM +0000, German Gomez wrote:
> 
> On 23/11/2021 21:18, Salvatore Bonaccorso wrote:
> > Compiling tools/perf/dlfilters/dlfilter-test-api-v0.c result in:
> >
> > 	checking for stdlib.h... dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
> > 	dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
> > 	  311 |         struct filter_data *d = data;
> > 	      |
> 
> Did you get this warning when issuing "make"? From my side, it generated
> this gcc command so I didn't get it (make DEBUG=1):
> 
>   gcc -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
> 
> Reviewed-by: German Gomez <german.gomez@arm.com>

Only when passing -Wall (this is the case when building the kernel packages in
Debian with additional flags, so this is why this was spotted):

gcc -Wall -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
  311 |         struct filter_data *d = data;
      |

Regards,
Salvatore

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

* Re: [PATCH] perf dlfilter: Drop unused variable
  2021-12-08 11:11   ` Salvatore Bonaccorso
@ 2021-12-09 19:20     ` Arnaldo Carvalho de Melo
  2021-12-09 19:40       ` Adrian Hunter
  2021-12-09 20:15       ` Salvatore Bonaccorso
  0 siblings, 2 replies; 6+ messages in thread
From: Arnaldo Carvalho de Melo @ 2021-12-09 19:20 UTC (permalink / raw)
  To: Salvatore Bonaccorso, Adrian Hunter
  Cc: German Gomez, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, linux-perf-users,
	linux-kernel

Em Wed, Dec 08, 2021 at 12:11:59PM +0100, Salvatore Bonaccorso escreveu:
> Hi German,
> 
> On Wed, Dec 08, 2021 at 10:44:01AM +0000, German Gomez wrote:
> > 
> > On 23/11/2021 21:18, Salvatore Bonaccorso wrote:
> > > Compiling tools/perf/dlfilters/dlfilter-test-api-v0.c result in:
> > >
> > > 	checking for stdlib.h... dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
> > > 	dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
> > > 	  311 |         struct filter_data *d = data;
> > > 	      |
> > 
> > Did you get this warning when issuing "make"? From my side, it generated
> > this gcc command so I didn't get it (make DEBUG=1):
> > 
> >   gcc -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
> > 
> > Reviewed-by: German Gomez <german.gomez@arm.com>
> 
> Only when passing -Wall (this is the case when building the kernel packages in
> Debian with additional flags, so this is why this was spotted):
> 
> gcc -Wall -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
> dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
> dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
>   311 |         struct filter_data *d = data;
>       |
> 

So I'm applying this, its an obvious cleanup, but please CC the author
next time, I'm doing it in this reply, Adrian, ok?

- Arnaldo

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

* Re: [PATCH] perf dlfilter: Drop unused variable
  2021-12-09 19:20     ` Arnaldo Carvalho de Melo
@ 2021-12-09 19:40       ` Adrian Hunter
  2021-12-09 20:15       ` Salvatore Bonaccorso
  1 sibling, 0 replies; 6+ messages in thread
From: Adrian Hunter @ 2021-12-09 19:40 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Salvatore Bonaccorso
  Cc: German Gomez, Peter Zijlstra, Ingo Molnar, Mark Rutland,
	Alexander Shishkin, Jiri Olsa, Namhyung Kim, linux-perf-users,
	linux-kernel

On 09/12/2021 21:20, Arnaldo Carvalho de Melo wrote:
> Em Wed, Dec 08, 2021 at 12:11:59PM +0100, Salvatore Bonaccorso escreveu:
>> Hi German,
>>
>> On Wed, Dec 08, 2021 at 10:44:01AM +0000, German Gomez wrote:
>>>
>>> On 23/11/2021 21:18, Salvatore Bonaccorso wrote:
>>>> Compiling tools/perf/dlfilters/dlfilter-test-api-v0.c result in:
>>>>
>>>> 	checking for stdlib.h... dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
>>>> 	dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
>>>> 	  311 |         struct filter_data *d = data;
>>>> 	      |
>>>
>>> Did you get this warning when issuing "make"? From my side, it generated
>>> this gcc command so I didn't get it (make DEBUG=1):
>>>
>>>   gcc -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
>>>
>>> Reviewed-by: German Gomez <german.gomez@arm.com>
>>
>> Only when passing -Wall (this is the case when building the kernel packages in
>> Debian with additional flags, so this is why this was spotted):
>>
>> gcc -Wall -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
>> dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
>> dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
>>   311 |         struct filter_data *d = data;
>>       |
>>
> 
> So I'm applying this, its an obvious cleanup, but please CC the author
> next time, I'm doing it in this reply, Adrian, ok?

Yes, thank you!

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

* Re: [PATCH] perf dlfilter: Drop unused variable
  2021-12-09 19:20     ` Arnaldo Carvalho de Melo
  2021-12-09 19:40       ` Adrian Hunter
@ 2021-12-09 20:15       ` Salvatore Bonaccorso
  1 sibling, 0 replies; 6+ messages in thread
From: Salvatore Bonaccorso @ 2021-12-09 20:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Adrian Hunter, German Gomez, Peter Zijlstra, Ingo Molnar,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	linux-perf-users, linux-kernel

Hi,

On Thu, Dec 09, 2021 at 04:20:22PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Wed, Dec 08, 2021 at 12:11:59PM +0100, Salvatore Bonaccorso escreveu:
> > Hi German,
> > 
> > On Wed, Dec 08, 2021 at 10:44:01AM +0000, German Gomez wrote:
> > > 
> > > On 23/11/2021 21:18, Salvatore Bonaccorso wrote:
> > > > Compiling tools/perf/dlfilters/dlfilter-test-api-v0.c result in:
> > > >
> > > > 	checking for stdlib.h... dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
> > > > 	dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
> > > > 	  311 |         struct filter_data *d = data;
> > > > 	      |
> > > 
> > > Did you get this warning when issuing "make"? From my side, it generated
> > > this gcc command so I didn't get it (make DEBUG=1):
> > > 
> > >   gcc -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
> > > 
> > > Reviewed-by: German Gomez <german.gomez@arm.com>
> > 
> > Only when passing -Wall (this is the case when building the kernel packages in
> > Debian with additional flags, so this is why this was spotted):
> > 
> > gcc -Wall -c -Iinclude  -o dlfilters/dlfilter-test-api-v0.o -fpic dlfilters/dlfilter-test-api-v0.c
> > dlfilters/dlfilter-test-api-v0.c: In function ‘filter_event’:
> > dlfilters/dlfilter-test-api-v0.c:311:29: warning: unused variable ‘d’ [-Wunused-variable]
> >   311 |         struct filter_data *d = data;
> >       |
> > 
> 
> So I'm applying this, its an obvious cleanup, but please CC the author
> next time, I'm doing it in this reply, Adrian, ok?

Yes right, I apologies for that, something went wrong when I generated
the list of people to contact using 

./scripts/get_maintainer.pl ./tools/perf/dlfilters/dlfilter-test-api-v0.c

and write up the persons to contact.

Thank you!

Regards,
Salvatore

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

end of thread, other threads:[~2021-12-09 20:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-23 21:18 [PATCH] perf dlfilter: Drop unused variable Salvatore Bonaccorso
2021-12-08 10:44 ` German Gomez
2021-12-08 11:11   ` Salvatore Bonaccorso
2021-12-09 19:20     ` Arnaldo Carvalho de Melo
2021-12-09 19:40       ` Adrian Hunter
2021-12-09 20:15       ` Salvatore Bonaccorso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.