linux-hyperv.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: "Krzysztof Wilczyński" <kw@linux.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	Boqun Feng <boqun.feng@gmail.com>, Long Li <longli@microsoft.com>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Stephen Hemminger <sthemmin@microsoft.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/3] PCI: hv: Remove unnecessary integer promotion from dev_err()
Date: Tue, 12 Oct 2021 13:47:49 -0500	[thread overview]
Message-ID: <20211012184749.GA1775474@bhelgaas> (raw)
In-Reply-To: <20211008222732.2868493-1-kw@linux.com>

On Fri, Oct 08, 2021 at 10:27:30PM +0000, Krzysztof Wilczyński wrote:
> Internally, printk() et al already correctly handles the standard
> integer promotions, so there is no need to explicitly "%h" modifier as
> part of a format string such as "%hx".
> 
> Thus, drop the "%h" modifier as it's completely unnecessary (N.B. this
> wouldn't be true for the sscanf() function family), and match preferred
> coding style.
> 
> Related:
>   commit cbacb5ab0aa0 ("docs: printk-formats: Stop encouraging use of unnecessary
>   commit 70eb2275ff8e ("checkpatch: add warning for unnecessary use of %h[xudi] and %hh[xudi]")
>   https://lore.kernel.org/lkml/CAHk-=wgoxnmsj8GEVFJSvTwdnWm8wVJthefNk2n6+4TC=20e0Q@mail.gmail.com/
> 
> No change to functionality intended.

Applied 1/3 and 3/3 to pci/misc for v5.16, thanks!

For 2/3, I think we might want to convert the VF ID to be unsigned
consistently.

> Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
> ---
>  drivers/pci/controller/pci-hyperv.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index 67c46e52c0dc..6733cb14e775 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -3126,14 +3126,14 @@ static int hv_pci_probe(struct hv_device *hdev,
>  
>  	if (dom == HVPCI_DOM_INVALID) {
>  		dev_err(&hdev->device,
> -			"Unable to use dom# 0x%hx or other numbers", dom_req);
> +			"Unable to use dom# 0x%x or other numbers", dom_req);
>  		ret = -EINVAL;
>  		goto free_bus;
>  	}
>  
>  	if (dom != dom_req)
>  		dev_info(&hdev->device,
> -			 "PCI dom# 0x%hx has collision, using 0x%hx",
> +			 "PCI dom# 0x%x has collision, using 0x%x",
>  			 dom_req, dom);
>  
>  	hbus->bridge->domain_nr = dom;
> -- 
> 2.33.0
> 

  parent reply	other threads:[~2021-10-12 18:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-08 22:27 [PATCH 1/3] PCI: hv: Remove unnecessary integer promotion from dev_err() Krzysztof Wilczyński
2021-10-08 22:27 ` [PATCH 2/3] PCI: iov: Update format string type to match variable type Krzysztof Wilczyński
2021-10-11 21:13   ` Bjorn Helgaas
2021-10-08 22:27 ` [PATCH 3/3] PCI: Update variable type to match sscanf() format string Krzysztof Wilczyński
2021-10-12 18:47 ` Bjorn Helgaas [this message]
2021-10-13  0:43   ` [PATCH 1/3] PCI: hv: Remove unnecessary integer promotion from dev_err() Krzysztof Wilczyński

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=20211012184749.GA1775474@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=boqun.feng@gmail.com \
    --cc=decui@microsoft.com \
    --cc=haiyangz@microsoft.com \
    --cc=kw@linux.com \
    --cc=kys@microsoft.com \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=longli@microsoft.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=sthemmin@microsoft.com \
    --cc=wei.liu@kernel.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).