Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp279285pxm; Wed, 2 Mar 2022 15:16:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIFqWsWBA4A3TfoiguIke3ymtx29vFAW0ftB+nN/xRIPYRpVICPYrEZb0UI12cOPBMNNJH X-Received: by 2002:a63:ef55:0:b0:379:40e:2804 with SMTP id c21-20020a63ef55000000b00379040e2804mr6369213pgk.317.1646262994350; Wed, 02 Mar 2022 15:16:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646262994; cv=none; d=google.com; s=arc-20160816; b=f0v1Y+Q+BwkQhhGcDT0TO6bjoLQQiCEDyzQcKQFe/sf9WsG8OKcDY+kIvZZNw9d+of g8dm0l+rm3XAJ1nSlovFWtXGXAetBMuMALxFn8agbrlYEZ9KwAWhTsmEcvXUd/NA7Vcw 4hz7TOOwEZ3KaIcqn+D5GJkRmP4LapnHxwn8y472+nwXgJoQmY3JYaX97+myUiI+Euc/ 0DsDaZKpvaqfeRmi/rcJV4TljsU3KNQs3qWYTcAMmsF2aqaH8Wr1cBxx930d4NY7gQsL cjoj4351vAmL7vuhp+pEb+DF4oTbrUADZNVvSmpDy5HI/QgM/uYrO06PDIPsRByI0jfv z9EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=CabyaA96/ivb5bynubXCOEYwFnhgLMaAFts3f7z4DZ4=; b=WN2sXwKGbJ1i8jsuCcVofTZa+96sQizg5rbbIDCBK0U8MIbhP3SkF6gQgbE2wyKtTj 9kVAcle+XiTPlXnBfVgHerVymIG7AKPaSZooEzgganohmDKFIeZnjDnv8uX86HUJr3O6 O85ANqdAE4RKcLYHETrmHeJrGJZWP9WBBH196eag4QTSusFNbb+goe/2Q2484odSiD21 akxN2QXgNRkIfh42xYbqY08tqmNNGTs/8aopJKn3DWjTiKDEDYF6t+86h6RyXvg5XTi9 dKPne6Dd1wEnxhyVL7WuNMhUc6OX8E9vdC4hjCdE8s42HaB02BwIxCXWDQxk/+yhCF9Y KLiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u3wOky+q; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z4-20020a630a44000000b003757999f306si351195pgk.778.2022.03.02.15.16.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:16:34 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=u3wOky+q; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CB8C25D662; Wed, 2 Mar 2022 14:53:41 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242841AbiCBUQv (ORCPT + 99 others); Wed, 2 Mar 2022 15:16:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbiCBUQt (ORCPT ); Wed, 2 Mar 2022 15:16:49 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BB7ECD5E7; Wed, 2 Mar 2022 12:16:06 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EA406B82217; Wed, 2 Mar 2022 20:16:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 529A7C004E1; Wed, 2 Mar 2022 20:16:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646252163; bh=3uEcPVxR18DIwu+REDKdxAo26fa8S3FNjHjDUImg5oc=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=u3wOky+qEPWUobrPJ5u1iR8FeObVZCSM8Gvpk7Z2udD8iXOV2KcUQCqmhyIz8Qb/e jlvbp0s80dGVIWP4gITBDvX3aQIqj0i+Tw7gqhVvsvCwMukk298DqJ0+SvZgQbaUHc xmkxzYndTse10ayo2vGHPyUGnMDv0kcbtFMM6YCmMApRnV88P9XB2JD9H6ArM9MYiX wBo+FvmOCAQNuwPMPTzqe4sL1oqOKB1CZ3ee0dRpSf65IqZqEfbabxaH/Va4S+OkO7 MjAG0I3zHqGyqcNuUbTl19wQV+gfrVDFE5ybfp7pPE3D6d207ckhHzcl0EuFfHtmql Cth4nwsIxHSKQ== Date: Wed, 2 Mar 2022 14:16:00 -0600 From: Bjorn Helgaas To: 'Greg Kroah-Hartman' Cc: =?utf-8?B?77+95b+177+977+9L1RWIFMvVyBMYWIoVkQpL1N0YWZmIEVuZ2luZWVyLw==?= =?utf-8?B?77+977y677+977+977+977+9?= , "'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() Message-ID: <20220302201600.GA746065@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On Wed, Mar 02, 2022 at 03:52:51PM +0100, 'Greg Kroah-Hartman' wrote: > On Wed, Mar 02, 2022 at 08:00:14PM +0900, �念��/TV S/W Lab(VD)/Staff Engineer/�Z���� wrote: > > > -----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 > > > > - 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(). > > > > 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. > > Why does that matter? Fix them all to use the struct device pointer and > then they will be properly unified with the rest of the kernel log > infrastructure. You can #define dev_fmt if you need a prefix.