/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com
Signed-off-by: Yao Xingtao
---
V3[3] -> V4:
- make the error message more readable
- fix the downstream port check error
V2[2] -> V3:
- Move this check into pcie_cap_init()
V1[1] -> V2:
- Move downstream port check fo
This is the semantic patch from commit 7b3e371526 "cxl/mailbox: make
range overlap check more readable"
Signed-off-by: Yao Xingtao
---
scripts/coccinelle/range.cocci | 49 ++
1 file changed, 49 insertions(+)
create mode 100644 scripts/coccinelle/r
/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com
Signed-off-by: Yao Xingtao
---
V2[2] -> V3:
- Move this check into pcie_cap_init()
V1[1] -> V2:
- Move downstream port check forward
[1]
https://lore.kernel.org/qemu-devel/20240704033834.3362-1-yaoxt.f...@fujitsu.com
[2]
The type of kernel_entry, kernel_low and kernel_high is uint64_t, cast
the pointer of this type to uint64_t* is useless.
Signed-off-by: Yao Xingtao
---
hw/mips/loongson3_virt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/mips/loongson3_virt.c b/hw/mips
\
--keep-comments --in-place --use-gitgrep --dir .
Yao Xingtao (2):
mips/loongson3_virt: remove useless type cast
nvme/ctrl: remove useless type cast
hw/mips/loongson3_virt.c | 4 ++--
hw/nvme/ctrl.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
--
2.41.0
The type of req->cmd is NvmeCmd, cast the pointer of this type to
NvmeCmd* is useless.
Signed-off-by: Yao Xingtao
---
hw/nvme/ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index 5b1b0cabcfc3..221818f551cd 100644
--- a/hw/nvme/ctr
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
hw/ssi/aspeed_smc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c
index 49205ab76d38
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
dump/dump.c | 12
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dump/dump.c b/dump/dump.c
index 84064d890d2c..45e84428aea5 100644
use range_overlaps_range() instead of open-coding the overlap check to
improve the readability of the code.
Signed-off-by: Yao Xingtao
---
block/qcow2-cluster.c | 23 +--
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/block/qcow2-cluster.c b/block/qcow2
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
crypto/block-luks.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/crypto/block-luks.c b/crypto/block-luks.c
index 5b777c15d3cd
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
system/memory_mapping.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/system/memory_mapping.c b/system/memory_mapping.c
index
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
hw/display/sm501.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 26dc8170d89b
use range_overlaps_range() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
block/vhdx.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/block/vhdx.c b/block/vhdx.c
index 5aa1a1350626..c31661b946b6
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
target/sparc/ldst_helper.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c
index
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
tests/qtest/fuzz/generic_fuzz.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/qtest/fuzz/generic_fuzz.c b/tests/qtest/fuzz
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
hw/cxl/cxl-mailbox-utils.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/cxl/cxl-mailbox-utils.c b/hw/cxl/cxl-mailbox-utils.c
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
hw/arm/boot.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/arm/boot.c b/hw/arm/boot.c
index d480a7da02cf..a004a90e87be 100644
--- a
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.
Signed-off-by: Yao Xingtao
---
hw/core/loader.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/core/loader.c b/hw/core/loader.c
index 31593a117171..dac0df561b16
Just like range_overlaps_range(), use the returned bool value
to check whether 2 given ranges overlap.
Signed-off-by: Yao Xingtao
---
include/qemu/range.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/qemu/range.h b/include/qemu/range.h
index 4ce694a39831
Currently, some components still open-coding the range overlap check.
Sometimes this check may be fail because some patterns are missed.
To avoid the above problems and improve the readability of the code,
it is better to use the ranges_overlap() to do this check.
Yao Xingtao (13):
range: Make
added region, b is an existing region, and b is a
subregion of a)
Reviewed-by: Jonathan Cameron
Suggested-by: Peter Maydell
Signed-off-by: Yao Xingtao
---
V1[1] -> V2:
- Use ranges_overlap() to improve code readability
- Replace the ASCII extended graph to ASCII basic in comment.
added region, b is an existing region, and b is a
subregion of a)
Signed-off-by: Yao Xingtao
---
hw/mem/cxl_type3.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index 35ac59883a5b..8e32de327908 100644
--- a/hw/mem/cxl_type3.c
/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com
Signed-off-by: Yao Xingtao
---
V1[1] -> V2:
- Move downstream port check forward
[1]
https://lore.kernel.org/qemu-devel/20240704033834.3362-1-yaoxt.f...@fujitsu.com
---
hw/pci-bridge/cxl_downstream.c | 5 +
hw/pci-bri
/oszpr01mb6453bc61d2ff4035f18084ef8d...@oszpr01mb6453.jpnprd01.prod.outlook.com
Signed-off-by: Yao Xingtao
---
hw/pci-bridge/cxl_downstream.c | 6 ++
hw/pci-bridge/pcie_root_port.c | 6 ++
hw/pci-bridge/xio3130_downstream.c | 6 ++
3 files changed, 18 insertions(+)
diff --git a/hw/pci-bridge
/3e84b919-7631-d1db-3e1d-33000f3f3...@fujitsu.com/
Signed-off-by: Yao Xingtao
---
hw/cxl/cxl-component-utils.c | 9 +++--
hw/mem/cxl_type3.c | 15 +++
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/hw/cxl/cxl-component-utils.c b/hw/cxl/cxl-component-utils.c
/3e84b919-7631-d1db-3e1d-33000f3f3...@fujitsu.com/
Signed-off-by: Yao Xingtao
---
hw/mem/cxl_type3.c | 18 ++
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index b0a7e9f11b..d6ef784e96 100644
--- a/hw/mem/cxl_type3.c
+++ b/hw/mem
[n].DPABase
Links:
https://lore.kernel.org/linux-cxl/3e84b919-7631-d1db-3e1d-33000f3f3...@fujitsu.com/
Signed-off-by: Yao Xingtao
---
hw/mem/cxl_type3.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/hw/mem/cxl_type3.c b/hw/mem/cxl_type3.c
index b0a7e9f11b..2c12
~~^~~~
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2210
Signed-off-by: Yao Xingtao
---
contrib/plugins/execlog.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c
index
~~^~~~
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2210
Signed-off-by: Yao Xingtao
---
contrib/plugins/execlog.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/contrib/plugins/execlog.c b/contrib/plugins/execlog.c
index a1dfd59ab7..096549
e included from /usr/include/glib-2.0/glib.h:33:
/usr/include/glib-2.0/glib/garray.h:198:62: note: expected
‘gpointer’ {aka ‘void *’} but argument is of type ‘const char *’
198 |gpointer data);
|
--
发件人:Erlon Cruz
发送日期:2013-08-03 03:57:09
收件人:Richard W.M. Jones
抄送:Peter Maydell; qemu-devel
主题:Re: [Qemu-devel] Using virtio-mmio
--
发件人:Erlon Cruz
发送日期:2013-08-03 03:57:09
收件人:Richard W.M. Jones
抄送:
31 matches
Mail list logo