Received: by 2002:a05:6a10:a852:0:0:0:0 with SMTP id d18csp199064pxy; Fri, 7 May 2021 00:53:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/i8WPvDHA1YaYOSpSVLUDhl1koV5E0WEMyeLvjpwY6HcFk8l6aIgIKfti6SJuds6J+ELM X-Received: by 2002:a17:902:10b:b029:ed:2b3e:beb4 with SMTP id 11-20020a170902010bb02900ed2b3ebeb4mr9216633plb.64.1620374034441; Fri, 07 May 2021 00:53:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620374034; cv=none; d=google.com; s=arc-20160816; b=JweMwacZwevptKu2wiQgOoA5rvKM7JbKvEee2kRK6EwuQTuP/UTUeHeJG+xnqyD2Mf NlOxkPJzoBt0x1+sgbJD3TvoHb6JOt1pHKmHba+6KLiylJaqSvG1D76yJicG0VQo8FM/ E1vex+ZgJXkHu4AMhjkyXHk3Nfx4gcvKsBfhY+W66npxqlnr2mWDpm4CjlILnGtg31QQ kUC3AuNMXiuK0/It/deiXb1/YNPML5BWt+E+rZwFZFCuA6fVkcuhiy9bqjGt1mffMWtz z4odP2PgKajxaAMtaSUY2ZHDo7Yn9Os9EwjhHeQmLhvyUUVvDReE5DDigqRJvnKEPTIL A4RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NLt75eU9eLN2IJIrAJZKscDO9v/2qVIuCz9o9l+6l8A=; b=xK/sHWlOOF+wmws+a93rww2nyKJuQgzr0+WZcUuxqxSjI2zSRuSTRvNimXxyPPNGLU tfYqNPcxRDbHdCGhGKWKcnJ63cgVVH5TVp3TbO935UiRTZfNmvZc8toCXkrnVOf7hOlV Cmfrk7zaA0DLS2Zjv2nSdK78J+QKMZzn7NR4INi9nwiZSkmRBEFWpz/CPU3Hgx75dWxw UYD8lDdQi7tG3sxDDL/32qmHGtexB43FuaIR6axh8FUJ/izTdryS5tTsUsJjT/1v+SsV q4Voy8TqUvp45dH87uWVd0oEHt/locaHP+pnxe8HZlxCBNgw4Jl96/4I6dz0l5LMm6AQ 1eow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=h6SrhnpP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id l22si6149852pfc.9.2021.05.07.00.53.41; Fri, 07 May 2021 00:53:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=h6SrhnpP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S234985AbhEGHAl (ORCPT + 99 others); Fri, 7 May 2021 03:00:41 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:60390 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232929AbhEGHAk (ORCPT ); Fri, 7 May 2021 03:00:40 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1476iMhu036236; Fri, 7 May 2021 06:59:37 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 : content-transfer-encoding : in-reply-to; s=corp-2020-01-29; bh=NLt75eU9eLN2IJIrAJZKscDO9v/2qVIuCz9o9l+6l8A=; b=h6SrhnpPMkIRPZ2wTyD5nBVcd5hlmjFFdJhOKiOn9V8IWVFWNf63B48fvRcpHfEqN4PZ Zh16kcs2sXKEwIC+mrUp1GSOiJNDOLf38Tw6Njfl07eEtTpFHQ8j0TnMgWieMPG5glf3 PVPvjlGOk2uSC6lkXExv6LQXFdQmMqb6XJrw+yq6+8w+pHVJQBGr/XeyeJLMfn1aHump MiSw+4jN1U3+G8Yzg+PpjQnlizXhERiGveTdHyXJiTciH11+a4zAD6xliGkpnJK4tKnV k4oSBk9DJVFmHqMSjNPfFARxz8xxqpXuLUC4VEfoQppWnbpj+bBFW/cDSI+2npSyJA/N yg== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by aserp2120.oracle.com with ESMTP id 38ctjv0gwn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 May 2021 06:59:37 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1476jNmP172193; Fri, 7 May 2021 06:59:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by userp3030.oracle.com with ESMTP id 38css88w12-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 May 2021 06:59:36 +0000 Received: from userp3030.oracle.com (userp3030.oracle.com [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 1476xaiW021697; Fri, 7 May 2021 06:59:36 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3030.oracle.com with ESMTP id 38css88w0n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 07 May 2021 06:59:36 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 1476xXjp009800; Fri, 7 May 2021 06:59:34 GMT Received: from kadam (/102.36.221.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 06 May 2021 23:59:33 -0700 Date: Fri, 7 May 2021 09:59:26 +0300 From: Dan Carpenter To: Christophe JAILLET Cc: ohad@wizery.com, bjorn.andersson@linaro.org, mathieu.poirier@linaro.org, s-anna@ti.com, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [PATCH] remoteproc: k3-r5: Fix an error message Message-ID: <20210507065926.GD1922@kadam> References: <20210507052647.GF1955@kadam> <5cdff9cf-945a-fe47-b117-3c9d9f11e987@wanadoo.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5cdff9cf-945a-fe47-b117-3c9d9f11e987@wanadoo.fr> User-Agent: Mutt/1.9.4 (2018-02-28) X-Proofpoint-ORIG-GUID: 9Rf_BUuJtuVZaloj1SpHtav1GeENaC2C X-Proofpoint-GUID: 9Rf_BUuJtuVZaloj1SpHtav1GeENaC2C X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9976 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 mlxlogscore=999 malwarescore=0 phishscore=0 mlxscore=0 clxscore=1015 priorityscore=1501 bulkscore=0 suspectscore=0 lowpriorityscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2105070048 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 07, 2021 at 07:58:39AM +0200, Christophe JAILLET wrote: > Le 07/05/2021 ? 07:26, Dan Carpenter a ?crit?: > > On Thu, May 06, 2021 at 10:46:01PM +0200, Christophe JAILLET wrote: > > > 'ret' is known to be 0 here. > > > Reorder the code so that the expected error code is printed. > > > > > > Fixes: 6dedbd1d5443 ("remoteproc: k3-r5: Add a remoteproc driver for R5F subsystem") > > > Signed-off-by: Christophe JAILLET > > > --- > > > drivers/remoteproc/ti_k3_r5_remoteproc.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/drivers/remoteproc/ti_k3_r5_remoteproc.c b/drivers/remoteproc/ti_k3_r5_remoteproc.c > > > index 5cf8d030a1f0..4104e4846dbf 100644 > > > --- a/drivers/remoteproc/ti_k3_r5_remoteproc.c > > > +++ b/drivers/remoteproc/ti_k3_r5_remoteproc.c > > > @@ -1272,9 +1272,9 @@ static int k3_r5_core_of_init(struct platform_device *pdev) > > > core->tsp = k3_r5_core_of_get_tsp(dev, core->ti_sci); > > > if (IS_ERR(core->tsp)) { > > > + ret = PTR_ERR(core->tsp); > > > dev_err(dev, "failed to construct ti-sci proc control, ret = %d\n", > > > ret); > > > > I recently learned about the %pe format specifier, which prints "-ENOMEM" > > instead of -12. > > Hi Dan, > > I see that we are reading the same ML :) > > > Well, I'm a bit puzzled by it. > On one hand, it is more user-friendly. On the other hand it is not widely > used up to now. > > So is it better to keep the legacy way of reporting error code? It might make back porting things more complicated? I'm surprised this hasn't been backported further back to 5.4. > > Do you know if there is preferred way? It's new. Soon it will be the prefered way. You're right, of course, that needs to introduce a %e which takes an int. I have left this as an exercise for the reader. ;) Eventually someone will work up the energy required and do this work. regards, dan carpenter