Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp535715pxm; Wed, 2 Mar 2022 03:45:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJxskvMSL+cHv1wSniZE7kmmTnu81TBIvlQiLFWt9S3flYGslGik6KaaM0B/rBjVvmOjACjj X-Received: by 2002:a05:6402:4384:b0:413:9e36:b56f with SMTP id o4-20020a056402438400b004139e36b56fmr18205592edc.280.1646221536814; Wed, 02 Mar 2022 03:45:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646221536; cv=none; d=google.com; s=arc-20160816; b=snUUz/+CfEffMg8ZcJ+T4zbMh7kizKDb0vUeEldavosOd6ZgTSbi8hOB1TzI5/Egxv 5+fdRRVCVP0Yt2Y7vOt+yj69mKSURcMhi9K2nZpltOfq2UXbbSCtC3LbLhoPT9EGntFq IkMwLkvRBmiC2qN/ncudpo8xQDYc9Irt+cPCioEURX4W95sA7Il99XA+kSoL6S5lA1JJ A9ts/f1Rj37B9mE9CHuOBBpEZcTHczk62Ui5mZVOpz0DIqXuRxjtJNDWfOp7DElIFmxm +1NS5jafIcev+/TlXmf/4/ttFFZAIrwAdYCTQthgDHP6OSXp3fhDe8/Qx1KFyw9G+O+M 1hBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:content-language :thread-index:content-transfer-encoding:mime-version:message-id:date :subject:in-reply-to:cc:to:from:dkim-signature:dkim-filter; bh=kq8MQbVRkc+bOUL5EisgTWGyifp1Wf2QScEObld1uDc=; b=qqXkHKp9zNv9bfQMfIm7lBo+p/1v1HBLFOLDkA53A3ylucs7Ys1cuag0T+4XnPsDuL T2K/wnNyWgRQTSiGDGvKoa6cyGdz6ktz2Y2fSviP4grSvvdUm70kITsBVO0EqkTdxnmC kXUTvTOOMas4HgnfdVvx6lLBNF3WcKo8Jt4YofqI3plh6/ZvF31XPdo9ihyW/ClHYOaN 368xoQVI/IFco1O8sMOq54+76p3nz/WwDvunN8nwl4DRZadqRfuIC6my92RRP6E3od79 LkePd9Yu8NK9Op3sNQF7ESQQvy4ItJqLzFTCk6vFVpRUPy9btdI5VrlD3Nv6UIcdo5gt 0ftg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VBiAPt2Z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r23-20020a170906705700b006d6e5456b4bsi2618872ejj.833.2022.03.02.03.45.09; Wed, 02 Mar 2022 03:45:36 -0800 (PST) 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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=VBiAPt2Z; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241099AbiCBLBL (ORCPT + 99 others); Wed, 2 Mar 2022 06:01:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234836AbiCBLBI (ORCPT ); Wed, 2 Mar 2022 06:01:08 -0500 Received: from mailout4.samsung.com (mailout4.samsung.com [203.254.224.34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B53496E793 for ; Wed, 2 Mar 2022 03:00:21 -0800 (PST) Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20220302110016epoutp041a927424bdc2c68c0a0eb4373c547fac~Yi0qhg5jZ2626226262epoutp04_ for ; Wed, 2 Mar 2022 11:00:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20220302110016epoutp041a927424bdc2c68c0a0eb4373c547fac~Yi0qhg5jZ2626226262epoutp04_ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1646218816; bh=kq8MQbVRkc+bOUL5EisgTWGyifp1Wf2QScEObld1uDc=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=VBiAPt2ZvaQ40xwTA8+UZ8RzRuOIDVE9uv49XxDqKoVuisSMBghbFybAjH7/9Iwru TMNjOQnksf8x/hQ2B2Yy/KLdmU4zQ/C+QSDhP1DvjRKI7NYAEDACoW9CB2yCOo0wyN x7oUTRy6L+AcVZll59VcXkiPT92+vyLyc4V8fRWc= Received: from epsnrtp1.localdomain (unknown [182.195.42.162]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20220302110015epcas1p11e00fb34377d4913a5204264f2a86106~Yi0qGCeoa0938509385epcas1p1j; Wed, 2 Mar 2022 11:00:15 +0000 (GMT) Received: from epsmges1p3.samsung.com (unknown [182.195.38.241]) by epsnrtp1.localdomain (Postfix) with ESMTP id 4K7rk64VW2z4x9Ps; Wed, 2 Mar 2022 11:00:14 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p3.samsung.com (Symantec Messaging Gateway) with SMTP id 7F.25.09592.E3E4F126; Wed, 2 Mar 2022 20:00:14 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas1p4.samsung.com (KnoxPortal) with ESMTPA id 20220302110014epcas1p48988c9d9e7f43f5ca002f718baa7ae53~Yi0odL9Xt1455414554epcas1p4C; Wed, 2 Mar 2022 11:00:14 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20220302110014epsmtrp120570eea30bcef7d260dbef848ee1bda~Yi0ocaG5d0587005870epsmtrp1Q; Wed, 2 Mar 2022 11:00:14 +0000 (GMT) X-AuditID: b6c32a37-28fff70000002578-9c-621f4e3e3792 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id E7.59.29871.E3E4F126; Wed, 2 Mar 2022 20:00:14 +0900 (KST) Received: from yj84jang02 (unknown [10.88.97.211]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20220302110013epsmtip2d98d3399c45cf71f6484d5611b47ffdc~Yi0oO1qT42184721847epsmtip2H; Wed, 2 Mar 2022 11:00:13 +0000 (GMT) From: =?ks_c_5601-1987?B?wOW/tcH4L1RWIFMvVyBMYWIoVkQpL1N0YWZmIEVuZ2luZWVyL7vv?= =?ks_c_5601-1987?B?vLrA/MDa?= To: "'Greg Kroah-Hartman'" Cc: "'Rafael J. Wysocki'" , "'Pavel Machek'" , "'Len Brown'" , "'Bjorn Helgaas'" , , , , , , In-Reply-To: Subject: RE: [PATCH] PM: Add device name to suspend_report_result() Date: Wed, 2 Mar 2022 20:00:14 +0900 Message-ID: <03e001d82e24$b1b0e450$1512acf0$@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ks_c_5601-1987" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQGYo0TT2vM3t6OMkLszEBoeXVnaDgIOdYpqAcZRUMetDFa0cA== Content-Language: ko X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOJsWRmVeSWpSXmKPExsWy7bCmrq6dn3ySwbk/ihZLmjIsmhevZ7N4 dPM3q8WsKXuZLJbv62e0uLxrDpvF2XnH2Sw+9x5htFi0rJXZ4u6po2wWc79MZXbg9liwqdRj 8Z6XTB6bVnWyeeyfu4bdo2/LKkaPFau/s3t83iQXwB6VbZORmpiSWqSQ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AA X-CMS-MailID: 20220302110014epcas1p48988c9d9e7f43f5ca002f718baa7ae53 X-Msg-Generator: CA X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20220302064921epcas1p19fbe8c017d776657caa696a3cef10093 References: <20220302064917.64073-1-yj84.jang@samsung.com> X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,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 > -----Original Message----- > From: Greg Kroah-Hartman > Sent: Wednesday, March 2, 2022 4:58 PM > To: Youngjin Jang > Cc: Rafael J. Wysocki ; Pavel Machek ; > Len Brown ; Bjorn Helgaas ; > linux-pm@vger.kernel.org; linux-kernel@vger.kernel.org; linux- > pci@vger.kernel.org; linux-acpi@vger.kernel.org; linux- usb@vger.kernel.org; > js07.lee@samsung.com > Subject: Re: [PATCH] PM: Add device name to suspend_report_result() > > On Wed, Mar 02, 2022 at 03:49:17PM +0900, Youngjin Jang wrote: > > From: "yj84.jang" > > > > currently, suspend_report_result() prints only function information. > > If any driver uses common pm function, nobody knows who called failed > > function exactly. > > > > So, device information is needed to recognize specific wrong driver. > > > > e.g.) > > PM: dpm_run_callback(): pm_generic_suspend+0x0/0x48 returns 0 > > PM: dpm_run_callback(): platform_pm_suspend+0x0/0x68 returns 0 after > > patch, > > PM: dpm_run_callback(): pm_generic_suspend+0x0/0x48 (amba) returns 0 > > PM: dpm_run_callback(): platform_pm_suspend+0x0/0x68 (armv7-pmu) > > returns 0 > > > > Signed-off-by: yj84.jang > > --- > > drivers/base/power/main.c | 10 +++++----- > > drivers/pci/pci-driver.c | 14 +++++++------- > > drivers/pnp/driver.c | 2 +- > > drivers/usb/core/hcd-pci.c | 4 ++-- > > include/linux/pm.h | 8 ++++---- > > 5 files changed, 19 insertions(+), 19 deletions(-) > > > > diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c > > index 04ea92c..a762fe8 100644 > > --- a/drivers/base/power/main.c > > +++ b/drivers/base/power/main.c > > @@ -485,7 +485,7 @@ static int dpm_run_callback(pm_callback_t cb, struct > device *dev, > > trace_device_pm_callback_start(dev, info, state.event); > > error = cb(dev); > > trace_device_pm_callback_end(dev, error); > > - suspend_report_result(cb, error); > > + suspend_report_result(dev, cb, error); > > > > initcall_debug_report(dev, calltime, cb, error); > > > > @@ -1568,7 +1568,7 @@ static int legacy_suspend(struct device *dev, > pm_message_t state, > > trace_device_pm_callback_start(dev, info, state.event); > > error = cb(dev, state); > > trace_device_pm_callback_end(dev, error); > > - suspend_report_result(cb, error); > > + suspend_report_result(dev, cb, error); > > > > initcall_debug_report(dev, calltime, cb, error); > > > > @@ -1855,7 +1855,7 @@ static int device_prepare(struct device *dev, > pm_message_t state) > > device_unlock(dev); > > > > if (ret < 0) { > > - suspend_report_result(callback, ret); > > + suspend_report_result(dev, callback, ret); > > pm_runtime_put(dev); > > return ret; > > } > > @@ -1960,10 +1960,10 @@ int dpm_suspend_start(pm_message_t state) } > > EXPORT_SYMBOL_GPL(dpm_suspend_start); > > > > -void __suspend_report_result(const char *function, void *fn, int ret) > > +void __suspend_report_result(const char *function, struct device > > +*dev, void *fn, int ret) > > { > > if (ret) > > - pr_err("%s(): %pS returns %d\n", function, fn, ret); > > + pr_err("%s(): %pS (%s) returns %d\n", function, fn, > > +dev_driver_string(dev), ret); > > If you have a struct device, please use dev_err(). > > thanks, > > greg k-h Hello, Thanks for your review. I think dev_err() is nice option, but we can see a minor issue. Prefix log "PM: " would be lost, If I use dev_err() in this context. As you know, all logs in power management include "PM :" prefix. So, I think pr_err() with detail information would be better than dev_err(). - PM: amba 1740000.etm: dpm_run_callback(): pm_generic_resume+0x0/0x48 returns 0