* [Qemu-devel] [PATCH 0/8] Coccinelle cleanups
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé,
Anthony Perard, Christian Borntraeger, Marcel Apfelbaum,
Stefano Stabellini, Peter Maydell, xen-devel, qemu-arm,
qemu-block, qemu-devel, qemu-s390x, Markus Armbruster,
Daniel P . Berrange, Cornelia Huck, David Hildenbrand,
Igor Mammedov, Gerd Hoffmann, Kevin Wolf, Max Reitz,
Michael S . Tsirkin, Alexander Graf, Richard Henderson
Nothing exciting here, patches created mechanically
(common after soft freeze).
Philippe Mathieu-Daudé (8):
qobject: Catch another straggler for use of qdict_put_str()
error: Remove NULL checks on error_propagate() calls
crypto: Remove useless casts
xen: Remove useless casts
tests/bios-tables-test: Remove useless casts
ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro
hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro
include/hw/intc/arm_gicv3_common.h | 2 +-
crypto/cipher-builtin.c | 4 ++--
hw/pci-host/piix.c | 2 +-
hw/pci-host/q35.c | 2 +-
hw/s390x/virtio-ccw.c | 4 +---
hw/xen/xen_pt_config_init.c | 2 +-
qobject/block-qdict.c | 2 +-
tests/bios-tables-test.c | 2 +-
ui/vnc-enc-tight.c | 2 +-
ui/vnc.c | 3 ++-
10 files changed, 12 insertions(+), 13 deletions(-)
--
2.18.0
^ permalink raw reply [flat|nested] 32+ messages in thread
* [PATCH 0/8] Coccinelle cleanups
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Peter Maydell, David Hildenbrand, qemu-devel, Alexander Graf,
Gerd Hoffmann, Stefano Stabellini, qemu-block,
Michael S . Tsirkin, Markus Armbruster, Christian Borntraeger,
Marcel Apfelbaum, Anthony Perard, xen-devel, qemu-s390x,
qemu-arm, Richard Henderson, Kevin Wolf, Daniel P . Berrange,
Cornelia Huck, Philippe Mathieu-Daudé,
Max Reitz, Igor Mammedov
Nothing exciting here, patches created mechanically
(common after soft freeze).
Philippe Mathieu-Daudé (8):
qobject: Catch another straggler for use of qdict_put_str()
error: Remove NULL checks on error_propagate() calls
crypto: Remove useless casts
xen: Remove useless casts
tests/bios-tables-test: Remove useless casts
ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro
hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro
include/hw/intc/arm_gicv3_common.h | 2 +-
crypto/cipher-builtin.c | 4 ++--
hw/pci-host/piix.c | 2 +-
hw/pci-host/q35.c | 2 +-
hw/s390x/virtio-ccw.c | 4 +---
hw/xen/xen_pt_config_init.c | 2 +-
qobject/block-qdict.c | 2 +-
tests/bios-tables-test.c | 2 +-
ui/vnc-enc-tight.c | 2 +-
ui/vnc.c | 3 ++-
10 files changed, 12 insertions(+), 13 deletions(-)
--
2.18.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 1/8] qobject: Catch another straggler for use of qdict_put_str()
2018-07-04 15:39 ` Philippe Mathieu-Daudé
(?)
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-05 5:38 ` Markus Armbruster
-1 siblings, 1 reply; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé,
qemu-devel, Kevin Wolf, Max Reitz, Markus Armbruster,
open list:Block layer core
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/qobject.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
qobject/block-qdict.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
index 80c653013f..ae363708ab 100644
--- a/qobject/block-qdict.c
+++ b/qobject/block-qdict.c
@@ -572,7 +572,7 @@ static QObject *qdict_crumple_for_keyval_qiv(QDict *src, Error **errp)
if (!tmp) {
tmp = qdict_clone_shallow(src);
}
- qdict_put(tmp, ent->key, qstring_from_str(s));
+ qdict_put_str(tmp, ent->key, s);
g_free(buf);
}
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 2/8] error: Remove NULL checks on error_propagate() calls
2018-07-04 15:39 ` Philippe Mathieu-Daudé
(?)
(?)
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-05 5:38 ` Markus Armbruster
2018-07-05 8:49 ` David Hildenbrand
-1 siblings, 2 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé,
qemu-devel, Cornelia Huck, Christian Borntraeger,
Michael S. Tsirkin, Richard Henderson, Alexander Graf,
David Hildenbrand, open list:virtio-ccw
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/s390x/virtio-ccw.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index b92a85d0b0..7ddb378d52 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -1836,11 +1836,9 @@ static void vhost_vsock_ccw_realize(VirtioCcwDevice *ccw_dev, Error **errp)
{
VHostVSockCCWState *dev = VHOST_VSOCK_CCW(ccw_dev);
DeviceState *vdev = DEVICE(&dev->vdev);
- Error *err = NULL;
qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
- object_property_set_bool(OBJECT(vdev), true, "realized", &err);
- error_propagate(errp, err);
+ object_property_set_bool(OBJECT(vdev), true, "realized", errp);
}
static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 3/8] crypto: Remove useless casts
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (2 preceding siblings ...)
(?)
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-04 15:51 ` Daniel P. Berrangé
-1 siblings, 1 reply; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé, qemu-devel, Daniel P. Berrangé
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/typecast.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
crypto/cipher-builtin.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
index d8c811fd33..7eff760f0a 100644
--- a/crypto/cipher-builtin.c
+++ b/crypto/cipher-builtin.c
@@ -133,7 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
{
const QCryptoCipherBuiltinAESContext *aesctx = ctx;
- qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
+ qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc,
src, dst, length);
}
@@ -145,7 +145,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
{
const QCryptoCipherBuiltinAESContext *aesctx = ctx;
- qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
+ qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec,
src, dst, length);
}
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
2018-07-04 15:39 ` Philippe Mathieu-Daudé
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé,
qemu-devel, Stefano Stabellini, Anthony Perard, open list:X86
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/typecast.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/xen/xen_pt_config_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index aee31c62bb..55a83333f2 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
{
XenPTRegInfo *reg = cfg_entry->reg;
XenPTRegion *base = NULL;
- PCIDevice *d = (PCIDevice *)&s->dev;
+ PCIDevice *d = &s->dev;
uint32_t writable_mask = 0;
uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);
pcibus_t r_size = 0;
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [PATCH 4/8] xen: Remove useless casts
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Anthony Perard, open list:X86, Stefano Stabellini,
Philippe Mathieu-Daudé,
qemu-devel
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/typecast.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/xen/xen_pt_config_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
index aee31c62bb..55a83333f2 100644
--- a/hw/xen/xen_pt_config_init.c
+++ b/hw/xen/xen_pt_config_init.c
@@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
{
XenPTRegInfo *reg = cfg_entry->reg;
XenPTRegion *base = NULL;
- PCIDevice *d = (PCIDevice *)&s->dev;
+ PCIDevice *d = &s->dev;
uint32_t writable_mask = 0;
uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);
pcibus_t r_size = 0;
--
2.18.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 5/8] tests/bios-tables-test: Remove useless casts
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (4 preceding siblings ...)
(?)
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-05 5:39 ` Markus Armbruster
-1 siblings, 1 reply; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé,
qemu-devel, Michael S. Tsirkin, Igor Mammedov
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/typecast.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
tests/bios-tables-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 4e24930c4b..c1ad1b3470 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -319,7 +319,7 @@ static bool load_asl(GArray *sdts, AcpiSdtTable *sdt)
ret = g_spawn_command_line_sync(command_line->str, &out, &out_err, NULL, &error);
g_assert_no_error(error);
if (ret) {
- ret = g_file_get_contents(sdt->asl_file, (gchar **)&sdt->asl,
+ ret = g_file_get_contents(sdt->asl_file, &sdt->asl,
&sdt->asl_len, &error);
g_assert(ret);
g_assert_no_error(error);
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 6/8] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (5 preceding siblings ...)
(?)
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-05 5:39 ` Markus Armbruster
2018-08-21 5:46 ` Gerd Hoffmann
-1 siblings, 2 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé, qemu-devel, Gerd Hoffmann
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/round.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
ui/vnc-enc-tight.c | 2 +-
ui/vnc.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index f38aceb4da..0b4a5ac71f 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -979,7 +979,7 @@ static int send_mono_rect(VncState *vs, int x, int y,
}
#endif
- bytes = (DIV_ROUND_UP(w, 8)) * h;
+ bytes = DIV_ROUND_UP(w, 8) * h;
vnc_write_u8(vs, (stream | VNC_TIGHT_EXPLICIT_FILTER) << 4);
vnc_write_u8(vs, VNC_TIGHT_FILTER_PALETTE);
diff --git a/ui/vnc.c b/ui/vnc.c
index 359693238b..3361432a51 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -2967,7 +2967,8 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
PIXMAN_FORMAT_BPP(pixman_image_get_format(vd->guest.fb));
guest_row0 = (uint8_t *)pixman_image_get_data(vd->guest.fb);
guest_stride = pixman_image_get_stride(vd->guest.fb);
- guest_ll = pixman_image_get_width(vd->guest.fb) * (DIV_ROUND_UP(guest_bpp, 8));
+ guest_ll = pixman_image_get_width(vd->guest.fb)
+ * DIV_ROUND_UP(guest_bpp, 8);
}
line_bytes = MIN(server_stride, guest_ll);
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 7/8] hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (6 preceding siblings ...)
(?)
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-05 5:39 ` Markus Armbruster
-1 siblings, 1 reply; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé,
qemu-devel, Michael S. Tsirkin, Marcel Apfelbaum
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/round.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
hw/pci-host/piix.c | 2 +-
hw/pci-host/q35.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
index 0e608347c1..317c0feca6 100644
--- a/hw/pci-host/piix.c
+++ b/hw/pci-host/piix.c
@@ -144,7 +144,7 @@ static void i440fx_update_memory_mappings(PCII440FXState *d)
memory_region_transaction_begin();
for (i = 0; i < 13; i++) {
pam_update(&d->pam_regions[i], i,
- pd->config[I440FX_PAM + (DIV_ROUND_UP(i, 2))]);
+ pd->config[I440FX_PAM + DIV_ROUND_UP(i, 2)]);
}
memory_region_set_enabled(&d->smram_region,
!(pd->config[I440FX_SMRAM] & SMRAM_D_OPEN));
diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
index 02f9576588..b3a5b3036d 100644
--- a/hw/pci-host/q35.c
+++ b/hw/pci-host/q35.c
@@ -352,7 +352,7 @@ static void mch_update_pam(MCHPCIState *mch)
memory_region_transaction_begin();
for (i = 0; i < 13; i++) {
pam_update(&mch->pam_regions[i], i,
- pd->config[MCH_HOST_BRIDGE_PAM0 + (DIV_ROUND_UP(i, 2))]);
+ pd->config[MCH_HOST_BRIDGE_PAM0 + DIV_ROUND_UP(i, 2)]);
}
memory_region_transaction_commit();
}
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* [Qemu-devel] [PATCH 8/8] hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (7 preceding siblings ...)
(?)
@ 2018-07-04 15:39 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 15:39 UTC (permalink / raw)
To: Laurent Vivier, Marc-André Lureau
Cc: Philippe Mathieu-Daudé,
qemu-devel, Peter Maydell, open list:ARM cores
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
include/hw/intc/arm_gicv3_common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/intc/arm_gicv3_common.h b/include/hw/intc/arm_gicv3_common.h
index b798486ecf..31ec9a1ae4 100644
--- a/include/hw/intc/arm_gicv3_common.h
+++ b/include/hw/intc/arm_gicv3_common.h
@@ -62,7 +62,7 @@
* avoids bugs where we forget to subtract GIC_INTERNAL from an
* interrupt number.
*/
-#define GICV3_BMP_SIZE (DIV_ROUND_UP(GICV3_MAXIRQ, 32))
+#define GICV3_BMP_SIZE DIV_ROUND_UP(GICV3_MAXIRQ, 32)
#define GIC_DECLARE_BITMAP(name) \
uint32_t name[GICV3_BMP_SIZE]
--
2.18.0
^ permalink raw reply related [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 3/8] crypto: Remove useless casts
2018-07-04 15:39 ` [Qemu-devel] [PATCH 3/8] crypto: Remove useless casts Philippe Mathieu-Daudé
@ 2018-07-04 15:51 ` Daniel P. Berrangé
2018-07-04 16:30 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 32+ messages in thread
From: Daniel P. Berrangé @ 2018-07-04 15:51 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, qemu-devel
On Wed, Jul 04, 2018 at 12:39:14PM -0300, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> crypto/cipher-builtin.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
> index d8c811fd33..7eff760f0a 100644
> --- a/crypto/cipher-builtin.c
> +++ b/crypto/cipher-builtin.c
> @@ -133,7 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc,
> src, dst, length);
qcrypto_cipher_aes_ecb_encrypt expects a 'AES_KEY *' parameter, but
'&aesctx->enc, is a 'const AES_KEY *'. The cast is needed to discard
the const-ness.
> @@ -145,7 +145,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
> {
> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>
> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec,
> src, dst, length);
Same here.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 3/8] crypto: Remove useless casts
2018-07-04 15:51 ` Daniel P. Berrangé
@ 2018-07-04 16:30 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-04 16:30 UTC (permalink / raw)
To: Daniel P. Berrangé
Cc: Laurent Vivier, Marc-André Lureau, qemu-devel
On 07/04/2018 12:51 PM, Daniel P. Berrangé wrote:
> On Wed, Jul 04, 2018 at 12:39:14PM -0300, Philippe Mathieu-Daudé wrote:
>> Patch created mechanically by rerunning:
>>
>> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
>> --macro-file scripts/cocci-macro-file.h \
>> --dir . --in-place
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> crypto/cipher-builtin.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
>> index d8c811fd33..7eff760f0a 100644
>> --- a/crypto/cipher-builtin.c
>> +++ b/crypto/cipher-builtin.c
>> @@ -133,7 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void *ctx,
>> {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
>> + qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc,
>> src, dst, length);
>
> qcrypto_cipher_aes_ecb_encrypt expects a 'AES_KEY *' parameter, but
> '&aesctx->enc, is a 'const AES_KEY *'. The cast is needed to discard
> the const-ness.
Oh I didn't notice. I'll see if I can patch typecast.cocci to avoid this
noise.
Thanks!
>
>> @@ -145,7 +145,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void *ctx,
>> {
>> const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>
>> - qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
>> + qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec,
>> src, dst, length);
>
> Same here.
>
>
> Regards,
> Daniel
>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 1/8] qobject: Catch another straggler for use of qdict_put_str()
2018-07-04 15:39 ` [Qemu-devel] [PATCH 1/8] qobject: Catch another straggler for use of qdict_put_str() Philippe Mathieu-Daudé
@ 2018-07-05 5:38 ` Markus Armbruster
0 siblings, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 5:38 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Kevin Wolf,
open list:Block layer core, qemu-devel, Max Reitz
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/qobject.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> qobject/block-qdict.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/qobject/block-qdict.c b/qobject/block-qdict.c
> index 80c653013f..ae363708ab 100644
> --- a/qobject/block-qdict.c
> +++ b/qobject/block-qdict.c
> @@ -572,7 +572,7 @@ static QObject *qdict_crumple_for_keyval_qiv(QDict *src, Error **errp)
> if (!tmp) {
> tmp = qdict_clone_shallow(src);
> }
> - qdict_put(tmp, ent->key, qstring_from_str(s));
> + qdict_put_str(tmp, ent->key, s);
> g_free(buf);
> }
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 2/8] error: Remove NULL checks on error_propagate() calls
2018-07-04 15:39 ` [Qemu-devel] [PATCH 2/8] error: Remove NULL checks on error_propagate() calls Philippe Mathieu-Daudé
@ 2018-07-05 5:38 ` Markus Armbruster
2018-07-05 8:49 ` David Hildenbrand
1 sibling, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 5:38 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Alexander Graf,
Michael S. Tsirkin, Cornelia Huck, David Hildenbrand, qemu-devel,
Christian Borntraeger, open list:virtio-ccw, Richard Henderson
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/s390x/virtio-ccw.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index b92a85d0b0..7ddb378d52 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -1836,11 +1836,9 @@ static void vhost_vsock_ccw_realize(VirtioCcwDevice *ccw_dev, Error **errp)
> {
> VHostVSockCCWState *dev = VHOST_VSOCK_CCW(ccw_dev);
> DeviceState *vdev = DEVICE(&dev->vdev);
> - Error *err = NULL;
>
> qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
> - object_property_set_bool(OBJECT(vdev), true, "realized", &err);
> - error_propagate(errp, err);
> + object_property_set_bool(OBJECT(vdev), true, "realized", errp);
> }
>
> static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
2018-07-04 15:39 ` Philippe Mathieu-Daudé
@ 2018-07-05 5:39 ` Markus Armbruster
-1 siblings, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 5:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Anthony Perard,
open list:X86, Stefano Stabellini, qemu-devel
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/xen/xen_pt_config_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
> index aee31c62bb..55a83333f2 100644
> --- a/hw/xen/xen_pt_config_init.c
> +++ b/hw/xen/xen_pt_config_init.c
> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
> {
> XenPTRegInfo *reg = cfg_entry->reg;
> XenPTRegion *base = NULL;
> - PCIDevice *d = (PCIDevice *)&s->dev;
> + PCIDevice *d = &s->dev;
> uint32_t writable_mask = 0;
> uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);
> pcibus_t r_size = 0;
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
@ 2018-07-05 5:39 ` Markus Armbruster
0 siblings, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 5:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Stefano Stabellini, qemu-devel, Laurent Vivier, open list:X86,
Anthony Perard, Marc-André Lureau
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/xen/xen_pt_config_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
> index aee31c62bb..55a83333f2 100644
> --- a/hw/xen/xen_pt_config_init.c
> +++ b/hw/xen/xen_pt_config_init.c
> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
> {
> XenPTRegInfo *reg = cfg_entry->reg;
> XenPTRegion *base = NULL;
> - PCIDevice *d = (PCIDevice *)&s->dev;
> + PCIDevice *d = &s->dev;
> uint32_t writable_mask = 0;
> uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);
> pcibus_t r_size = 0;
Reviewed-by: Markus Armbruster <armbru@redhat.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 5/8] tests/bios-tables-test: Remove useless casts
2018-07-04 15:39 ` [Qemu-devel] [PATCH 5/8] tests/bios-tables-test: " Philippe Mathieu-Daudé
@ 2018-07-05 5:39 ` Markus Armbruster
0 siblings, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 5:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Igor Mammedov,
Michael S. Tsirkin, qemu-devel
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/bios-tables-test.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
> index 4e24930c4b..c1ad1b3470 100644
> --- a/tests/bios-tables-test.c
> +++ b/tests/bios-tables-test.c
> @@ -319,7 +319,7 @@ static bool load_asl(GArray *sdts, AcpiSdtTable *sdt)
> ret = g_spawn_command_line_sync(command_line->str, &out, &out_err, NULL, &error);
> g_assert_no_error(error);
> if (ret) {
> - ret = g_file_get_contents(sdt->asl_file, (gchar **)&sdt->asl,
> + ret = g_file_get_contents(sdt->asl_file, &sdt->asl,
> &sdt->asl_len, &error);
> g_assert(ret);
> g_assert_no_error(error);
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 6/8] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
2018-07-04 15:39 ` [Qemu-devel] [PATCH 6/8] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro Philippe Mathieu-Daudé
@ 2018-07-05 5:39 ` Markus Armbruster
2018-08-21 5:46 ` Gerd Hoffmann
1 sibling, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 5:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Gerd Hoffmann, qemu-devel
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/round.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> ui/vnc-enc-tight.c | 2 +-
> ui/vnc.c | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
> index f38aceb4da..0b4a5ac71f 100644
> --- a/ui/vnc-enc-tight.c
> +++ b/ui/vnc-enc-tight.c
> @@ -979,7 +979,7 @@ static int send_mono_rect(VncState *vs, int x, int y,
> }
> #endif
>
> - bytes = (DIV_ROUND_UP(w, 8)) * h;
> + bytes = DIV_ROUND_UP(w, 8) * h;
>
> vnc_write_u8(vs, (stream | VNC_TIGHT_EXPLICIT_FILTER) << 4);
> vnc_write_u8(vs, VNC_TIGHT_FILTER_PALETTE);
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 359693238b..3361432a51 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -2967,7 +2967,8 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
> PIXMAN_FORMAT_BPP(pixman_image_get_format(vd->guest.fb));
> guest_row0 = (uint8_t *)pixman_image_get_data(vd->guest.fb);
> guest_stride = pixman_image_get_stride(vd->guest.fb);
> - guest_ll = pixman_image_get_width(vd->guest.fb) * (DIV_ROUND_UP(guest_bpp, 8));
> + guest_ll = pixman_image_get_width(vd->guest.fb)
> + * DIV_ROUND_UP(guest_bpp, 8);
> }
> line_bytes = MIN(server_stride, guest_ll);
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 7/8] hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro
2018-07-04 15:39 ` [Qemu-devel] [PATCH 7/8] hw/pci-host: " Philippe Mathieu-Daudé
@ 2018-07-05 5:39 ` Markus Armbruster
0 siblings, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 5:39 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Michael S. Tsirkin, qemu-devel
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/round.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/pci-host/piix.c | 2 +-
> hw/pci-host/q35.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
> index 0e608347c1..317c0feca6 100644
> --- a/hw/pci-host/piix.c
> +++ b/hw/pci-host/piix.c
> @@ -144,7 +144,7 @@ static void i440fx_update_memory_mappings(PCII440FXState *d)
> memory_region_transaction_begin();
> for (i = 0; i < 13; i++) {
> pam_update(&d->pam_regions[i], i,
> - pd->config[I440FX_PAM + (DIV_ROUND_UP(i, 2))]);
> + pd->config[I440FX_PAM + DIV_ROUND_UP(i, 2)]);
> }
> memory_region_set_enabled(&d->smram_region,
> !(pd->config[I440FX_SMRAM] & SMRAM_D_OPEN));
> diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c
> index 02f9576588..b3a5b3036d 100644
> --- a/hw/pci-host/q35.c
> +++ b/hw/pci-host/q35.c
> @@ -352,7 +352,7 @@ static void mch_update_pam(MCHPCIState *mch)
> memory_region_transaction_begin();
> for (i = 0; i < 13; i++) {
> pam_update(&mch->pam_regions[i], i,
> - pd->config[MCH_HOST_BRIDGE_PAM0 + (DIV_ROUND_UP(i, 2))]);
> + pd->config[MCH_HOST_BRIDGE_PAM0 + DIV_ROUND_UP(i, 2)]);
> }
> memory_region_transaction_commit();
> }
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 0/8] Coccinelle cleanups
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (8 preceding siblings ...)
(?)
@ 2018-07-05 8:33 ` Markus Armbruster
-1 siblings, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 8:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Peter Maydell,
David Hildenbrand, qemu-devel, Alexander Graf, Gerd Hoffmann,
Stefano Stabellini, qemu-block, Michael S . Tsirkin,
Markus Armbruster, Christian Borntraeger, Anthony Perard,
xen-devel, qemu-s390x, qemu-arm, Richard Henderson, Kevin Wolf,
Cornelia Huck, Max Reitz, Igor Mammedov, qemu-trivial
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Nothing exciting here, patches created mechanically
> (common after soft freeze).
Cc: qemu-trivial
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 0/8] Coccinelle cleanups
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (9 preceding siblings ...)
(?)
@ 2018-07-05 8:33 ` Markus Armbruster
-1 siblings, 0 replies; 32+ messages in thread
From: Markus Armbruster @ 2018-07-05 8:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, David Hildenbrand, qemu-devel, Alexander Graf,
Gerd Hoffmann, Stefano Stabellini, qemu-block, qemu-trivial,
Michael S . Tsirkin, Markus Armbruster, Christian Borntraeger,
Anthony Perard, xen-devel, qemu-s390x, qemu-arm,
Marc-André Lureau, Richard Henderson, Kevin Wolf,
Cornelia Huck, Laurent Vivier, Max Reitz, Igor Mammedov
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Nothing exciting here, patches created mechanically
> (common after soft freeze).
Cc: qemu-trivial
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 2/8] error: Remove NULL checks on error_propagate() calls
2018-07-04 15:39 ` [Qemu-devel] [PATCH 2/8] error: Remove NULL checks on error_propagate() calls Philippe Mathieu-Daudé
2018-07-05 5:38 ` Markus Armbruster
@ 2018-07-05 8:49 ` David Hildenbrand
1 sibling, 0 replies; 32+ messages in thread
From: David Hildenbrand @ 2018-07-05 8:49 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, Laurent Vivier, Marc-André Lureau
Cc: qemu-devel, Cornelia Huck, Christian Borntraeger,
Michael S. Tsirkin, Richard Henderson, Alexander Graf,
open list:virtio-ccw
On 04.07.2018 17:39, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/s390x/virtio-ccw.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
> index b92a85d0b0..7ddb378d52 100644
> --- a/hw/s390x/virtio-ccw.c
> +++ b/hw/s390x/virtio-ccw.c
> @@ -1836,11 +1836,9 @@ static void vhost_vsock_ccw_realize(VirtioCcwDevice *ccw_dev, Error **errp)
> {
> VHostVSockCCWState *dev = VHOST_VSOCK_CCW(ccw_dev);
> DeviceState *vdev = DEVICE(&dev->vdev);
> - Error *err = NULL;
>
> qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus));
> - object_property_set_bool(OBJECT(vdev), true, "realized", &err);
> - error_propagate(errp, err);
> + object_property_set_bool(OBJECT(vdev), true, "realized", errp);
> }
>
> static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data)
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
2018-07-04 15:39 ` Philippe Mathieu-Daudé
@ 2018-07-05 10:05 ` Anthony PERARD
-1 siblings, 0 replies; 32+ messages in thread
From: Anthony PERARD @ 2018-07-05 10:05 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, qemu-devel,
Stefano Stabellini, open list:X86
On Wed, Jul 04, 2018 at 12:39:15PM -0300, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> hw/xen/xen_pt_config_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
> index aee31c62bb..55a83333f2 100644
> --- a/hw/xen/xen_pt_config_init.c
> +++ b/hw/xen/xen_pt_config_init.c
> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
> {
> XenPTRegInfo *reg = cfg_entry->reg;
> XenPTRegion *base = NULL;
> - PCIDevice *d = (PCIDevice *)&s->dev;
> + PCIDevice *d = &s->dev;
> uint32_t writable_mask = 0;
> uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);
> pcibus_t r_size = 0;
--
Anthony PERARD
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 4/8] xen: Remove useless casts
@ 2018-07-05 10:05 ` Anthony PERARD
0 siblings, 0 replies; 32+ messages in thread
From: Anthony PERARD @ 2018-07-05 10:05 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Marc-André Lureau, Stefano Stabellini, open list:X86,
Laurent Vivier, qemu-devel
On Wed, Jul 04, 2018 at 12:39:15PM -0300, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> hw/xen/xen_pt_config_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
> index aee31c62bb..55a83333f2 100644
> --- a/hw/xen/xen_pt_config_init.c
> +++ b/hw/xen/xen_pt_config_init.c
> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
> {
> XenPTRegInfo *reg = cfg_entry->reg;
> XenPTRegion *base = NULL;
> - PCIDevice *d = (PCIDevice *)&s->dev;
> + PCIDevice *d = &s->dev;
> uint32_t writable_mask = 0;
> uint32_t throughable_mask = get_throughable_mask(s, reg, valid_mask);
> pcibus_t r_size = 0;
--
Anthony PERARD
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
2018-07-04 15:39 ` Philippe Mathieu-Daudé
@ 2018-07-05 10:16 ` Peter Maydell
-1 siblings, 0 replies; 32+ messages in thread
From: Peter Maydell @ 2018-07-05 10:16 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Anthony Perard,
open list:X86, Stefano Stabellini, QEMU Developers
On 4 July 2018 at 16:39, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/xen/xen_pt_config_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
> index aee31c62bb..55a83333f2 100644
> --- a/hw/xen/xen_pt_config_init.c
> +++ b/hw/xen/xen_pt_config_init.c
> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
> {
> XenPTRegInfo *reg = cfg_entry->reg;
> XenPTRegion *base = NULL;
> - PCIDevice *d = (PCIDevice *)&s->dev;
> + PCIDevice *d = &s->dev;
This line of code is odd even without the cast. XenPCIPassthroughState*
is a QOM object (TYPE_XEN_PT_DEVICE) which is a subclass of TYPE_PCI_DEVICE,
so the standard way to get the PCIDevice pointer for s would be
PCIDevice *d = PCI_DEVICE(s);
thanks
-- PMM
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
@ 2018-07-05 10:16 ` Peter Maydell
0 siblings, 0 replies; 32+ messages in thread
From: Peter Maydell @ 2018-07-05 10:16 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Stefano Stabellini, QEMU Developers, Laurent Vivier,
open list:X86, Anthony Perard, Marc-André Lureau
On 4 July 2018 at 16:39, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> hw/xen/xen_pt_config_init.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
> index aee31c62bb..55a83333f2 100644
> --- a/hw/xen/xen_pt_config_init.c
> +++ b/hw/xen/xen_pt_config_init.c
> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
> {
> XenPTRegInfo *reg = cfg_entry->reg;
> XenPTRegion *base = NULL;
> - PCIDevice *d = (PCIDevice *)&s->dev;
> + PCIDevice *d = &s->dev;
This line of code is odd even without the cast. XenPCIPassthroughState*
is a QOM object (TYPE_XEN_PT_DEVICE) which is a subclass of TYPE_PCI_DEVICE,
so the standard way to get the PCIDevice pointer for s would be
PCIDevice *d = PCI_DEVICE(s);
thanks
-- PMM
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 0/8] Coccinelle cleanups
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (11 preceding siblings ...)
(?)
@ 2018-07-05 13:47 ` Michael S. Tsirkin
-1 siblings, 0 replies; 32+ messages in thread
From: Michael S. Tsirkin @ 2018-07-05 13:47 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, Anthony Perard,
Christian Borntraeger, Marcel Apfelbaum, Stefano Stabellini,
Peter Maydell, xen-devel, qemu-arm, qemu-block, qemu-devel,
qemu-s390x, Markus Armbruster, Daniel P . Berrange,
Cornelia Huck, David Hildenbrand, Igor Mammedov, Gerd Hoffmann,
Kevin Wolf, Max Reitz, Alexander Graf, Richard Henderson
On Wed, Jul 04, 2018 at 12:39:11PM -0300, Philippe Mathieu-Daudé wrote:
> Nothing exciting here, patches created mechanically
> (common after soft freeze).
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Philippe Mathieu-Daudé (8):
> qobject: Catch another straggler for use of qdict_put_str()
> error: Remove NULL checks on error_propagate() calls
> crypto: Remove useless casts
> xen: Remove useless casts
> tests/bios-tables-test: Remove useless casts
> ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
> hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro
> hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro
>
> include/hw/intc/arm_gicv3_common.h | 2 +-
> crypto/cipher-builtin.c | 4 ++--
> hw/pci-host/piix.c | 2 +-
> hw/pci-host/q35.c | 2 +-
> hw/s390x/virtio-ccw.c | 4 +---
> hw/xen/xen_pt_config_init.c | 2 +-
> qobject/block-qdict.c | 2 +-
> tests/bios-tables-test.c | 2 +-
> ui/vnc-enc-tight.c | 2 +-
> ui/vnc.c | 3 ++-
> 10 files changed, 12 insertions(+), 13 deletions(-)
>
> --
> 2.18.0
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [PATCH 0/8] Coccinelle cleanups
2018-07-04 15:39 ` Philippe Mathieu-Daudé
` (10 preceding siblings ...)
(?)
@ 2018-07-05 13:47 ` Michael S. Tsirkin
-1 siblings, 0 replies; 32+ messages in thread
From: Michael S. Tsirkin @ 2018-07-05 13:47 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Peter Maydell, David Hildenbrand, qemu-devel, Alexander Graf,
Gerd Hoffmann, Stefano Stabellini, qemu-block, Markus Armbruster,
Christian Borntraeger, Marcel Apfelbaum, Anthony Perard,
xen-devel, qemu-s390x, qemu-arm, Marc-André Lureau,
Richard Henderson, Kevin Wolf, Daniel P . Berrange,
Cornelia Huck, Laurent Vivier, Max Reitz, Igor Mammedov
On Wed, Jul 04, 2018 at 12:39:11PM -0300, Philippe Mathieu-Daudé wrote:
> Nothing exciting here, patches created mechanically
> (common after soft freeze).
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Philippe Mathieu-Daudé (8):
> qobject: Catch another straggler for use of qdict_put_str()
> error: Remove NULL checks on error_propagate() calls
> crypto: Remove useless casts
> xen: Remove useless casts
> tests/bios-tables-test: Remove useless casts
> ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
> hw/pci-host: Remove useless parenthesis around DIV_ROUND_UP macro
> hw/intc/gicv3: Remove useless parenthesis around DIV_ROUND_UP macro
>
> include/hw/intc/arm_gicv3_common.h | 2 +-
> crypto/cipher-builtin.c | 4 ++--
> hw/pci-host/piix.c | 2 +-
> hw/pci-host/q35.c | 2 +-
> hw/s390x/virtio-ccw.c | 4 +---
> hw/xen/xen_pt_config_init.c | 2 +-
> qobject/block-qdict.c | 2 +-
> tests/bios-tables-test.c | 2 +-
> ui/vnc-enc-tight.c | 2 +-
> ui/vnc.c | 3 ++-
> 10 files changed, 12 insertions(+), 13 deletions(-)
>
> --
> 2.18.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
2018-07-05 10:16 ` Peter Maydell
@ 2018-07-05 15:36 ` Philippe Mathieu-Daudé
-1 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-05 15:36 UTC (permalink / raw)
To: Peter Maydell
Cc: Laurent Vivier, Marc-André Lureau, Anthony Perard,
open list:X86, Stefano Stabellini, QEMU Developers
On 07/05/2018 07:16 AM, Peter Maydell wrote:
> On 4 July 2018 at 16:39, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> Patch created mechanically by rerunning:
>>
>> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
>> --macro-file scripts/cocci-macro-file.h \
>> --dir . --in-place
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> hw/xen/xen_pt_config_init.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
>> index aee31c62bb..55a83333f2 100644
>> --- a/hw/xen/xen_pt_config_init.c
>> +++ b/hw/xen/xen_pt_config_init.c
>> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
>> {
>> XenPTRegInfo *reg = cfg_entry->reg;
>> XenPTRegion *base = NULL;
>> - PCIDevice *d = (PCIDevice *)&s->dev;
>> + PCIDevice *d = &s->dev;
>
> This line of code is odd even without the cast. XenPCIPassthroughState*
> is a QOM object (TYPE_XEN_PT_DEVICE) which is a subclass of TYPE_PCI_DEVICE,
> so the standard way to get the PCIDevice pointer for s would be
> PCIDevice *d = PCI_DEVICE(s);
You have eagle eyes...
Thanks for your review :)
Phil.
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 4/8] xen: Remove useless casts
@ 2018-07-05 15:36 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 32+ messages in thread
From: Philippe Mathieu-Daudé @ 2018-07-05 15:36 UTC (permalink / raw)
To: Peter Maydell
Cc: Stefano Stabellini, QEMU Developers, Laurent Vivier,
open list:X86, Anthony Perard, Marc-André Lureau
On 07/05/2018 07:16 AM, Peter Maydell wrote:
> On 4 July 2018 at 16:39, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> Patch created mechanically by rerunning:
>>
>> $ spatch --sp-file scripts/coccinelle/typecast.cocci \
>> --macro-file scripts/cocci-macro-file.h \
>> --dir . --in-place
>>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>> hw/xen/xen_pt_config_init.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c
>> index aee31c62bb..55a83333f2 100644
>> --- a/hw/xen/xen_pt_config_init.c
>> +++ b/hw/xen/xen_pt_config_init.c
>> @@ -543,7 +543,7 @@ static int xen_pt_exp_rom_bar_reg_write(XenPCIPassthroughState *s,
>> {
>> XenPTRegInfo *reg = cfg_entry->reg;
>> XenPTRegion *base = NULL;
>> - PCIDevice *d = (PCIDevice *)&s->dev;
>> + PCIDevice *d = &s->dev;
>
> This line of code is odd even without the cast. XenPCIPassthroughState*
> is a QOM object (TYPE_XEN_PT_DEVICE) which is a subclass of TYPE_PCI_DEVICE,
> so the standard way to get the PCIDevice pointer for s would be
> PCIDevice *d = PCI_DEVICE(s);
You have eagle eyes...
Thanks for your review :)
Phil.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 32+ messages in thread
* Re: [Qemu-devel] [PATCH 6/8] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro
2018-07-04 15:39 ` [Qemu-devel] [PATCH 6/8] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro Philippe Mathieu-Daudé
2018-07-05 5:39 ` Markus Armbruster
@ 2018-08-21 5:46 ` Gerd Hoffmann
1 sibling, 0 replies; 32+ messages in thread
From: Gerd Hoffmann @ 2018-08-21 5:46 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: Laurent Vivier, Marc-André Lureau, qemu-devel
On Wed, Jul 04, 2018 at 12:39:17PM -0300, Philippe Mathieu-Daudé wrote:
> Patch created mechanically by rerunning:
>
> $ spatch --sp-file scripts/coccinelle/round.cocci \
> --macro-file scripts/cocci-macro-file.h \
> --dir . --in-place
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Added to ui queue.
thanks,
Gerd
^ permalink raw reply [flat|nested] 32+ messages in thread
end of thread, other threads:[~2018-08-21 6:00 UTC | newest]
Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04 15:39 [Qemu-devel] [PATCH 0/8] Coccinelle cleanups Philippe Mathieu-Daudé
2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-04 15:39 ` [Qemu-devel] [PATCH 1/8] qobject: Catch another straggler for use of qdict_put_str() Philippe Mathieu-Daudé
2018-07-05 5:38 ` Markus Armbruster
2018-07-04 15:39 ` [Qemu-devel] [PATCH 2/8] error: Remove NULL checks on error_propagate() calls Philippe Mathieu-Daudé
2018-07-05 5:38 ` Markus Armbruster
2018-07-05 8:49 ` David Hildenbrand
2018-07-04 15:39 ` [Qemu-devel] [PATCH 3/8] crypto: Remove useless casts Philippe Mathieu-Daudé
2018-07-04 15:51 ` Daniel P. Berrangé
2018-07-04 16:30 ` Philippe Mathieu-Daudé
2018-07-04 15:39 ` [Qemu-devel] [PATCH 4/8] xen: " Philippe Mathieu-Daudé
2018-07-04 15:39 ` Philippe Mathieu-Daudé
2018-07-05 5:39 ` [Qemu-devel] " Markus Armbruster
2018-07-05 5:39 ` Markus Armbruster
2018-07-05 10:05 ` Anthony PERARD
2018-07-05 10:05 ` Anthony PERARD
2018-07-05 10:16 ` [Qemu-devel] " Peter Maydell
2018-07-05 10:16 ` Peter Maydell
2018-07-05 15:36 ` Philippe Mathieu-Daudé
2018-07-05 15:36 ` Philippe Mathieu-Daudé
2018-07-04 15:39 ` [Qemu-devel] [PATCH 5/8] tests/bios-tables-test: " Philippe Mathieu-Daudé
2018-07-05 5:39 ` Markus Armbruster
2018-07-04 15:39 ` [Qemu-devel] [PATCH 6/8] ui/vnc: Remove useless parenthesis around DIV_ROUND_UP macro Philippe Mathieu-Daudé
2018-07-05 5:39 ` Markus Armbruster
2018-08-21 5:46 ` Gerd Hoffmann
2018-07-04 15:39 ` [Qemu-devel] [PATCH 7/8] hw/pci-host: " Philippe Mathieu-Daudé
2018-07-05 5:39 ` Markus Armbruster
2018-07-04 15:39 ` [Qemu-devel] [PATCH 8/8] hw/intc/gicv3: " Philippe Mathieu-Daudé
2018-07-05 8:33 ` [Qemu-devel] [PATCH 0/8] Coccinelle cleanups Markus Armbruster
2018-07-05 8:33 ` Markus Armbruster
2018-07-05 13:47 ` Michael S. Tsirkin
2018-07-05 13:47 ` [Qemu-devel] " Michael S. Tsirkin
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.