Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp871482lqo; Fri, 17 May 2024 04:22:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX4mg98i5Wi3bBlJeXCLUXmKhmH4KPFSNxMQ/+7Rn2RfRnfd+/n6Sx9dzvDZSpYl95wyd3wFZbtQbVgMuIBEdtYf0INoqRj1cAM06Ks3Q== X-Google-Smtp-Source: AGHT+IF9W6NZqg9zgIL8PzrqKwe3I94RDcm88ONMBYStbTJW4otd/YhNwnsNRBJEo5Mw4ZpW8dNH X-Received: by 2002:a17:906:9e16:b0:a5c:dd34:2312 with SMTP id a640c23a62f3a-a5cdd342431mr398147966b.62.1715944956690; Fri, 17 May 2024 04:22:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715944956; cv=pass; d=google.com; s=arc-20160816; b=j0Fu2L7MtdMnl7npMYWasB//mnz6sRd+LyKAmB8SmgINPipgn2BYopsA6/ow189S3T 3yAQ6KM1IVs7OcumaGFry31IGguhaINwD9AhtYthOgoUZI4BFGJSaFJ8dvkTr2ZRo04V DinQspVE+93vMmR0HPLlqxVCBcN0Txnj0SFdHODCTGrHnR543QEGCeYYDiKY9k9hxP27 I9jhoHeRsunc3op9T1VQzQfecemBzH1S3xITauJy0+ZHDKyjRiqeZhKlBMNxNu9Jht52 o/95nDbDb3GmVeEe/0Cg978nYI21w+57SWk1x72LcypZIk2i4Um/Ep360O1MQf9Wd9Tc wGkQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=M9gLMIAiDHAcckpBA6eubUaCYcUpTziwh4/Q77XTl20=; fh=q1uUcgX+G8ujpGzbFnr3KJNPGvfj/pr7/2BNrGaAnXE=; b=IByJ356HSPkMDK1Qx0DSg4c7RMbfK6Hj/o2/cfZKzuVPT1peAxT3jviabh7c6KjEht m27WiQ7emCeDE1l4+kOo91DYcPIKOG3Cq4NQFn4yJ7oMcSouMv6M0xCKZGAQwJTnzDr2 f4Sf1ymykm2Lgtm8E+E2Dl4eFDQxt/NDo20Jx8LKiZAdTh8bcNjDyitPxHzQNRms4RaC jmmsY4sCLUCfuy304DczgbdK5kXEbmQf1O9swK6WhnDnvIzD3UNSb7Z5czKZpBZJdLV0 Eesn7Hc9aeKGZnDH3oLggYs2If+yCJ0Ke6R++mcICtaryouH77WTa08tzWhLgfWjcjr6 shxQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pnKxv3wR; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-182044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17ba572csi976602266b.651.2024.05.17.04.22.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 04:22:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pnKxv3wR; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-182044-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182044-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B72021F225C2 for ; Fri, 17 May 2024 11:22:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8E54D4087F; Fri, 17 May 2024 11:21:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="pnKxv3wR" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 90B8F3A8EF; Fri, 17 May 2024 11:21:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715944917; cv=none; b=lyLiXLoRcHXIZ7yFgHlLqCJyaeSVcp2i5hRBAVI829HBVPsRd4bbeReePMCzpDhn9J6xcntonbW1lnZPelyNDDatDCCroCkUcVKd8y3+wCBNe4B96MMe4+Jrkh2OMJts/UN+EcVjDLthSaMA/8NLoUqkhf/nsce7PYnm+gm4PXs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715944917; c=relaxed/simple; bh=cCiMLIeRQ2EXgfa0YgaB46BmldEjRuND+u8cgoXj8jA=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nq54Fkimf1wchCvA/g/E6EFYzJ2L9CkFLF7k/H9SyQRC64Mx5ryyucX39gF7p/knmoWwU5bKtHQIDUwbl+yLLYNEXQs5UCkZyjEHuoutJhFiSYsiYBJFJhrTIC9CwR/8u7PA/WWsFe0V+Y91dUmViKui0iDFc6NlxRSnPo7sM7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=pnKxv3wR; arc=none smtp.client-ip=198.47.19.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44HBKg9V111437; Fri, 17 May 2024 06:20:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1715944842; bh=M9gLMIAiDHAcckpBA6eubUaCYcUpTziwh4/Q77XTl20=; h=Date:From:To:CC:Subject:References:In-Reply-To; b=pnKxv3wREjHrW3r0IDs9vWgsr1lVRgaHQZuEryX4lHHhpM8MLY7TQnUzYwVTT3nMY o/xww5ONhLtQyUiudXBPeHrqexHCBRCyEdxllCMkL1NTvEboN89YNDoHVKEsM9qQVr qiIJByQY2KYw1OLVKCf32o+PG6Jx6wS+qmbDIIRU= Received: from DFLE105.ent.ti.com (dfle105.ent.ti.com [10.64.6.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44HBKgTI067066 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 17 May 2024 06:20:42 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 17 May 2024 06:20:42 -0500 Received: from lelvsmtp6.itg.ti.com (10.180.75.249) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Fri, 17 May 2024 06:20:42 -0500 Received: from localhost (uda0492258.dhcp.ti.com [172.24.227.9]) by lelvsmtp6.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44HBKfhh080832; Fri, 17 May 2024 06:20:41 -0500 Date: Fri, 17 May 2024 16:50:40 +0530 From: Siddharth Vadapalli To: Onkarnarth CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Maninder Singh Subject: Re: [PATCH 1/1] PCI : Refactoring error log prints for better readability Message-ID: <4ec3b167-9324-41d3-a086-74ca001b9042@ti.com> References: <20240517105923.2406246-1-onkarnath.1@samsung.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240517105923.2406246-1-onkarnath.1@samsung.com> X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On Fri, May 17, 2024 at 04:29:23PM +0530, Onkarnarth wrote: > From: Onkarnath I think that the $subject should be similar to: https://patchwork.kernel.org/comment/25712288/ rather than the generic "refactoring error log". > > As %pe is already introduced, it's better to use it in place of (%ld) or (%d) for > printing error in logs. It will enhance readability of logs. > > Error print style is more consistent now. > > Co-developed-by: Maninder Singh > Signed-off-by: Maninder Singh > Signed-off-by: Onkarnath > --- > Suggested by Bjorn Helgaas in below discussion > https://patchwork.kernel.org/comment/25712288/ Since you have indicated that Bjorn has suggested it, shouldn't there also be a "Suggested-by tag" in the commit message? > > drivers/pci/bus.c | 2 +- > drivers/pci/controller/dwc/pci-dra7xx.c | 2 +- > drivers/pci/controller/dwc/pci-meson.c | 16 +-- > drivers/pci/controller/dwc/pcie-armada8k.c | 4 +- > drivers/pci/controller/dwc/pcie-histb.c | 6 +- > drivers/pci/controller/dwc/pcie-intel-gw.c | 10 +- > drivers/pci/controller/dwc/pcie-keembay.c | 2 +- > drivers/pci/controller/dwc/pcie-kirin.c | 6 +- > drivers/pci/controller/dwc/pcie-qcom-ep.c | 18 +-- > drivers/pci/controller/dwc/pcie-qcom.c | 18 +-- > drivers/pci/controller/dwc/pcie-tegra194.c | 132 +++++++++--------- > drivers/pci/controller/dwc/pcie-uniphier-ep.c | 2 +- > drivers/pci/controller/pci-aardvark.c | 6 +- > drivers/pci/controller/pci-ftpci100.c | 2 +- > drivers/pci/controller/pci-tegra.c | 86 ++++++------ > drivers/pci/controller/pci-xgene.c | 4 +- > drivers/pci/controller/pcie-microchip-host.c | 2 +- > drivers/pci/controller/pcie-rcar-host.c | 14 +- > drivers/pci/controller/pcie-rockchip.c | 34 ++--- > drivers/pci/controller/vmd.c | 2 +- > drivers/pci/doe.c | 4 +- > drivers/pci/endpoint/functions/pci-epf-mhi.c | 8 +- > drivers/pci/endpoint/functions/pci-epf-ntb.c | 2 +- > drivers/pci/endpoint/functions/pci-epf-test.c | 4 +- > drivers/pci/endpoint/functions/pci-epf-vntb.c | 2 +- > drivers/pci/endpoint/pci-ep-cfs.c | 12 +- > drivers/pci/endpoint/pci-epf-core.c | 16 +-- > drivers/pci/hotplug/acpiphp_core.c | 2 +- > drivers/pci/hotplug/pciehp_core.c | 8 +- > drivers/pci/hotplug/shpchp_core.c | 4 +- > drivers/pci/of.c | 6 +- > drivers/pci/pci-driver.c | 4 +- > drivers/pci/pcie/dpc.c | 4 +- > drivers/pci/quirks.c | 2 +- > drivers/pci/setup-bus.c | 2 +- > drivers/pci/slot.c | 4 +- > drivers/pci/vgaarb.c | 2 +- > 37 files changed, 227 insertions(+), 227 deletions(-) > > diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c > index 826b5016a101..dbc16cf5a246 100644 > --- a/drivers/pci/bus.c > +++ b/drivers/pci/bus.c > @@ -351,7 +351,7 @@ void pci_bus_add_device(struct pci_dev *dev) > dev->match_driver = !dn || of_device_is_available(dn); > retval = device_attach(&dev->dev); > if (retval < 0 && retval != -EPROBE_DEFER) > - pci_warn(dev, "device attach failed (%d)\n", retval); > + pci_warn(dev, "device attach failed: %pe\n", ERR_PTR(retval)); Is there a reason behind dropping the parantheses? > > pci_dev_assign_added(dev, true); > } > diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c > index d2d17d37d3e0..79b6cc7f0287 100644 > --- a/drivers/pci/controller/dwc/pci-dra7xx.c > +++ b/drivers/pci/controller/dwc/pci-dra7xx.c > @@ -801,7 +801,7 @@ static int dra7xx_pcie_probe(struct platform_device *pdev) > reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH); > if (IS_ERR(reset)) { > ret = PTR_ERR(reset); > - dev_err(&pdev->dev, "gpio request failed, ret %d\n", ret); > + dev_err(&pdev->dev, "gpio request failed: %pe\n", ERR_PTR(ret)); Similar question as above regarding converting "failed, ret" to "failed:". Is this a new convention that is expected to be followed, where all errors are supposed to have "failed: %pe", rather than custom statements? Please let me know if this has already been discussed elsewhere. [...] Regards, Siddharth.