qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v7 14/35] Hexagon (target/hexagon) instruction printing


From: Eric Blake
Subject: Re: [PATCH v7 14/35] Hexagon (target/hexagon) instruction printing
Date: Fri, 22 Jan 2021 12:10:39 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

On 1/22/21 11:58 AM, Philippe Mathieu-Daudé wrote:

>> +#include "qemu/osdep.h"
>> +#include "insn.h"
>> +
>> +extern void snprint_a_pkt_disas(GString *buf, Packet *pkt, uint32_t *words,
>> +                                target_ulong pc);
>> +extern void snprint_a_pkt_debug(GString *buf, Packet *pkt);
> 
> No need to declare prototypes in header with 'extern'...
> (also noticed in other patches).

Using the extern on function declarations is not wrong (in fact, some
projects prefer to use extern for everything in a header, regardless of
whether it is function or data, rather than just limiting it to data).
But you do have a point that it's not common practice in qemu, and local
consistency is better than any habits you've picked up in other projects.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org




reply via email to

[Prev in Thread] Current Thread [Next in Thread]