diff mbox series

[v2,4/6] dt-bindings: hypervisor: Rename virtio to hypervisor

Message ID 1675188609-20913-5-git-send-email-ssengar@linux.microsoft.com
State Changes Requested, archived
Headers show
Series Device tree support for Hyper-V VMBus driver | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dt-meta-schema fail build log

Commit Message

Saurabh Singh Sengar Jan. 31, 2023, 6:10 p.m. UTC
Rename virtio folder to more generic hypervisor, so that this can
accommodate more devices of similar type.

Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
---
 .../devicetree/bindings/{virtio => hypervisor}/mmio.yaml        | 2 +-
 .../devicetree/bindings/{virtio => hypervisor}/pci-iommu.yaml   | 2 +-
 .../bindings/{virtio => hypervisor}/virtio-device.yaml          | 2 +-
 MAINTAINERS                                                     | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
 rename Documentation/devicetree/bindings/{virtio => hypervisor}/mmio.yaml (95%)
 rename Documentation/devicetree/bindings/{virtio => hypervisor}/pci-iommu.yaml (98%)
 rename Documentation/devicetree/bindings/{virtio => hypervisor}/virtio-device.yaml (93%)

Comments

Rob Herring (Arm) Jan. 31, 2023, 7:57 p.m. UTC | #1
On Tue, 31 Jan 2023 10:10:07 -0800, Saurabh Sengar wrote:
> Rename virtio folder to more generic hypervisor, so that this can
> accommodate more devices of similar type.
> 
> Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> ---
>  .../devicetree/bindings/{virtio => hypervisor}/mmio.yaml        | 2 +-
>  .../devicetree/bindings/{virtio => hypervisor}/pci-iommu.yaml   | 2 +-
>  .../bindings/{virtio => hypervisor}/virtio-device.yaml          | 2 +-
>  MAINTAINERS                                                     | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
>  rename Documentation/devicetree/bindings/{virtio => hypervisor}/mmio.yaml (95%)
>  rename Documentation/devicetree/bindings/{virtio => hypervisor}/pci-iommu.yaml (98%)
>  rename Documentation/devicetree/bindings/{virtio => hypervisor}/virtio-device.yaml (93%)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/i2c/i2c-virtio.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/virtio/virtio-device.yaml
./Documentation/devicetree/bindings/gpio/gpio-virtio.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/virtio/virtio-device.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-virtio.example.dtb: i2c: False schema does not allow {'compatible': ['virtio,device22'], '#address-cells': [[1]], '#size-cells': [[0]], 'light-sensor@20': {'compatible': ['dynaimage,al3320a'], 'reg': [[32]]}, '$nodename': ['i2c']}
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-virtio.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/gpio-virtio.example.dtb: gpio: False schema does not allow {'compatible': ['virtio,device29'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]], '$nodename': ['gpio']}
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/gpio-virtio.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hypervisor/virtio-device.example.dtb: i2c: False schema does not allow {'compatible': ['virtio,device22'], '$nodename': ['i2c']}
	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-virtio.yaml

doc reference errors (make refcheckdocs):
MAINTAINERS: Documentation/devicetree/bindings/virtio/

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/1675188609-20913-5-git-send-email-ssengar@linux.microsoft.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Saurabh Singh Sengar Feb. 1, 2023, 5:36 a.m. UTC | #2
On Tue, Jan 31, 2023 at 01:57:36PM -0600, Rob Herring wrote:
> 
> On Tue, 31 Jan 2023 10:10:07 -0800, Saurabh Sengar wrote:
> > Rename virtio folder to more generic hypervisor, so that this can
> > accommodate more devices of similar type.
> > 
> > Signed-off-by: Saurabh Sengar <ssengar@linux.microsoft.com>
> > ---
> >  .../devicetree/bindings/{virtio => hypervisor}/mmio.yaml        | 2 +-
> >  .../devicetree/bindings/{virtio => hypervisor}/pci-iommu.yaml   | 2 +-
> >  .../bindings/{virtio => hypervisor}/virtio-device.yaml          | 2 +-
> >  MAINTAINERS                                                     | 2 +-
> >  4 files changed, 4 insertions(+), 4 deletions(-)
> >  rename Documentation/devicetree/bindings/{virtio => hypervisor}/mmio.yaml (95%)
> >  rename Documentation/devicetree/bindings/{virtio => hypervisor}/pci-iommu.yaml (98%)
> >  rename Documentation/devicetree/bindings/{virtio => hypervisor}/virtio-device.yaml (93%)
> > 
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> 
> dtschema/dtc warnings/errors:
> ./Documentation/devicetree/bindings/i2c/i2c-virtio.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/virtio/virtio-device.yaml
> ./Documentation/devicetree/bindings/gpio/gpio-virtio.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/virtio/virtio-device.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-virtio.example.dtb: i2c: False schema does not allow {'compatible': ['virtio,device22'], '#address-cells': [[1]], '#size-cells': [[0]], 'light-sensor@20': {'compatible': ['dynaimage,al3320a'], 'reg': [[32]]}, '$nodename': ['i2c']}
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-virtio.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/gpio-virtio.example.dtb: gpio: False schema does not allow {'compatible': ['virtio,device29'], 'gpio-controller': True, '#gpio-cells': [[2]], 'interrupt-controller': True, '#interrupt-cells': [[2]], '$nodename': ['gpio']}
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/gpio/gpio-virtio.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/hypervisor/virtio-device.example.dtb: i2c: False schema does not allow {'compatible': ['virtio,device22'], '$nodename': ['i2c']}
> 	From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/i2c/i2c-virtio.yaml
> 
> doc reference errors (make refcheckdocs):
> MAINTAINERS: Documentation/devicetree/bindings/virtio/
> 
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/1675188609-20913-5-git-send-email-ssengar@linux.microsoft.com
> 
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
> 
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
> 
> pip3 install dtschema --upgrade
> 
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.

