various: Remove suspicious '\' character outside of #define in C code
Fixes the following coccinelle warnings: $ spatch --sp-file --verbose-parsing ... \ scripts/coccinelle/remove_local_err.cocci ... SUSPICIOUS: a \ character appears outside of a #define at ./target/ppc/translate_init.inc.c:5213 SUSPICIOUS: a \ character appears outside of a #define at ./target/ppc/translate_init.inc.c:5261 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:166 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:167 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:169 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:170 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:171 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:172 SUSPICIOUS: a \ character appears outside of a #define at ./target/microblaze/cpu.c:173 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5787 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5789 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5800 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5801 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5802 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5804 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5805 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:5806 SUSPICIOUS: a \ character appears outside of a #define at ./target/i386/cpu.c:6329 SUSPICIOUS: a \ character appears outside of a #define at ./hw/sd/sdhci.c:1133 SUSPICIOUS: a \ character appears outside of a #define at ./hw/scsi/scsi-disk.c:3081 SUSPICIOUS: a \ character appears outside of a #define at ./hw/net/virtio-net.c:1529 SUSPICIOUS: a \ character appears outside of a #define at ./hw/riscv/sifive_u.c:468 SUSPICIOUS: a \ character appears outside of a #define at ./dump/dump.c:1895 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2209 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2215 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2221 SUSPICIOUS: a \ character appears outside of a #define at ./block/vhdx.c:2222 SUSPICIOUS: a \ character appears outside of a #define at ./block/replication.c:172 SUSPICIOUS: a \ character appears outside of a #define at ./block/replication.c:173 Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20200412223619.11284-2-f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
fdd76fecdd
commit
78ee6bd048
@ -172,8 +172,8 @@ static void replication_child_perm(BlockDriverState *bs, BdrvChild *c,
|
||||
if ((bs->open_flags & (BDRV_O_INACTIVE | BDRV_O_RDWR)) == BDRV_O_RDWR) {
|
||||
*nperm |= BLK_PERM_WRITE;
|
||||
}
|
||||
*nshared = BLK_PERM_CONSISTENT_READ \
|
||||
| BLK_PERM_WRITE \
|
||||
*nshared = BLK_PERM_CONSISTENT_READ
|
||||
| BLK_PERM_WRITE
|
||||
| BLK_PERM_WRITE_UNCHANGED;
|
||||
return;
|
||||
}
|
||||
|
@ -2206,20 +2206,20 @@ static QemuOptsList vhdx_create_opts = {
|
||||
.name = VHDX_BLOCK_OPT_BLOCK_SIZE,
|
||||
.type = QEMU_OPT_SIZE,
|
||||
.def_value_str = stringify(0),
|
||||
.help = "Block Size; min 1MB, max 256MB. " \
|
||||
.help = "Block Size; min 1MB, max 256MB. "
|
||||
"0 means auto-calculate based on image size."
|
||||
},
|
||||
{
|
||||
.name = BLOCK_OPT_SUBFMT,
|
||||
.type = QEMU_OPT_STRING,
|
||||
.help = "VHDX format type, can be either 'dynamic' or 'fixed'. "\
|
||||
.help = "VHDX format type, can be either 'dynamic' or 'fixed'. "
|
||||
"Default is 'dynamic'."
|
||||
},
|
||||
{
|
||||
.name = VHDX_BLOCK_OPT_ZERO,
|
||||
.type = QEMU_OPT_BOOL,
|
||||
.help = "Force use of payload blocks of type 'ZERO'. "\
|
||||
"Non-standard, but default. Do not set to 'off' when "\
|
||||
.help = "Force use of payload blocks of type 'ZERO'. "
|
||||
"Non-standard, but default. Do not set to 'off' when "
|
||||
"using 'qemu-img convert' with subformat=dynamic."
|
||||
},
|
||||
{ NULL }
|
||||
|
@ -1892,7 +1892,7 @@ static void dump_process(DumpState *s, Error **errp)
|
||||
result = qmp_query_dump(NULL);
|
||||
/* should never fail */
|
||||
assert(result);
|
||||
qapi_event_send_dump_completed(result, !!local_err, (local_err ? \
|
||||
qapi_event_send_dump_completed(result, !!local_err, (local_err ?
|
||||
error_get_pretty(local_err) : NULL));
|
||||
qapi_free_DumpQueryResult(result);
|
||||
|
||||
|
@ -1526,7 +1526,7 @@ static void virtio_net_rsc_extract_unit6(VirtioNetRscChain *chain,
|
||||
+ sizeof(struct eth_header));
|
||||
unit->ip = ip6;
|
||||
unit->ip_plen = &(ip6->ip6_ctlun.ip6_un1.ip6_un1_plen);
|
||||
unit->tcp = (struct tcp_header *)(((uint8_t *)unit->ip)\
|
||||
unit->tcp = (struct tcp_header *)(((uint8_t *)unit->ip)
|
||||
+ sizeof(struct ip6_header));
|
||||
unit->tcp_hdrlen = (htons(unit->tcp->th_offset_flags) & 0xF000) >> 10;
|
||||
|
||||
|
@ -465,7 +465,7 @@ static void riscv_sifive_u_machine_instance_init(Object *obj)
|
||||
object_property_add_bool(obj, "start-in-flash", sifive_u_get_start_in_flash,
|
||||
sifive_u_set_start_in_flash, NULL);
|
||||
object_property_set_description(obj, "start-in-flash",
|
||||
"Set on to tell QEMU's ROM to jump to " \
|
||||
"Set on to tell QEMU's ROM to jump to "
|
||||
"flash. Otherwise QEMU will jump to DRAM",
|
||||
NULL);
|
||||
}
|
||||
|
@ -3078,7 +3078,7 @@ static const TypeInfo scsi_cd_info = {
|
||||
|
||||
#ifdef __linux__
|
||||
static Property scsi_block_properties[] = {
|
||||
DEFINE_BLOCK_ERROR_PROPERTIES(SCSIDiskState, qdev.conf), \
|
||||
DEFINE_BLOCK_ERROR_PROPERTIES(SCSIDiskState, qdev.conf),
|
||||
DEFINE_PROP_DRIVE("drive", SCSIDiskState, qdev.conf.blk),
|
||||
DEFINE_PROP_BOOL("share-rw", SCSIDiskState, qdev.conf.share_rw, false),
|
||||
DEFINE_PROP_UINT16("rotation_rate", SCSIDiskState, rotation_rate, 0),
|
||||
|
@ -1130,7 +1130,7 @@ sdhci_write(void *opaque, hwaddr offset, uint64_t val, unsigned size)
|
||||
|
||||
/* Limit block size to the maximum buffer size */
|
||||
if (extract32(s->blksize, 0, 12) > s->buf_maxsz) {
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: Size 0x%x is larger than " \
|
||||
qemu_log_mask(LOG_GUEST_ERROR, "%s: Size 0x%x is larger than "
|
||||
"the maximum buffer 0x%x", __func__, s->blksize,
|
||||
s->buf_maxsz);
|
||||
|
||||
|
@ -5784,9 +5784,9 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
|
||||
host_cpuid(index, 0, eax, ebx, ecx, edx);
|
||||
break;
|
||||
}
|
||||
*eax = (L1_DTLB_2M_ASSOC << 24) | (L1_DTLB_2M_ENTRIES << 16) | \
|
||||
*eax = (L1_DTLB_2M_ASSOC << 24) | (L1_DTLB_2M_ENTRIES << 16) |
|
||||
(L1_ITLB_2M_ASSOC << 8) | (L1_ITLB_2M_ENTRIES);
|
||||
*ebx = (L1_DTLB_4K_ASSOC << 24) | (L1_DTLB_4K_ENTRIES << 16) | \
|
||||
*ebx = (L1_DTLB_4K_ASSOC << 24) | (L1_DTLB_4K_ENTRIES << 16) |
|
||||
(L1_ITLB_4K_ASSOC << 8) | (L1_ITLB_4K_ENTRIES);
|
||||
*ecx = encode_cache_cpuid80000005(env->cache_info_amd.l1d_cache);
|
||||
*edx = encode_cache_cpuid80000005(env->cache_info_amd.l1i_cache);
|
||||
@ -5797,13 +5797,13 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
|
||||
host_cpuid(index, 0, eax, ebx, ecx, edx);
|
||||
break;
|
||||
}
|
||||
*eax = (AMD_ENC_ASSOC(L2_DTLB_2M_ASSOC) << 28) | \
|
||||
(L2_DTLB_2M_ENTRIES << 16) | \
|
||||
(AMD_ENC_ASSOC(L2_ITLB_2M_ASSOC) << 12) | \
|
||||
*eax = (AMD_ENC_ASSOC(L2_DTLB_2M_ASSOC) << 28) |
|
||||
(L2_DTLB_2M_ENTRIES << 16) |
|
||||
(AMD_ENC_ASSOC(L2_ITLB_2M_ASSOC) << 12) |
|
||||
(L2_ITLB_2M_ENTRIES);
|
||||
*ebx = (AMD_ENC_ASSOC(L2_DTLB_4K_ASSOC) << 28) | \
|
||||
(L2_DTLB_4K_ENTRIES << 16) | \
|
||||
(AMD_ENC_ASSOC(L2_ITLB_4K_ASSOC) << 12) | \
|
||||
*ebx = (AMD_ENC_ASSOC(L2_DTLB_4K_ASSOC) << 28) |
|
||||
(L2_DTLB_4K_ENTRIES << 16) |
|
||||
(AMD_ENC_ASSOC(L2_ITLB_4K_ASSOC) << 12) |
|
||||
(L2_ITLB_4K_ENTRIES);
|
||||
encode_cache_cpuid80000006(env->cache_info_amd.l2_cache,
|
||||
cpu->enable_l3_cache ?
|
||||
@ -6326,7 +6326,7 @@ static void x86_cpu_expand_features(X86CPU *cpu, Error **errp)
|
||||
*/
|
||||
env->features[w] |=
|
||||
x86_cpu_get_supported_feature_word(w, cpu->migratable) &
|
||||
~env->user_features[w] & \
|
||||
~env->user_features[w] &
|
||||
~feature_word_info[w].no_autoenable_flags;
|
||||
}
|
||||
}
|
||||
|
@ -163,14 +163,14 @@ static void mb_cpu_realizefn(DeviceState *dev, Error **errp)
|
||||
|
||||
qemu_init_vcpu(cs);
|
||||
|
||||
env->pvr.regs[0] = PVR0_USE_EXC_MASK \
|
||||
| PVR0_USE_ICACHE_MASK \
|
||||
env->pvr.regs[0] = PVR0_USE_EXC_MASK
|
||||
| PVR0_USE_ICACHE_MASK
|
||||
| PVR0_USE_DCACHE_MASK;
|
||||
env->pvr.regs[2] = PVR2_D_OPB_MASK \
|
||||
| PVR2_D_LMB_MASK \
|
||||
| PVR2_I_OPB_MASK \
|
||||
| PVR2_I_LMB_MASK \
|
||||
| PVR2_FPU_EXC_MASK \
|
||||
env->pvr.regs[2] = PVR2_D_OPB_MASK
|
||||
| PVR2_D_LMB_MASK
|
||||
| PVR2_I_OPB_MASK
|
||||
| PVR2_I_LMB_MASK
|
||||
| PVR2_FPU_EXC_MASK
|
||||
| 0;
|
||||
|
||||
version = cpu->cfg.version ? cpu->cfg.version : DEFAULT_CPU_VERSION;
|
||||
|
@ -5210,7 +5210,7 @@ POWERPC_FAMILY(e5500)(ObjectClass *oc, void *data)
|
||||
PPC_FLOAT_STFIWX | PPC_WAIT |
|
||||
PPC_MEM_TLBSYNC | PPC_TLBIVAX | PPC_MEM_SYNC |
|
||||
PPC_64B | PPC_POPCNTB | PPC_POPCNTWD;
|
||||
pcc->insns_flags2 = PPC2_BOOKE206 | PPC2_PRCNTL | PPC2_PERM_ISA206 | \
|
||||
pcc->insns_flags2 = PPC2_BOOKE206 | PPC2_PRCNTL | PPC2_PERM_ISA206 |
|
||||
PPC2_FP_CVT_S64;
|
||||
pcc->msr_mask = (1ull << MSR_CM) |
|
||||
(1ull << MSR_GS) |
|
||||
@ -5258,7 +5258,7 @@ POWERPC_FAMILY(e6500)(ObjectClass *oc, void *data)
|
||||
PPC_FLOAT_STFIWX | PPC_WAIT |
|
||||
PPC_MEM_TLBSYNC | PPC_TLBIVAX | PPC_MEM_SYNC |
|
||||
PPC_64B | PPC_POPCNTB | PPC_POPCNTWD | PPC_ALTIVEC;
|
||||
pcc->insns_flags2 = PPC2_BOOKE206 | PPC2_PRCNTL | PPC2_PERM_ISA206 | \
|
||||
pcc->insns_flags2 = PPC2_BOOKE206 | PPC2_PRCNTL | PPC2_PERM_ISA206 |
|
||||
PPC2_FP_CVT_S64 | PPC2_ATOMIC_ISA206;
|
||||
pcc->msr_mask = (1ull << MSR_CM) |
|
||||
(1ull << MSR_GS) |
|
||||
|
Loading…
Reference in New Issue
Block a user