Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1314840pxa; Fri, 28 Aug 2020 09:17:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz61sVias0PMYRUYy7keoYxDjZnbpR3WvEVpCv0U0KDR+ptpbIwLoqP/Weow/uahiMVru6H X-Received: by 2002:a17:906:7c55:: with SMTP id g21mr2599222ejp.169.1598631440921; Fri, 28 Aug 2020 09:17:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598631440; cv=none; d=google.com; s=arc-20160816; b=JOrzgGy8UFRSOKTRkf6y9gqqDA25s3hrs4wtKpVTvchQvrUyCyNSXf6Cdx0NkkZlqG UNvfDrFLN3yf8XTi5RAJgCMhsY5rr72hhbXK52dmB0ikQ8shfiS+5SA4KPtVi8ywqxl2 PKqhlaYmTMsme36DqA8foWqWvR5x51LGMseVaUkpHZEm+e1aT1YTeMa5i1wl0Zt/X6HV rQpXhZmkkWroap5pmAWsSlf3Q8dfgIrGjuFkM9JcImDDeusyGA99abt2JLd8aKAA4rgx sO4SNzIM8IUUBV9HITpEUrX0C2bSg7OQE+qBIZJQ08oaMErVxboWZHfFRllsgUY5tzAR +8lQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:content-transfer-encoding :mime-version:subject:from:message-id:date:dkim-signature; bh=zI29H6OJTmGAC5c1Sl2dVRV1Df00M8+za+mppfhhesM=; b=ExiPPUltwfXd5zuxlXl6UT/lPlKcgM1fgwMyJwcsdc5Up4Q3KogVH+m8WGZPCv27Qa u7AMSy8dz4mS84FiZd3kszCsd0JVLGxV8wsxQEgcn6USx3UH8knetVx/EbzXvjGFSjWN YeY5zPeYNFOSz5wvFrXFWvPvpIG+8bEZ8BHlGPfMRZtmfQIQ/Nbn33OQHUo7IuVj0GDW TaHXcmFjdK7BFKEJaV4I3dCTMjcyFsqRhueI+P5g5MnUQxvSp7ocPMPuPLTiTa4KDbok gCm/FLq6SMHP0KRBOhM43IQCLAHKj0kUhAt+WoIRFIeTR8HeUT3ocro3PjDPQop+SHVu fKAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@rere.qmqm.pl header.s=1 header.b=lCcHcjXU; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si944432ejj.86.2020.08.28.09.16.57; Fri, 28 Aug 2020 09:17:20 -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=@rere.qmqm.pl header.s=1 header.b=lCcHcjXU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728356AbgH1QOp (ORCPT + 99 others); Fri, 28 Aug 2020 12:14:45 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:64593 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgH1QOj (ORCPT ); Fri, 28 Aug 2020 12:14:39 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 4BdPn83mQHz12; Fri, 28 Aug 2020 18:14:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1598631277; bh=+l268Yhr5BVTwrZad9fGXbzA6y84l/JaX3Bbx5fuoU0=; h=Date:From:Subject:To:Cc:From; b=lCcHcjXUrDKVwyEzpEx0oMa7LhBVIZrLYtEOdUl9bmsEvDU2Fs8GMUGKxMvsFhLVd QjumDy4Sx1sL4nF851kPFfDvC9URyXMGGwxeaepV/3H1lmhJzdhxO8pXb1WO7JXlNQ zJE01U9A+vCVbNp8z2I/swgXor5sPBuXTX1yRe8mouR6t0SVpmQTCfXatv7gr41vf3 8dTdCUEF99OVH9ZVJI3grwViI10I2V20qrPifBeoNSEUIwkfsmkiD/RgPf9BRblI+z 0Em15qWd1P/Zd6+6+fe3yEAfjpQgRtmRDr9k52czQEcvQXFbAFZSqXGff8EGe2t008 dTdk2hfHxtdmg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.4 at mail Date: Fri, 28 Aug 2020 18:14:35 +0200 Message-Id: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH] driver code: print symbolic error code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To: Greg Kroah-Hartman , "Rafael J. Wysocki" , Andrzej Hajda , Andy Shevchenko , Mark Brown Cc: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dev_err_probe() prepends the message with an error code. Let's make it more readable by translating the code to a more recognisable symbol. Fixes: a787e5400a1c ("driver core: add device probe log helper") Signed-off-by: Michał Mirosław --- drivers/base/core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index ac1046a382bc..1a4706310b28 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -4237,10 +4237,10 @@ int dev_err_probe(const struct device *dev, int err, const char *fmt, ...) vaf.va = &args; if (err != -EPROBE_DEFER) { - dev_err(dev, "error %d: %pV", err, &vaf); + dev_err(dev, "error %pe: %pV", ERR_PTR(err), &vaf); } else { device_set_deferred_probe_reason(dev, &vaf); - dev_dbg(dev, "error %d: %pV", err, &vaf); + dev_dbg(dev, "error %pe: %pV", ERR_PTR(err), &vaf); } va_end(args); -- 2.20.1