public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Dmitry Safonov <dima@arista.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Dmitry Safonov <0x7f454c46@gmail.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Ingo Molnar <mingo@redhat.com>,
	Jacek Caban <jacek@codeweavers.com>, Jiri Olsa <jolsa@redhat.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Remi Bernon <rbernon@codeweavers.com>
Subject: Re: [PATCH] perf: Use (long) for iterator for bfd symbols
Date: Thu, 11 Feb 2021 20:52:30 -0300	[thread overview]
Message-ID: <20210211235230.GA1370062@kernel.org> (raw)
In-Reply-To: <CAM9d7civ8h5uh6_uMj9zKBkeRaCxr_UvA0inEiR8EmgHHxRtGQ@mail.gmail.com>

Em Thu, Feb 11, 2021 at 06:14:03PM +0900, Namhyung Kim escreveu:
> Hello,
> 
> On Tue, Feb 9, 2021 at 11:51 PM Dmitry Safonov <dima@arista.com> wrote:
> >
> > GCC (GCC) 8.4.0 20200304 fails to build perf with:
> > : util/symbol.c: In function 'dso__load_bfd_symbols':
> > : util/symbol.c:1626:16: error: comparison of integer expressions of different signednes
> > :   for (i = 0; i < symbols_count; ++i) {
> > :                 ^
> > : util/symbol.c:1632:16: error: comparison of integer expressions of different signednes
> > :    while (i + 1 < symbols_count &&
> > :                 ^
> > : util/symbol.c:1637:13: error: comparison of integer expressions of different signednes
> > :    if (i + 1 < symbols_count &&
> > :              ^
> > : cc1: all warnings being treated as errors
> >
> > It's unlikely that the symtable will be that big, but the fix is
> > oneliner and as perf has CORE_CFLAGS += -Wextra, which makes build to
> > fail together with CORE_CFLAGS += -Werror
> >
> > Fixes: eac9a4342e54 ("perf symbols: Try reading the symbol table with libbfd")
> > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
> > Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> > Cc: Ingo Molnar <mingo@redhat.com>
> > Cc: Jacek Caban <jacek@codeweavers.com>
> > Cc: Jiri Olsa <jolsa@redhat.com>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Cc: Remi Bernon <rbernon@codeweavers.com>
> > Signed-off-by: Dmitry Safonov <dima@arista.com>
> 
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks, applied.

- Arnaldo

 
> Thanks,
> Namhyung
> 
> 
> > ---
> >  tools/perf/util/symbol.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> > index 64a039cbba1b..1645fb4ec9ed 100644
> > --- a/tools/perf/util/symbol.c
> > +++ b/tools/perf/util/symbol.c
> > @@ -1561,12 +1561,11 @@ static int bfd2elf_binding(asymbol *symbol)
> >  int dso__load_bfd_symbols(struct dso *dso, const char *debugfile)
> >  {
> >         int err = -1;
> > -       long symbols_size, symbols_count;
> > +       long symbols_size, symbols_count, i;
> >         asection *section;
> >         asymbol **symbols, *sym;
> >         struct symbol *symbol;
> >         bfd *abfd;
> > -       u_int i;
> >         u64 start, len;
> >
> >         abfd = bfd_openr(dso->long_name, NULL);
> > --
> > 2.30.0
> >

-- 

- Arnaldo

      reply	other threads:[~2021-02-11 23:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09 14:51 [PATCH] perf: Use (long) for iterator for bfd symbols Dmitry Safonov
2021-02-11  9:14 ` Namhyung Kim
2021-02-11 23:52   ` Arnaldo Carvalho de Melo [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210211235230.GA1370062@kernel.org \
    --to=acme@kernel.org \
    --cc=0x7f454c46@gmail.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dima@arista.com \
    --cc=jacek@codeweavers.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rbernon@codeweavers.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox