All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org,  marcel.apfelbaum@gmail.com,
	ben.widawsky@intel.com,  jonathan.cameron@huawei.com,
	 philmd@linaro.org
Subject: Re: [PATCH 4/5] include/hw/pci: Split pci_device.h off pci.h
Date: Thu, 22 Dec 2022 10:35:51 +0100	[thread overview]
Message-ID: <87ili3g4qw.fsf@pond.sub.org> (raw)
In-Reply-To: <20221221063216-mutt-send-email-mst@kernel.org> (Michael S. Tsirkin's message of "Wed, 21 Dec 2022 06:33:16 -0500")

"Michael S. Tsirkin" <mst@redhat.com> writes:

> On Fri, Dec 09, 2022 at 02:48:01PM +0100, Markus Armbruster wrote:
>> PCIDeviceClass and PCIDevice are defined in pci.h.  Many users of the
>> header don't actually need them.  Similar structs live in their own
>> headers: PCIBusClass and PCIBus in pci_bus.h, PCIBridge in
>> pci_bridge.h, PCIHostBridgeClass and PCIHostState in pci_host.h,
>> PCIExpressHost in pcie_host.h, and PCIERootPortClass, PCIEPort, and
>> PCIESlot in pcie_port.h.
>> 
>> Move PCIDeviceClass and PCIDeviceClass to new pci_device.h, along with
>> the code that needs them.  Adjust include directives.
>> 
>> This also enables the next commit.
>> 
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>
>
> checkpatch is unhappy:
>
> ./scripts/checkpatch.pl /tmp/patch 
> WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
> #707: 
> new file mode 100644

We're good:

    $ scripts/get_maintainer.pl -f include/hw/pci/pci_device.h 
    "Michael S. Tsirkin" <mst@redhat.com> (supporter:PCI)
    Marcel Apfelbaum <marcel.apfelbaum@gmail.com> (supporter:PCI)
    qemu-devel@nongnu.org (open list:All patches CC here)

But checkpatch is too simple-minded to see that.

> ERROR: spaces required around that '*' (ctx:WxV)
> #997: FILE: include/hw/pci/pci_device.h:286:
> +                                               uint##_bits##_t *val, \
>                                                                 ^

False positive.

  #define PCI_DMA_DEFINE_LDST(_l, _s, _bits) \
      static inline MemTxResult ld##_l##_pci_dma(PCIDevice *dev, \
                                                 dma_addr_t addr, \
--->                                             uint##_bits##_t *val, \
                                                 MemTxAttrs attrs) \
      { \
          return ld##_l##_dma(pci_get_address_space(dev), addr, val, attrs); \
      } \
      static inline MemTxResult st##_s##_pci_dma(PCIDevice *dev, \
                                                 dma_addr_t addr, \
                                                 uint##_bits##_t val, \
                                                 MemTxAttrs attrs) \
      { \
          return st##_s##_dma(pci_get_address_space(dev), addr, val, attrs); \
      }

The part checkpatch objects to is actually a parameter declaration of
the form

    TYPE *NAME

The use of spaces is fine.  Not fine would be

    TYPE * NAME

Having a macro expand into a function definition confuses checkpatch.

> It's right - we need a MAINTAINERS entry.
> Not sure how to fix the error - any idea?

There is nothing to fix :)



  reply	other threads:[~2022-12-22  9:36 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-09 13:47 [PATCH 0/5] include/hw/pci include/hw/cxl: Clean up includes Markus Armbruster
2022-12-09 13:47 ` [PATCH 1/5] include/hw/pci: Clean up superfluous inclusion of pci*/*.h cxl/*.h Markus Armbruster
2022-12-09 17:03   ` Michael S. Tsirkin
2022-12-10  7:25     ` Markus Armbruster
2022-12-12 10:41   ` Jonathan Cameron via
2022-12-15  7:14     ` Markus Armbruster
2022-12-15 17:38       ` Jonathan Cameron via
2022-12-09 13:47 ` [PATCH 2/5] include/hw/cxl: Include hw/cxl/*.h where needed Markus Armbruster
2022-12-12 10:33   ` Jonathan Cameron via
2022-12-09 13:48 ` [PATCH 3/5] include/hw/pci: Clean up a few things checkpatch.pl would flag Markus Armbruster
2022-12-09 14:15   ` Philippe Mathieu-Daudé
2022-12-09 13:48 ` [PATCH 4/5] include/hw/pci: Split pci_device.h off pci.h Markus Armbruster
2022-12-21 11:33   ` Michael S. Tsirkin
2022-12-22  9:35     ` Markus Armbruster [this message]
2022-12-09 13:48 ` [PATCH 5/5] include/hw/pci: Include hw/pci/pci.h where needed Markus Armbruster
2022-12-09 14:17   ` Philippe Mathieu-Daudé
2022-12-09 15:11 ` [PATCH 6/5] include/hw/cxl: Break inclusion loop Markus Armbruster
2022-12-10  7:09   ` Markus Armbruster
2022-12-12 10:54     ` Jonathan Cameron via
2022-12-15  7:34       ` Markus Armbruster
2022-12-15 17:45         ` Jonathan Cameron via
2022-12-21 11:34 ` [PATCH 0/5] include/hw/pci include/hw/cxl: Clean up includes Michael S. Tsirkin
2022-12-22  7:02   ` Markus Armbruster

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=87ili3g4qw.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=ben.widawsky@intel.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.