]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - lib/vsprintf.c
vsprintf: Add support for IORESOURCE_UNSET in %pR
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 26 Feb 2014 18:25:56 +0000 (11:25 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 26 Feb 2014 21:42:09 +0000 (14:42 -0700)
commitd19cb803a2ff85d1b64b9628e1aec2aa76a9260b
treead782893ca50522d4285df1e523c5020f7095bfe
parent5edb93b89f6cc3089ee283656555e7a9ad36a8a0
vsprintf: Add support for IORESOURCE_UNSET in %pR

Sometimes we have a struct resource where we know the type (MEM/IO/etc.)
and the size, but we haven't assigned address space for it.  The
IORESOURCE_UNSET flag is a way to indicate this situation.  For these
"unset" resources, the start address is meaningless, so print only the
size, e.g.,

  - pci 0000:0c:00.0: reg 184: [mem 0x00000000-0x00001fff 64bit]
  + pci 0000:0c:00.0: reg 184: [mem size 0x2000 64bit]

For %pr (printing with raw flags), we still print the address range,
because %pr is mostly used for debugging anyway.

Thanks to Fengguang Wu <fengguang.wu@intel.com> for suggesting
resource_size().

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
include/linux/ioport.h
lib/vsprintf.c