xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH] pass-through: drop pointless uses of __func__
Date: Wed, 24 Aug 2016 16:28:32 -0400	[thread overview]
Message-ID: <20160824202832.GB23337@char.us.oracle.com> (raw)
In-Reply-To: <57BD6E110200007800108790@prv-mh.provo.novell.com>

On Wed, Aug 24, 2016 at 01:51:13AM -0600, Jan Beulich wrote:
> Non-debugging message text should be (and is in the cases here)
> distinguishable without also logging function names. Additionally log
> the PCI device coordinates for alloc_pdev() failure.
> 

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -379,8 +379,8 @@ static struct pci_dev *alloc_pdev(struct
>              break;
>  
>          default:
> -            printk(XENLOG_WARNING "%s: unknown type: %04x:%02x:%02x.%u\n",
> -                   __func__, pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
> +            printk(XENLOG_WARNING "%04x:%02x:%02x.%u: unknown type %d\n",
> +                   pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pdev->type);
>              break;
>      }
>  
> @@ -991,7 +991,8 @@ static int __init _scan_pci_devices(stru
>                  pdev = alloc_pdev(pseg, bus, PCI_DEVFN(dev, func));
>                  if ( !pdev )
>                  {
> -                    printk("%s: alloc_pdev failed.\n", __func__);
> +                    printk(XENLOG_WARNING "%04x:%02x:%02x.%u: alloc_pdev failed\n",
> +                           pseg->nr, bus, dev, func);
>                      return -ENOMEM;
>                  }
>  
> 
> 
> 

> pass-through: drop pointless uses of __func__
> 
> Non-debugging message text should be (and is in the cases here)
> distinguishable without also logging function names. Additionally log
> the PCI device coordinates for alloc_pdev() failure.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> 
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -379,8 +379,8 @@ static struct pci_dev *alloc_pdev(struct
>              break;
>  
>          default:
> -            printk(XENLOG_WARNING "%s: unknown type: %04x:%02x:%02x.%u\n",
> -                   __func__, pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
> +            printk(XENLOG_WARNING "%04x:%02x:%02x.%u: unknown type %d\n",
> +                   pseg->nr, bus, PCI_SLOT(devfn), PCI_FUNC(devfn), pdev->type);
>              break;
>      }
>  
> @@ -991,7 +991,8 @@ static int __init _scan_pci_devices(stru
>                  pdev = alloc_pdev(pseg, bus, PCI_DEVFN(dev, func));
>                  if ( !pdev )
>                  {
> -                    printk("%s: alloc_pdev failed.\n", __func__);
> +                    printk(XENLOG_WARNING "%04x:%02x:%02x.%u: alloc_pdev failed\n",
> +                           pseg->nr, bus, dev, func);
>                      return -ENOMEM;
>                  }
>  

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> https://lists.xen.org/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2016-08-24 20:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24  7:51 [PATCH] pass-through: drop pointless uses of __func__ Jan Beulich
2016-08-24 20:28 ` Konrad Rzeszutek Wilk [this message]
2016-08-31 18:36 ` Andrew Cooper
2016-09-01  7:11   ` Jan Beulich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160824202832.GB23337@char.us.oracle.com \
    --to=konrad.wilk@oracle.com \
    --cc=JBeulich@suse.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).