From patchwork Tue Aug 9 20:28:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 12939909 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E1D0CC19F2D for ; Tue, 9 Aug 2022 20:30:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=ZUrHNrei7Kjv0Q1GZlCxI/KTywsMgrgylHlPEtCOa6Q=; b=S5e7ZLGxWjBpLu 7SR23Y2zF7v84rJFlGiWrubJb3aCOnG/h5BG9UFzA/RZseWgP/cTgLoM5O2O4tES0ZuSVKjqboMf3 sLZVu+6JmythAyNL2+JWDRyuY79OKlyOoL0OxfQ5Kt+mM2oQZ+/hRc59fFl0Ee9PuvaOCyFq49G7O AMA6vq9nYieFtcEJoU6gPHAK/pWsHhemmVUfds3q6+zJg0HkDPWALWLG/1WpHpjfwrJmLvvxFEZP6 kVAOeAGmbIVfXQDS5O4HqtqQXly4MuF1XUO26oBivDfsScXzFsOwPNIwDm7DdmAu2+HDCtyHYl0lj CSRrfEwrH7h1gqKxTG/A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVqz-006Hc1-LG; Tue, 09 Aug 2022 20:29:29 +0000 Received: from smtp-19.smtpout.orange.fr ([80.12.242.19] helo=smtp.smtpout.orange.fr) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oLVqX-006HNb-RT for linux-arm-kernel@lists.infradead.org; Tue, 09 Aug 2022 20:29:10 +0000 Received: from pop-os.home ([90.11.190.129]) by smtp.orange.fr with ESMTPA id LVqKodyw4sL0zLVqKoORai; Tue, 09 Aug 2022 22:28:52 +0200 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Tue, 09 Aug 2022 22:28:52 +0200 X-ME-IP: 90.11.190.129 From: Christophe JAILLET To: Greg Kroah-Hartman , Matthias Brugger , Chunfeng Yun Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2] usb: common: usb-conn-gpio: Simplify some error message Date: Tue, 9 Aug 2022 22:28:42 +0200 Message-Id: <7505a9dfa1e097070c492d6f6f84afa2a490b040.1659763173.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220809_132902_087539_1BC5009A X-CRM114-Status: GOOD ( 13.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. Fixes: ddaf0d6dc467 ("usb: common: usb-conn-gpio: use dev_err_probe() to print log") Signed-off-by: Christophe JAILLET Reviewed-by: Chunfeng Yun --- Change in v2: * keep the message on the same line of dev_err_probe() because the line is still < 100 char [Chunfeng Yun ] --- drivers/usb/common/usb-conn-gpio.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/usb/common/usb-conn-gpio.c b/drivers/usb/common/usb-conn-gpio.c index b39c9f1c375d..44c5127175b7 100644 --- a/drivers/usb/common/usb-conn-gpio.c +++ b/drivers/usb/common/usb-conn-gpio.c @@ -208,10 +208,8 @@ static int usb_conn_probe(struct platform_device *pdev) if (PTR_ERR(info->vbus) == -ENODEV) info->vbus = NULL; - if (IS_ERR(info->vbus)) { - ret = PTR_ERR(info->vbus); - return dev_err_probe(dev, ret, "failed to get vbus :%d\n", ret); - } + if (IS_ERR(info->vbus)) + return dev_err_probe(dev, PTR_ERR(info->vbus), "failed to get vbus\n"); info->role_sw = usb_role_switch_get(dev); if (IS_ERR(info->role_sw))