Received: by 10.213.65.68 with SMTP id h4csp299853imn; Fri, 16 Mar 2018 03:37:38 -0700 (PDT) X-Google-Smtp-Source: AG47ELuJEj6tx5jzXD3AFBELvFoqBzMumHfT0piBhveUdLhhjIKRqceNiNB8DQp4YKHztQnBWtNY X-Received: by 10.98.9.5 with SMTP id e5mr1157805pfd.189.1521196658743; Fri, 16 Mar 2018 03:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521196658; cv=none; d=google.com; s=arc-20160816; b=Gu8LPd9hYtQ6hkRuUALVGIwRyiNFwLAAwAGd/0loSdA1lNuya3KNBz280xo/lHCNRk mXZtosy0K83+YRsXGCpzZOKSQd4RbjLMoVuWWybsrjAlOpU4qL3b6q1PhZG3hZDykCS6 xfS02KJMdO6yPjiZvlv0/GJSnayhHwBUZyM6jPeaglrY96VRklJFNa14WJSbWmNlJzaV kS4eG6T1+RQmhaKXlr8LGSrgV1n03TC3gHaXKQxUMc9DT3CChBOGZj4ibJQqXt69w5GQ X95TuzctRQUnB679cJUQXM6OsyI8PjCGtAI4ZQ+z6FYpxu/dSU1wlqqbf4btsKBhr1af g3tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=pj9NOJpE+qMU+2NBgAaEoR4qhnenKRYw2uXIj+QMl7U=; b=rMQ4u2AGmKcNe7WEPdoYd9nNyftjcm192dqrP3sR8vd6k3N63zxWEjtoOqXEWqRHQg FnWIMEWcuXjJcMXtZug8v9v2b92AiPmxRjmcaGJ/YcluK/WwqrlUBqclx+i0ZKDzshYm fiZOq0Hs4iyx5MASjNbmnP8FQlVwX+jOLVlZV9oVIdC0KHGJKQbItXl5tTJoCf65oQBh fAwEgUemC4Wcy/dxXUmHj5nqzvmv+btVvFUeTE0OOVsvYOwC8xOJ/LYUiqLQ9nk19EtL fUaaH31/vrYMqdGlQNSKDJXVMuGtWptZEhoZMLJYgqf98kseTzSSeNv6q4QEniI93rNH xbcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=ikz8exyH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u25si4812125pgv.221.2018.03.16.03.37.24; Fri, 16 Mar 2018 03:37:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=ikz8exyH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753627AbeCPKgK (ORCPT + 99 others); Fri, 16 Mar 2018 06:36:10 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:43348 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753612AbeCPKgI (ORCPT ); Fri, 16 Mar 2018 06:36:08 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w2GAUCwa184707; Fri, 16 Mar 2018 10:35:24 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=pj9NOJpE+qMU+2NBgAaEoR4qhnenKRYw2uXIj+QMl7U=; b=ikz8exyHEmw41JFI/+fclGOswDcdu/HEfcKNA8tNR6ncyJaQjXLzR4XLXLjzeP9qWDkv nbBKqRfymMdEOx8Rt/6bKbTRamecYTvwWRiqalr2GSOrFOkIkg1tRHuIKyRv41O2Tg0c 1N4P5rF96Wu+CY+8+sJpUObL4xUPwXG67Vte+LrkidaqXRhDIYsNw7XvmPZblVkB01OA /Yvo/S8KGK2AALCb9Cdb4honiDn05M9swaMidP3rs1K+ewuFp7Un3FJ0ONeLKvJ7mCmF ty3HVZt0TP1+8pYslsqEOjKwm2YzGcmxU7ECca40H/fncmC+Ih4hU8qb6cFyy3pZghO1 gg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2grc7q00j6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Mar 2018 10:35:24 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w2GAZNCm023427 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 16 Mar 2018 10:35:23 GMT Received: from abhmp0010.oracle.com (abhmp0010.oracle.com [141.146.116.16]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w2GAZMpZ005744; Fri, 16 Mar 2018 10:35:22 GMT Received: from mwanda (/197.254.35.146) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 16 Mar 2018 03:35:22 -0700 Date: Fri, 16 Mar 2018 13:35:11 +0300 From: Dan Carpenter To: Michael Ellerman Cc: Thiago Jung Bauermann , SF Markus Elfring , linuxppc-dev@lists.ozlabs.org, Benjamin Herrenschmidt , Borislav Petkov , Brijesh Singh , Josh Sklar , Kees Cook , Paul Mackerras , Thomas Gleixner , Tom Lendacky , LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] powerpc: Use common error handling code in setup_new_fdt() Message-ID: <20180316103511.77hog6scdxg2k7ts@mwanda> References: <0dd9d938-8d89-f0e0-f05f-9a3e5dc42a57@users.sourceforge.net> <87fu52jqtc.fsf@morokweng.localdomain> <20180315115753.rjejlkrp3fhdxbyk@mwanda> <87bmfofh8y.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87bmfofh8y.fsf@concordia.ellerman.id.au> User-Agent: NeoMutt/20170609 (1.8.3) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8833 signatures=668690 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1803160005 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 16, 2018 at 09:26:53PM +1100, Michael Ellerman wrote: > Dan Carpenter writes: > > On Wed, Mar 14, 2018 at 06:22:07PM -0300, Thiago Jung Bauermann wrote: > >> SF Markus Elfring writes: > >> > From: Markus Elfring > >> > 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 > >> > --- > >> > 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 > > > > 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. > To me the original was better. > > 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. Ah. You're right. I look at the patch in context, sorry. regards, dan carpenter