]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
misc: pci_endpoint_test: Use -EINVAL for small subrange size
authorKoichiro Den <den@valinux.co.jp>
Fri, 20 Mar 2026 14:01:39 +0000 (23:01 +0900)
committerManivannan Sadhasivam <mani@kernel.org>
Fri, 3 Apr 2026 16:34:36 +0000 (22:04 +0530)
commit9c55d0eb4e9d1bf229d691363fb0641a9b05d904
tree736d4a8801136ac8a9219bc3f8a7728f0882c7d6
parent70becc1a9b453ce04f97507585afc2cf47e67b11
misc: pci_endpoint_test: Use -EINVAL for small subrange size

The sub_size check ensures that each subrange is large enough for 32-bit
accesses. Subranges smaller than sizeof(u32) do not satisfy this
assumption, so this is a local sanity check rather than a resource
exhaustion case.

Return -EINVAL instead of -ENOSPC for this case.

Suggested-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
Link: https://patch.msgid.link/20260320140139.2415480-1-den@valinux.co.jp
drivers/misc/pci_endpoint_test.c