Hi Rob,

I set DT_SCHEMA_FILES as below and ran "make -j32 DT_CHECKER_FLAGS=-m dt_binding_check".
export DT_SCHEMA_FILES=Documentation/devicetree/bindings/hypervisor

But I can see only below error:
/work/upstream/linux-next/Documentation/devicetree/bindings/hypervisor/virtio-device.example.dtb: i2c: False schema does not allow {'compatible': ['virtio,device22'], '$nodename': ['i2c']}
        From schema: /work/upstream/linux-next/Documentation/devicetree/bindings/i2c/i2c-virtio.yaml

If I unset DT_SCHEMA_FILES, I see lot many errors which are not related to my changes.
May I know what can I do to simulate the exact behaviour of your bot.

Version of all the packages look latest:

$ pip3 show dtschema
Name: dtschema
Version: 2023.1
Summary: DeviceTree validation schema and tools
Home-page: https://github.com/devicetree-org/dt-schema
Author: Rob Herring
Author-email: robh@kernel.org
License: BSD
Location: /home/azureuser/.local/lib/python3.8/site-packages
Requires: rfc3987, jsonschema, pylibfdt, ruamel.yaml
Required-by:


$ dt-doc-validate --version
2023.1


$ yamllint --version
yamllint 1.20.0


Regards,
Saurabh
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/virtio/mmio.yaml b/Documentation/devicetree/bindings/hypervisor/mmio.yaml
similarity index 95%
rename from Documentation/devicetree/bindings/virtio/mmio.yaml
rename to Documentation/devicetree/bindings/hypervisor/mmio.yaml
index 0aa8433f0a5e..8492c9b4fec9 100644
--- a/Documentation/devicetree/bindings/virtio/mmio.yaml
+++ b/Documentation/devicetree/bindings/hypervisor/mmio.yaml
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/virtio/mmio.yaml#
+$id: http://devicetree.org/schemas/hypervisor/mmio.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: virtio memory mapped devices
diff --git a/Documentation/devicetree/bindings/virtio/pci-iommu.yaml b/Documentation/devicetree/bindings/hypervisor/pci-iommu.yaml
similarity index 98%
rename from Documentation/devicetree/bindings/virtio/pci-iommu.yaml
rename to Documentation/devicetree/bindings/hypervisor/pci-iommu.yaml
index 972a785a42de..52de535fd4ef 100644
--- a/Documentation/devicetree/bindings/virtio/pci-iommu.yaml
+++ b/Documentation/devicetree/bindings/hypervisor/pci-iommu.yaml
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/virtio/pci-iommu.yaml#
+$id: http://devicetree.org/schemas/hypervisor/pci-iommu.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: virtio-iommu device using the virtio-pci transport
diff --git a/Documentation/devicetree/bindings/virtio/virtio-device.yaml b/Documentation/devicetree/bindings/hypervisor/virtio-device.yaml
similarity index 93%
rename from Documentation/devicetree/bindings/virtio/virtio-device.yaml
rename to Documentation/devicetree/bindings/hypervisor/virtio-device.yaml
index 8c6919ba9497..7b8d93b06237 100644
--- a/Documentation/devicetree/bindings/virtio/virtio-device.yaml
+++ b/Documentation/devicetree/bindings/hypervisor/virtio-device.yaml
@@ -1,7 +1,7 @@ 
 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
 %YAML 1.2
 ---
-$id: http://devicetree.org/schemas/virtio/virtio-device.yaml#
+$id: http://devicetree.org/schemas/hypervisor/virtio-device.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
 title: Virtio device
diff --git a/MAINTAINERS b/MAINTAINERS
index 263d37a129b1..9bc5b88b723a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21967,7 +21967,7 @@  L:	virtualization@lists.linux-foundation.org
 S:	Maintained
 F:	Documentation/ABI/testing/sysfs-bus-vdpa
 F:	Documentation/ABI/testing/sysfs-class-vduse
-F:	Documentation/devicetree/bindings/virtio/
+F:	Documentation/devicetree/bindings/hypervisor/
 F:	Documentation/driver-api/virtio/
 F:	drivers/block/virtio_blk.c
 F:	drivers/crypto/virtio/