[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190726121317.169d3ab0@gandalf.local.home>
Date: Fri, 26 Jul 2019 12:13:17 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Matt Helsley <mhelsley@...are.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH v3 08/13] recordmcount: Clarify what cleanup() does
On Wed, 24 Jul 2019 14:05:02 -0700
Matt Helsley <mhelsley@...are.com> wrote:
> @@ -436,10 +451,11 @@ static void MIPS64_r_info(Elf64_Rel *const rp, unsigned sym, unsigned type)
>
> static int do_file(char const *const fname)
> {
> - Elf32_Ehdr *const ehdr = mmap_file(fname);
> + Elf32_Ehdr *ehdr;
> unsigned int reltype = 0;
> int rc = -1;
>
On small nit that I'm going to tweak, is the ordering of the
declarations above. By removing the const and the assignment, you lost
the "upside-down x-mas tree" look of the declaration.
That is, we went from:
static int do_file(char const *const fname)
{
Elf32_Ehdr *const ehdr = mmap_file(fname);
unsigned int reltype = 0;
int rc = -1;
to:
static int do_file(char const *const fname)
{
Elf32_Ehdr *ehdr;
unsigned int reltype = 0;
int rc = -1;
Which, I'll change to:
static int do_file(char const *const fname)
{
unsigned int reltype = 0;
Elf32_Ehdr *ehdr;
int rc = -1;
-- Steve
Powered by blists - more mailing lists