From: Michael Ellerman <mpe@ellerman.id.au>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Cc: SF Markus Elfring <elfring@users.sourceforge.net>,
linuxppc-dev@lists.ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Borislav Petkov <bp@suse.de>,
Brijesh Singh <brijesh.singh@amd.com>,
Josh Sklar <sklar@linux.vnet.ibm.com>,
Kees Cook <keescook@chromium.org>,
Paul Mackerras <paulus@samba.org>,
Thomas Gleixner <tglx@linutronix.de>,
Tom Lendacky <thomas.lendacky@amd.com>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] powerpc: Use common error handling code in setup_new_fdt()
Date: Fri, 16 Mar 2018 21:26:53 +1100 [thread overview]
Message-ID: <87bmfofh8y.fsf@concordia.ellerman.id.au> (raw)
In-Reply-To: <20180315115753.rjejlkrp3fhdxbyk@mwanda>
Dan Carpenter <dan.carpenter@oracle.com> writes:
> On Wed, Mar 14, 2018 at 06:22:07PM -0300, Thiago Jung Bauermann wrote:
>> SF Markus Elfring <elfring@users.sourceforge.net> writes:
>> > From: Markus Elfring <elfring@users.sourceforge.net>
>> > Date: Sun, 11 Mar 2018 09:03:42 +0100
>> >
>> > Add a jump target so that a bit of exception handling can be better reused
>> > at the end of this function.
>> >
>> > This issue was detected by using the Coccinelle software.
>> >
>> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
>> > ---
>> > arch/powerpc/kernel/machine_kexec_file_64.c | 28 ++++++++++++----------------
>> > 1 file changed, 12 insertions(+), 16 deletions(-)
>>
>> I liked it. Thanks!
>>
>> Reviewed-by: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
>
> You know that compilers already re-use string constants so this doesn't
> actually save memory?
Sure, but it's still clearer to only have the string appear once in the
code.
> Also we should be preserving the error codes
> instead of always returning -EINVAL.
The error codes come from libfdt code, so they don't necessarily make
sense in the kernel. eg. FDT_ERR_NOSPACE == 3 == ESRCH.
Perhaps we should be trying harder to convert them, but that's a
criticism of the original code not this patch.
cheers
next prev parent reply other threads:[~2018-03-16 10:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-11 8:16 SF Markus Elfring
2018-03-14 21:22 ` Thiago Jung Bauermann
2018-03-15 11:57 ` Dan Carpenter
2018-03-15 15:03 ` Joe Perches
2018-03-15 18:34 ` Thiago Jung Bauermann
2018-03-16 10:29 ` Michael Ellerman
2018-03-16 10:26 ` Michael Ellerman [this message]
2018-03-16 10:35 ` Dan Carpenter
2018-08-13 11:22 ` Michael Ellerman
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=87bmfofh8y.fsf@concordia.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=bauerman@linux.vnet.ibm.com \
--cc=benh@kernel.crashing.org \
--cc=bp@suse.de \
--cc=brijesh.singh@amd.com \
--cc=dan.carpenter@oracle.com \
--cc=elfring@users.sourceforge.net \
--cc=keescook@chromium.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=paulus@samba.org \
--cc=sklar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.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
all inboxes | Powered by JetHome®