[Top][All Lists]

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

Re: [PATCH v3 01/19] target/arm: Rename KVM set_feature() as kvm_set_fea

From: Peter Maydell
Subject: Re: [PATCH v3 01/19] target/arm: Rename KVM set_feature() as kvm_set_feature()
Date: Sun, 19 Apr 2020 20:58:07 +0100

On Sun, 19 Apr 2020 at 17:31, Philippe Mathieu-Daudé <address@hidden> wrote:
> On 3/17/20 10:09 AM, Philippe Mathieu-Daudé wrote:
> > On 3/16/20 9:16 PM, Richard Henderson wrote:
> >> On 3/16/20 9:06 AM, Philippe Mathieu-Daudé wrote:
> >>> +++ b/target/arm/kvm32.c
> >>> @@ -22,7 +22,7 @@
> >>>   #include "internals.h"
> >>>   #include "qemu/log.h"
> >>> -static inline void set_feature(uint64_t *features, int feature)
> >>> +static inline void kvm_set_feature(uint64_t *features, int feature)
> >>
> >> Why, what's wrong with the existing name?
> Peter suggested the rename here:
> https://www.mail-archive.com/address@hidden/msg641931.html

In that message I suggest that if you move the set_feature()
function to cpu.h (which is included in lots of places) then
that is too generic a name to use for it. The function of
the same name here in kvm32.c is fine, because it's
'static inline' and only visible in this file, so the bar
for naming is lower. (In fact, it's a demonstration of why
you don't want a generic name like 'set_feature' in a widely
included header file.)

-- PMM

reply via email to

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