From: Joe Perches <joe@perches.com>
To: Shreyas Bhatewara <sbhatewara@vmware.com>
Cc: netdev@vger.kernel.org, pv-drivers@vmware.com, petr@vmware.com
Subject: Re: [PATCH] vmxnet3: Fix log messages and corrects some typos
Date: Tue, 28 Feb 2012 23:02:05 -0800 [thread overview]
Message-ID: <1330498925.4352.13.camel@joe2Laptop> (raw)
In-Reply-To: <alpine.LRH.2.00.1202282209500.19873@sbhatewara-dev1.eng.vmware.com>
On Tue, 2012-02-28 at 22:55 -0800, Shreyas Bhatewara wrote:
> Fix log messages and corrects some typos
Please don't split formats.
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
> @@ -2709,8 +2709,8 @@ vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter,
> adapter->intr.num_intrs = vectors;
> return 0;
> } else if (err < 0) {
> - printk(KERN_ERR "Failed to enable MSI-X for %s, error"
> - " %d\n", adapter->netdev->name, err);
> + netdev_info(adapter->netdev, "Failed to enable MSI-X, "
> + "error: %d\n", err);
Why change from err to info?
And perhaps this is better as:
netdev_err(adapter->netdev,
"Failed to enable MSI-X for %s, error: %d\n",
err);
[]
> @@ -2718,15 +2718,15 @@ vmxnet3_acquire_msix_vectors(struct vmxnet3_adapter *adapter,
> /* If fails to enable required number of MSI-x vectors
> * try enabling minimum number of vectors required.
> */
> + netdev_info(adapter->netdev, "Failed to enable %d MSI-X"
> + ", trying %d instead\n", vectors,
> + vector_threshold);
[]
> - printk(KERN_INFO "Number of MSI-X interrupts which can be allocatedi"
> - " are lower than min threshold required.\n");
> + netdev_info(adapter->netdev, "Number of MSI-X interrupts which can be "
> + " allocated are lower than min threshold required.\n");
This is an example of why not to split formats.
You added 2 spaces between be and allocated.
> return err;
> }
>
> @@ -2792,8 +2792,8 @@ vmxnet3_alloc_intr_resources(struct vmxnet3_adapter *adapter)
> return;
>
> /* If we cannot allocate MSIx vectors use only one rx queue */
> - printk(KERN_INFO "Failed to enable MSI-X for %s, error %d."
> - "#rx queues : 1, try MSI\n", adapter->netdev->name, err);
> + netdev_info(adapter->netdev, "Failed to enable MSI-X, error %d."
> + "Limiting #rx queues to 1, try MSI.\n", err);
Need a space after %d.
cheers, Joe
next prev parent reply other threads:[~2012-02-29 7:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-29 6:55 [PATCH] vmxnet3: Fix log messages and corrects some typos Shreyas Bhatewara
2012-02-29 7:02 ` Joe Perches [this message]
2012-02-29 8:08 ` Shreyas Bhatewara
2012-03-05 2:38 ` David Miller
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=1330498925.4352.13.camel@joe2Laptop \
--to=joe@perches.com \
--cc=netdev@vger.kernel.org \
--cc=petr@vmware.com \
--cc=pv-drivers@vmware.com \
--cc=sbhatewara@vmware.com \
/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