Received: by 2002:a25:5b86:0:0:0:0:0 with SMTP id p128csp1892510ybb; Fri, 29 Mar 2019 13:33:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzkH9TlmvtaDE3ghLBKmSzx2zZ9QaoOr6wWBQ6LGUdq1dPAAYddnggC82/LJvc+XUrJWjKf X-Received: by 2002:a62:6c43:: with SMTP id h64mr49262888pfc.123.1553891624436; Fri, 29 Mar 2019 13:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553891624; cv=none; d=google.com; s=arc-20160816; b=zya6xVUFposiK1fsV5hHxV5ChuUZ8JrbYNUwMvud2LqttU2hxfvY3dXdRD36xpJQFJ MrVeRlhyCjktWYPEKDY4VI/VUH0sLpWWK8Ix/y2TLzRxsVOuKKmgHSlSBTigYi4ICqrH MH3oWN66KtnNskZxdGO0nXyIx9/frAVwSnPVxVDu9n0QiUZuFSfIoMuICgluhR6T/V1R qMQ5vXcZJO+q6kgYZqbVcal1/jAgbR6xG8bE4+015aaCDWzkEcP7IsSgioEvfzdHuK54 lmaJt7DVsV1D82LYzbESRcPjS4UGOfegk9ElJ7VOJubRNkXbLJL3Z3G/NCaXqH/uWPjF K4hQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=8FqutL3Y067U50SnlceptGNiHttfoC3L773F/g2bfNE=; b=LkSsdeP9Bo5maaXRzG4L2NjEQSuoOekfikenoRj8eHW5W0K6GQuMLtzPfBx6gHwfXk zGOlbKwkFo1lmpDtaRMuSfwfoh0DVdz4JvOzu6AcJvpnWW5eZ51cuShjmCe6n137VTk/ Bx2Bq31i3mKcgXs5Q5dqeQhJxoSD8cEdmStCdD3rLMR7z+AFDa4e8q8SJpPofFtGS5X1 frI/USZiivfBC/2j25BOzTZHlQ7oKqGevGtFFggAc3sNVy+VrEmx8Obgf1OOWVCIGE7C ytvUhHKRbTCeudxJcRAjxke8sC5BgH9OtimJopo2wslKXFx4wIedsDdJ+6Bxz9OhAJgd ghTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l14si2611021pfj.112.2019.03.29.13.33.29; Fri, 29 Mar 2019 13:33:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730163AbfC2Uck (ORCPT + 99 others); Fri, 29 Mar 2019 16:32:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58584 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730086AbfC2Uck (ORCPT ); Fri, 29 Mar 2019 16:32:40 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2766B308620F; Fri, 29 Mar 2019 20:32:40 +0000 (UTC) Received: from x1.home (ovpn-116-99.phx2.redhat.com [10.3.116.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9DEB119C65; Fri, 29 Mar 2019 20:32:39 +0000 (UTC) Date: Fri, 29 Mar 2019 14:32:39 -0600 From: Alex Williamson To: Bjorn Helgaas Cc: Joe Perches , Bjorn Helgaas , kvm@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] vfio: Use dev_printk() when possible Message-ID: <20190329143239.60d4b9a6@x1.home> In-Reply-To: References: <20190325194220.5873-1-helgaas@kernel.org> <4faf234df19c1b54b70cbe82c0dacacc58568b87.camel@perches.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 29 Mar 2019 20:32:40 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 29 Mar 2019 12:03:11 -0500 Bjorn Helgaas wrote: > On Mon, Mar 25, 2019 at 3:49 PM Joe Perches wrote: > > > > On Mon, 2019-03-25 at 14:42 -0500, Bjorn Helgaas wrote: > > > Use dev_printk() when possible to make messages consistent with other > > > device-related messages. > > > > trivial note: > > > > > diff --git a/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c b/drivers/vfio/platform/reset/vfio_platform_amdxgbe.c > > [] > > > @@ -89,7 +89,8 @@ static int vfio_platform_amdxgbe_reset(struct vfio_platform_device *vdev) > > > } while ((pcs_value & MDIO_CTRL1_RESET) && --count); > > > > > > if (pcs_value & MDIO_CTRL1_RESET) > > > - pr_warn("%s XGBE PHY reset timeout\n", __func__); > > > + dev_warn(&vdev->device, "%s XGBE PHY reset timeout\n", > > > + __func__); > > > > Many of these could use a colon after the %s used with __func__ > > to make the output more consistent with other modules. > > Thanks, Joe. I added a colon to the two in > vfio_platform_amdxgbe_reset(). Those were the only ones I saw, except > for a couple "%s failed" messages in > drivers/vfio/vfio_iommu_spapr_tce.c, which I didn't change because (1) > they can't use dev_err() so slightly out of scope for this patch, and > (2) it arguably reads more naturally without the colon. > > In vfio_pci.c, I converted some pr_info() to dev_info() without adding > a dev_fmt definition, so that removed the KBUILD_MODNAME prefix, which > I didn't intend. I'll add "#define dev_fmt pr_fmt" to restore the > prefix. > > Messages from drivers/vfio use a variety of prefixes (none, "VFIO: ", > KBUILD_MODNAME, __func__). That could potentially be rationalized but > I would want Alex's guidance first. Hmm, sort of hard to generalize. I suspect "VFIO:" is not super useful, the module name is probably a better choice, augmented by __func__ where it adds useful context. That's probably the approach I'd take. Thanks, Alex