Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp964778ybm; Wed, 27 May 2020 12:20:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBNtLm/dV2gOMIIwmbr00enFklTvKoHoH7yCYGPrxSe1W0DFFciAojQ9K3nONYxaNK8G68 X-Received: by 2002:a50:81e6:: with SMTP id 93mr26068294ede.45.1590607230377; Wed, 27 May 2020 12:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590607230; cv=none; d=google.com; s=arc-20160816; b=RBRU3f0v75IVdFJ3KrbMoeQePWFiAw4BB9pUs3lp3+08Ahf57WD4MMmgW/HZB1e+Qp /IUtjESjKzLQAtD0ORMGXRTd6legGvh6k9teErjRHU+hkDkON74ntqjSWnOap8rLFs/f 7doB85IfiCmyv5MXrICbgbPPiT+a3LN8zB60rg/WPcaE+X1vocsmRyZmK6YvOOZBG5ze 0NaUbmK/Z8h9Pis2BOGbzUOOfxwdSNw7IlvF0hOIdpXzzono/isIuGi43ony6bQAnFCH 6WydNgjFLdQs/AraBDbGLS9nEkqb76OmUj/BnM7aZmYBxxhtBXzl/WJ2qEjwiDBaBP8j cmTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=l4CHRhKd4ddoc9kZnFrt+htPzprbXuUVKkoToc+xOXw=; b=NmK9LaMKU2vS6uiA4oxp12rvoj11R+Ge5i/ypvjSbX7uxyZfUnL67J8jdT2amBfg3j O5ZLu7ypEk84EMpIk5s44MLoyrzpnM0JtigoIhhtdSLqwlucsJr9yzhjmavG2z949Uyn 3QUCZ1/HYwfNMPhUum8nN3USX7Hun9r/A1Hw6XFIC5xFYNvb8uheltUQ645X2cB+cXk9 6YzZJ6M0RFaHIXpk9BW2KZMfdfHdFb/YhnGD+EkPK4QHsliMObKSUpz2QvVoIsrWJdqT ifdhpgNy3CiCe7lpEtYt5J7j9cPNyZbsG+UZYAKD1G6CZnkqINPYF8KtQfKcPePuFOyR TYcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b38dsy5B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 21si2222138edx.378.2020.05.27.12.20.07; Wed, 27 May 2020 12:20:30 -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=@kernel.org header.s=default header.b=b38dsy5B; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391492AbgE0Rnu (ORCPT + 98 others); Wed, 27 May 2020 13:43:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:37972 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388343AbgE0Rnt (ORCPT ); Wed, 27 May 2020 13:43:49 -0400 Received: from localhost (mobile-166-175-190-200.mycingular.net [166.175.190.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0DCEE20663; Wed, 27 May 2020 17:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590601429; bh=qsk677uI1G7xG388JRQ1EJcb+HhzqzXoxdTlVWzea00=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b38dsy5BnxkemvB3aPYKCSp1dQnRdVruwP9i/zmHaxl2Nc2tYliSvyXorhy6EveSt mrBcJSt8Swhi4bC7MYWSGFXFuo0fZmzniwoYXhi4KFqdazKK4EdZSWBjgFIgk8Nwlq pvKME8zXxxqF+hce0F4a5Kawn3FZbQjYHtntOCuI= From: Bjorn Helgaas To: Boris Ostrovsky , Juergen Gross Cc: Stefano Stabellini , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 2/2] xenbus: Use dev_printk() when possible Date: Wed, 27 May 2020 12:43:26 -0500 Message-Id: <20200527174326.254329-3-helgaas@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200527174326.254329-1-helgaas@kernel.org> References: <20200527174326.254329-1-helgaas@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bjorn Helgaas Use dev_printk() when possible to include device and driver information in the conventional format. Add "#define dev_fmt" to preserve KBUILD_MODNAME in messages. No functional change intended. Signed-off-by: Bjorn Helgaas --- drivers/xen/xenbus/xenbus_probe.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c index 8c4d05b687b7..ee9a9170b43a 100644 --- a/drivers/xen/xenbus/xenbus_probe.c +++ b/drivers/xen/xenbus/xenbus_probe.c @@ -31,6 +31,7 @@ */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#define dev_fmt pr_fmt #define DPRINTK(fmt, args...) \ pr_debug("xenbus_probe (%s:%d) " fmt ".\n", \ @@ -608,7 +609,7 @@ int xenbus_dev_suspend(struct device *dev) if (drv->suspend) err = drv->suspend(xdev); if (err) - pr_warn("suspend %s failed: %i\n", dev_name(dev), err); + dev_warn(dev, "suspend failed: %i\n", err); return 0; } EXPORT_SYMBOL_GPL(xenbus_dev_suspend); @@ -627,8 +628,7 @@ int xenbus_dev_resume(struct device *dev) drv = to_xenbus_driver(dev->driver); err = talk_to_otherend(xdev); if (err) { - pr_warn("resume (talk_to_otherend) %s failed: %i\n", - dev_name(dev), err); + dev_warn(dev, "resume (talk_to_otherend) failed: %i\n", err); return err; } @@ -637,15 +637,14 @@ int xenbus_dev_resume(struct device *dev) if (drv->resume) { err = drv->resume(xdev); if (err) { - pr_warn("resume %s failed: %i\n", dev_name(dev), err); + dev_warn(dev, "resume failed: %i\n", err); return err; } } err = watch_otherend(xdev); if (err) { - pr_warn("resume (watch_otherend) %s failed: %d.\n", - dev_name(dev), err); + dev_warn(dev, "resume (watch_otherend) failed: %d\n", err); return err; } -- 2.25.1