Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp2193616rwb; Fri, 5 Aug 2022 15:24:14 -0700 (PDT) X-Google-Smtp-Source: AA6agR62djCcjBRuB/dhM5Xb2Ixd5kILCPqlea5zDfvw8h13nb6fgbRpBNgm3C+nEzxFmla1Yh7u X-Received: by 2002:a17:906:4fc4:b0:6da:b4c6:fadb with SMTP id i4-20020a1709064fc400b006dab4c6fadbmr6736840ejw.282.1659738254443; Fri, 05 Aug 2022 15:24:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659738254; cv=none; d=google.com; s=arc-20160816; b=sBpsKfH5+DHXC6xKIhrGHx6ONiKEY+psvQsurvZSgm2X7OsVoBDxdHA1sffk6l3seV NjpiD4+1yqbaG8JL+X3VRTGPj+XizyWfLHTOmKtGGhUcWoAMhiDBWICakYmG3frVumQA drf8JtmnmWe/12dY5ud0qcEYJXgApO3fvcRBd8szeP5lpPHqQBUfdj7hL0E4nvJ3eMUm Gsq6OQKSjT4zE69R8dIL/QitrjPJBxoH3aF2mDQ6zMdvoUk0D71cXOYInSkx3JP8TXux z712m6rDzrCXj8JMgr14zwR2wG+Iae4UwTNeqP9BW21gPJ+NEIJ6WYzy6CQCjlPW6vRu 1pqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jLKjV/UfxzsbSDjcT/nVc8pIbgdHYaJoPvERyjvrp98=; b=GK+5adFQ5SVvqOrdWQ+MG5eNSLIY5yl6In8EelLwNBhHWOyUX/qfyTpC4PwQBiZv/L TTme4UOKpq3Im73haYptrCu9w7XrXkz9yahUlSD42PP5g+hDaTQMgKeWg/Mns4KSlWKl J/vgCLaRRK3RyW1ZpMsv9lje6UMewjBv4Z2RfUBmyFLwSbIG5qtrK2PvOL9dfaNtDHaS bPkwSO6egh1Hmrz3MDt7UuBEm6pxEcJS47hESrm3ChWGwJwCWBwmaJtcQNCLvw6nRuzI Df8g8urp8xerzu2hyhW2vjqa45707ls7PhvjnN3vIAG+6M1QrkwW19ni+MFozp1O7BQl dDTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gn9-20020a1709070d0900b00726347cbb61si4739889ejc.981.2022.08.05.15.23.49; Fri, 05 Aug 2022 15:24:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241607AbiHEWCq (ORCPT + 99 others); Fri, 5 Aug 2022 18:02:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241632AbiHEWCi (ORCPT ); Fri, 5 Aug 2022 18:02:38 -0400 Received: from smtp.smtpout.orange.fr (smtp-30.smtpout.orange.fr [80.12.242.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91A5160F0 for ; Fri, 5 Aug 2022 15:02:36 -0700 (PDT) Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id K5OrodtROkootK5Oroved1; Sat, 06 Aug 2022 00:02:35 +0200 X-ME-Helo: pop-os.home X-ME-Auth: YWZlNiIxYWMyZDliZWIzOTcwYTEyYzlhMmU3ZiQ1M2U2MzfzZDfyZTMxZTBkMTYyNDBjNDJlZmQ3ZQ== X-ME-Date: Sat, 06 Aug 2022 00:02:35 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Bjorn Andersson , Mathieu Poirier , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Peng Fan , Richard Zhu Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , Mathieu Poirier , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] remoteproc: imx_rproc: Simplify some error message Date: Sat, 6 Aug 2022 00:02:32 +0200 Message-Id: <6b9343c2688117a340661d8ee491c2962c54a09a.1659736936.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dev_err_probe() already prints the error code in a human readable way, so there is no need to duplicate it as a numerical value at the end of the message. While at it, remove 'ret' that is mostly useless. Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox") Signed-off-by: Christophe JAILLET --- drivers/remoteproc/imx_rproc.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index 38383e7de3c1..7cc4fd207e2d 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -646,7 +646,6 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc) struct imx_rproc *priv = rproc->priv; struct device *dev = priv->dev; struct mbox_client *cl; - int ret; if (!of_get_property(dev->of_node, "mbox-names", NULL)) return 0; @@ -659,18 +658,15 @@ static int imx_rproc_xtr_mbox_init(struct rproc *rproc) cl->rx_callback = imx_rproc_rx_callback; priv->tx_ch = mbox_request_channel_byname(cl, "tx"); - if (IS_ERR(priv->tx_ch)) { - ret = PTR_ERR(priv->tx_ch); - return dev_err_probe(cl->dev, ret, - "failed to request tx mailbox channel: %d\n", ret); - } + if (IS_ERR(priv->tx_ch)) + return dev_err_probe(cl->dev, PTR_ERR(priv->tx_ch), + "failed to request tx mailbox channel\n"); priv->rx_ch = mbox_request_channel_byname(cl, "rx"); if (IS_ERR(priv->rx_ch)) { mbox_free_channel(priv->tx_ch); - ret = PTR_ERR(priv->rx_ch); - return dev_err_probe(cl->dev, ret, - "failed to request rx mailbox channel: %d\n", ret); + return dev_err_probe(cl->dev, PTR_ERR(priv->rx_ch), + "failed to request rx mailbox channel\n"); } return 0; -- 2.34.1